[Development] Ubuntu Qt packages failing if client uses g++-5.1

Stephen Kelly steveire at gmail.com
Thu Jun 18 23:29:43 CEST 2015


Hello,

Using this testcase:

 
 #include <QCoreApplication>
 #include <QTimer>
 #include <QDebug>

 int main(int argv, char **args)
 {
   QCoreApplication app(argv, args);

   qDebug() << QCoreApplication::instance() << qApp;

   QTimer::singleShot(0, qApp, SLOT(quit()));

   return app.exec();
 }

and building with ubuntu Qt packages with g++-5 (which I probably got from 

 https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test

) I get incompatible runtime behavior:

 stephen at hal:/tmp/qtbug$ ./qtbug 
 QObject(0x0)  QObject(0x0) 
 ^C

That is, the QCoreApplication::instance() reports a null pointer in qDebug, 
and the singleShot does not work.

This only happens with the ubuntu Qt packages for me. With the QtC package 
it works as expected.

In case anyone else runs into this issue.

Thanks,

Steve.





More information about the Development mailing list