On 03/18/2009 08:48 PM, Vadim Lebedev wrote: > This seems to be DBUS handling code i've added recently... > > It should be disabled on WIN32 platform i think > > > Can somebody please submit a patch for this issue, > as i done have correct WIN32 dev environment
Hmm. Something like this? Please test under Linux as I do not have a Linux dev environment.. ;) # HG changeset patch # User Darshaka Pathirana <[email protected]> # Date 1237427273 -3600 # Node ID de016f072d2ffffae1e69d6976ac04a776e37df5 # Parent 0c9ef25e85544395239ddcd14371ba64f6e398de QtDBus module is a Unix-only library. Needs to be disabled in Win32. diff -r 0c9ef25e8554 -r de016f072d2f libs/3rdparty/qt4/CMakeLists.txt --- a/libs/3rdparty/qt4/CMakeLists.txt Fri Feb 27 13:13:52 2009 +0100 +++ b/libs/3rdparty/qt4/CMakeLists.txt Thu Mar 19 02:47:53 2009 +0100 @@ -24,9 +24,11 @@ ${QT_QTNETWORK_LIBRARY_DEBUG} ${QT_QTXML_LIBRARY_DEBUG} ${QT_QTSVG_LIBRARY_DEBUG} - ${QT_QTDBUS_LIBRARY_DEBUG} ) if (UNIX) + ow_add_public_libraries( + ${QT_QTDBUS_LIBRARY_DEBUG} + ) if (QT_QTUITOOLS_LIBRARY_DEBUG) ow_add_public_libraries( ${QT_QTUITOOLS_LIBRARY_DEBUG} @@ -70,10 +72,13 @@ ${QT_QTNETWORK_LIBRARY_RELEASE} ${QT_QTXML_LIBRARY_RELEASE} ${QT_QTSVG_LIBRARY_RELEASE} - ${QT_QTDBUS_LIBRARY_RELEASE} QtUiTools ) - + if (UNIX) + ow_add_public_libraries( + ${QT_QTDBUS_LIBRARY_RELEASE} + ) + endif (UNIX) if (WIN32) find_library( QT_QTAXCONTAINER_LIBRARY_RELEASE diff -r 0c9ef25e8554 -r de016f072d2f wengophone/src/model/network/NetworkObserver.cpp --- a/wengophone/src/model/network/NetworkObserver.cpp Fri Feb 27 13:13:52 2009 +0100 +++ b/wengophone/src/model/network/NetworkObserver.cpp Thu Mar 19 02:47:53 2009 +0100 @@ -23,7 +23,6 @@ #include <thread/Thread.h> //#include <netlib.h> #include <QtNetwork/QtNetwork> -#include <QtDBus/QtDBus> //#define RETRIES 8 @@ -31,6 +30,7 @@ #include <Windows.h> #include <Iphlpapi.h> #else +#include <QtDBus/QtDBus> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> @@ -55,11 +55,13 @@ //_timer.start(0, 500, 0); _idTimer = startTimer(500); +#if defined(OS_LINUX) QDBusConnection::systemBus().registerObject("/", this); QDBusConnection::systemBus().connect( QString(), QString(), "org.qutecom.Wakeup", "wakeup", this, SLOT(wakeupSlot()) ); +#endif } @@ -94,6 +96,7 @@ return _isConnected ; } +#if defined(OS_LINUX) void NetworkObserver::wakeupSlot() { if (_isConnected) @@ -112,6 +115,7 @@ } +#endif void NetworkObserver::timerEvent(QTimerEvent*) { diff -r 0c9ef25e8554 -r de016f072d2f wengophone/src/model/network/NetworkObserver.h --- a/wengophone/src/model/network/NetworkObserver.h Fri Feb 27 13:13:52 2009 +0100 +++ b/wengophone/src/model/network/NetworkObserver.h Thu Mar 19 02:47:53 2009 +0100 @@ -33,10 +33,13 @@ class NetworkObserver : public QObject, public Trackable { Q_OBJECT + +#if defined(OS_LINUX) Q_CLASSINFO("D-Bus Interface", "org.qutecom.Wakeup"); Q_SIGNALS: void wakeup(); +#endif public: @@ -77,8 +80,10 @@ bool canConnect(); +#if defined(OS_LINUX) private Q_SLOTS: void wakeupSlot(); +#endif #if defined(WIN32) bool ppl_dns_get_local_fqdn (char **servername, char **serverip,char **netmask, unsigned int WIN32_interface); _______________________________________________ QuteCom-dev mailing list [email protected] http://lists.qutecom.org/mailman/listinfo/qutecom-dev
