From 8b79083f967ee6de83a04c02a40d6c20d9a980d4 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 29 Apr 2021 10:45:28 +0900 Subject: Fixed FTBFS when building tdelibs/tdebase without tdehw. Signed-off-by: Michele Calgaro --- kdesktop/lockeng.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'kdesktop/lockeng.cpp') diff --git a/kdesktop/lockeng.cpp b/kdesktop/lockeng.cpp index f02e51440..75c2e5f98 100644 --- a/kdesktop/lockeng.cpp +++ b/kdesktop/lockeng.cpp @@ -11,18 +11,20 @@ #include #include +#include +#ifdef __TDE_HAVE_TDEHWLIB #include - +#include #include #include +#endif #include #include #include #include #include -#include #include #include #include @@ -198,6 +200,7 @@ SaverEngine::SaverEngine() delete config; config = NULL; +#ifdef __TDE_HAVE_TDEHWLIB // Initialize SmartCard readers TDEGenericDevice *hwdevice; TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices(); @@ -221,6 +224,7 @@ SaverEngine::SaverEngine() } flagFile.close(); } +#endif dBusConnect(); } @@ -261,6 +265,7 @@ void SaverEngine::cardStartupTimeout() { } void SaverEngine::cryptographicCardInserted(TDECryptographicCardDevice* cdevice) { +#ifdef __TDE_HAVE_TDEHWLIB TQString login_name = TQString::null; X509CertificatePtrList certList = cdevice->cardX509Certificates(); if (certList.count() > 0) { @@ -282,9 +287,11 @@ void SaverEngine::cryptographicCardInserted(TDECryptographicCardDevice* cdevice) mValidCryptoCardInserted = true; } } +#endif } void SaverEngine::cryptographicCardRemoved(TDECryptographicCardDevice* cdevice) { +#ifdef __TDE_HAVE_TDEHWLIB if (mValidCryptoCardInserted) { mValidCryptoCardInserted = false; @@ -294,6 +301,7 @@ void SaverEngine::cryptographicCardRemoved(TDECryptographicCardDevice* cdevice) // Force lock lockScreen(); } +#endif } //--------------------------------------------------------------------------- -- cgit v1.2.3