summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2015-06-14 02:00:26 (GMT)
committer Slávek Banko <slavek.banko@axis.cz>2015-06-14 02:00:26 (GMT)
commitc0e6e0eddc721f28a273c15688db0c6f46ed78e1 (patch)
tree53d5e75a434fb3550f9f19f3ae549e6ae9892fd1
parentb9afd6f70a65f69a0508144007abac785a0eaa9c (diff)
downloadtdepim-c0e6e0ed.zip
tdepim-c0e6e0ed.tar.gz
Fix FTBFS when build without tdehw-lib
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--kmail/kmkernel.cpp5
-rw-r--r--kmail/kmkernel.h12
2 files changed, 16 insertions, 1 deletions
diff --git a/kmail/kmkernel.cpp b/kmail/kmkernel.cpp
index aa01c96..6f18a36 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 0dc4644..610ab47 100644
--- a/kmail/kmkernel.h
+++ b/kmail/kmkernel.h
@@ -9,12 +9,20 @@
#include <weaver.h>
#include <weaverlogger.h>
+#include <kdemacros.h>
#include <tdeconfig.h>
#include <tdeversion.h>
#include <tdeimproxy.h>
#include <tdepimmacros.h>
-#include <tdenetworkconnections.h>
+#ifdef __TDE_HAVE_TDEHWLIB
+# include <tdenetworkconnections.h>
+#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