Fix FTBFS when build without tdehw-lib

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/21/head
Slávek Banko 10 years ago
parent b9afd6f70a
commit c0e6e0eddc

@ -170,6 +170,7 @@ KMKernel::KMKernel (TQObject *parent, const char *name) :
connectDCOPSignal( 0, 0, "kmailSelectFolder(TQString)", connectDCOPSignal( 0, 0, "kmailSelectFolder(TQString)",
"selectFolder(TQString)", false ); "selectFolder(TQString)", false );
#ifdef __TDE_HAVE_TDEHWLIB
mNetworkManager = TDEGlobal::networkManager(); mNetworkManager = TDEGlobal::networkManager();
if (mNetworkManager) { if (mNetworkManager) {
connect( mNetworkManager, TQT_SIGNAL( networkDeviceStateChanged( TDENetworkConnectionStatus::TDENetworkConnectionStatus, TDENetworkConnectionStatus::TDENetworkConnectionStatus, TQString ) ), connect( mNetworkManager, TQT_SIGNAL( networkDeviceStateChanged( TDENetworkConnectionStatus::TDENetworkConnectionStatus, TDENetworkConnectionStatus::TDENetworkConnectionStatus, TQString ) ),
@ -181,6 +182,7 @@ KMKernel::KMKernel (TQObject *parent, const char *name) :
stopNetworkJobs(); stopNetworkJobs();
} }
} }
#endif
} }
KMKernel::~KMKernel () KMKernel::~KMKernel ()
@ -2470,6 +2472,7 @@ int KMKernel::timeOfLastMessageCountChange() const
bool KMKernel::networkStateConnected() bool KMKernel::networkStateConnected()
{ {
#ifdef __TDE_HAVE_TDEHWLIB
if (mNetworkManager) { if (mNetworkManager) {
TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags networkStatus = mNetworkManager->backendStatus(); TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags networkStatus = mNetworkManager->backendStatus();
if ((networkStatus & TDENetworkGlobalManagerFlags::Connected) if ((networkStatus & TDENetworkGlobalManagerFlags::Connected)
@ -2488,6 +2491,8 @@ bool KMKernel::networkStateConnected()
// Assume connected // Assume connected
return true; return true;
} }
#endif
return true;
} }
void KMKernel::slotNetworkStateChanged(TDENetworkConnectionStatus::TDENetworkConnectionStatus, TDENetworkConnectionStatus::TDENetworkConnectionStatus, TQString) void KMKernel::slotNetworkStateChanged(TDENetworkConnectionStatus::TDENetworkConnectionStatus, TDENetworkConnectionStatus::TDENetworkConnectionStatus, TQString)

@ -9,12 +9,20 @@
#include <weaver.h> #include <weaver.h>
#include <weaverlogger.h> #include <weaverlogger.h>
#include <kdemacros.h>
#include <tdeconfig.h> #include <tdeconfig.h>
#include <tdeversion.h> #include <tdeversion.h>
#include <tdeimproxy.h> #include <tdeimproxy.h>
#include <tdepimmacros.h> #include <tdepimmacros.h>
#include <tdenetworkconnections.h> #ifdef __TDE_HAVE_TDEHWLIB
# include <tdenetworkconnections.h>
#else
namespace TDENetworkConnectionStatus {
enum TDENetworkConnectionStatus {
};
}
#endif
#include "kmailIface.h" #include "kmailIface.h"
#include "kmmsgbase.h" #include "kmmsgbase.h"
@ -527,7 +535,9 @@ private:
TQString mAddMessageLastFolder; TQString mAddMessageLastFolder;
KMFolder *mAddMsgCurrentFolder; KMFolder *mAddMsgCurrentFolder;
#ifdef __TDE_HAVE_TDEHWLIB
TDEGlobalNetworkManager *mNetworkManager; TDEGlobalNetworkManager *mNetworkManager;
#endif
}; };
#endif #endif

Loading…
Cancel
Save