Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.3.0
-
None
-
Ubuntu 12.04 64-bit
Description
If you have a static linux build with dbus enabled, and then make a project with the network module, QNetworkManagerService has a static initializer for QDBusConnection::systemBus() that gets called before QCoreApplication initialization.
It prints this error:
QDBusConnection: system D-Bus connection created before QCoreApplication. Application may misbehave.
If you set a breakpoint in QDBusConnection's constructor you can see it happen:
0 QDBusConnection::QDBusConnection(QDBusConnection const&) 0x8178d0 1 QDBusAbstractInterfacePrivate::QDBusAbstractInterfacePrivate(QString const&, QString const&, QString const&, QDBusConnection const&, bool) 0x8357c8 2 QDBusAbstractInterface::QDBusAbstractInterface(QString const&, QString const&, char const*, QDBusConnection const&, QObject*) 0x838f3e 3 QDBusConnectionInterface::QDBusConnectionInterface(QDBusConnection const&, QObject*) 0x81d689 4 QDBusConnectionPrivate::setBusService(QDBusConnection const&) 0x818b44 5 QDBusConnection::connectToBus(QDBusConnection::BusType, QString const&) 0x81a8fd 6 QDBusConnection::systemBus() 0x81ab90 7 _GLOBAL__sub_I_qnetworkmanagerservice.cpp 0x412140 8 __libc_csu_init 0xfbc89d 9 __libc_start_main /lib/x86_64-linux-gnu/libc.so.6 0x7ffff5bb8700 10 _start 0x413191