From c0e6e0eddc721f28a273c15688db0c6f46ed78e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 14 Jun 2015 04:00:26 +0200 Subject: [PATCH] Fix FTBFS when build without tdehw-lib MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- kmail/kmkernel.cpp | 5 +++++ kmail/kmkernel.h | 12 +++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/kmail/kmkernel.cpp b/kmail/kmkernel.cpp index aa01c968..6f18a36b 100644 --- a/kmail/kmkernel.cpp +++ b/kmail/kmkernel.cpp @@ -170,6 +170,7 @@ KMKernel::KMKernel (TQObject *parent, const char *name) : connectDCOPSignal( 0, 0, "kmailSelectFolder(TQString)", "selectFolder(TQString)", false ); +#ifdef __TDE_HAVE_TDEHWLIB mNetworkManager = TDEGlobal::networkManager(); if (mNetworkManager) { connect( mNetworkManager, TQT_SIGNAL( networkDeviceStateChanged( TDENetworkConnectionStatus::TDENetworkConnectionStatus, TDENetworkConnectionStatus::TDENetworkConnectionStatus, TQString ) ), @@ -181,6 +182,7 @@ KMKernel::KMKernel (TQObject *parent, const char *name) : stopNetworkJobs(); } } +#endif } KMKernel::~KMKernel () @@ -2470,6 +2472,7 @@ int KMKernel::timeOfLastMessageCountChange() const bool KMKernel::networkStateConnected() { +#ifdef __TDE_HAVE_TDEHWLIB if (mNetworkManager) { TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags networkStatus = mNetworkManager->backendStatus(); if ((networkStatus & TDENetworkGlobalManagerFlags::Connected) @@ -2488,6 +2491,8 @@ bool KMKernel::networkStateConnected() // Assume connected return true; } +#endif + return true; } void KMKernel::slotNetworkStateChanged(TDENetworkConnectionStatus::TDENetworkConnectionStatus, TDENetworkConnectionStatus::TDENetworkConnectionStatus, TQString) diff --git a/kmail/kmkernel.h b/kmail/kmkernel.h index 0dc46441..610ab476 100644 --- a/kmail/kmkernel.h +++ b/kmail/kmkernel.h @@ -9,12 +9,20 @@ #include #include +#include #include #include #include #include -#include +#ifdef __TDE_HAVE_TDEHWLIB +# include +#else +namespace TDENetworkConnectionStatus { + enum TDENetworkConnectionStatus { + }; +} +#endif #include "kmailIface.h" #include "kmmsgbase.h" @@ -527,7 +535,9 @@ private: TQString mAddMessageLastFolder; KMFolder *mAddMsgCurrentFolder; +#ifdef __TDE_HAVE_TDEHWLIB TDEGlobalNetworkManager *mNetworkManager; +#endif }; #endif