summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2025-04-14 03:17:51 +0200
committerSlávek Banko <slavek.banko@axis.cz>2025-04-14 09:00:21 +0200
commita83f4f35d969f37252cf1d7241835d286d67b8d2 (patch)
treea4032be374e7d898d4d42c357f5c5683b3ff049c
parent109663124bdd473431667682ab18bad307a5bf58 (diff)
downloadtdebase-a83f4f35d969f37252cf1d7241835d286d67b8d2.tar.gz
tdebase-a83f4f35d969f37252cf1d7241835d286d67b8d2.zip
Fix FTBFS when building kxkb without tdehw library.
This relates to issue #550. Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 59c2b00dd7581a84524a93c99e942b77d6272a35)
-rw-r--r--kxkb/kxkb.cpp6
-rw-r--r--kxkb/kxkb.h4
2 files changed, 10 insertions, 0 deletions
diff --git a/kxkb/kxkb.cpp b/kxkb/kxkb.cpp
index 1d4f244e7..b2276663f 100644
--- a/kxkb/kxkb.cpp
+++ b/kxkb/kxkb.cpp
@@ -34,7 +34,9 @@ DESCRIPTION
#include <tdeaboutdata.h>
#include <tdecmdlineargs.h>
+#ifdef WITH_TDEHWLIB
#include <tdehardwaredevices.h>
+#endif
#include <tdeglobal.h>
#include <kglobalaccel.h>
#include <tdelocale.h>
@@ -83,10 +85,12 @@ KXKBApp::KXKBApp(bool allowStyles, bool GUIenabled)
connect( this, TQ_SIGNAL(settingsChanged(int)), TQ_SLOT(slotSettingsChanged(int)) );
addKipcEventMask( KIPC::SettingsChanged );
+#if WITH_TDEHWLIB
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
connect(hwdevices, TQ_SIGNAL(hardwareAdded(TDEGenericDevice*)), this, TQ_SLOT(hardwareChanged(TDEGenericDevice*)));
connect(hwdevices, TQ_SIGNAL(hardwareRemoved(TDEGenericDevice*)), this, TQ_SLOT(hardwareChanged(TDEGenericDevice*)));
connect(hwdevices, TQ_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQ_SLOT(hardwareChanged(TDEGenericDevice*)));
+#endif
}
KXKBApp::~KXKBApp()
@@ -205,10 +209,12 @@ void KXKBApp::applyXkbOptions()
void KXKBApp::hardwareChanged(TDEGenericDevice *dev)
{
+# if WITH_TDEHWLIB
if (dev->type() == TDEGenericDeviceType::Keyboard)
{
TQTimer::singleShot(500, this, TQ_SLOT(applyXkbOptions()));
}
+# endif
}
// kdcop
diff --git a/kxkb/kxkb.h b/kxkb/kxkb.h
index d533ba6d4..3ac99aebc 100644
--- a/kxkb/kxkb.h
+++ b/kxkb/kxkb.h
@@ -32,7 +32,11 @@ DESCRIPTION
#include <tqptrqueue.h>
#include <kuniqueapplication.h>
+#ifdef WITH_TDEHWLIB
#include <tdegenericdevice.h>
+#else
+#define TDEGenericDevice void
+#endif
#include "kxkbtraywindow.h"
#include "kxkbconfig.h"