From 59c2b00dd7581a84524a93c99e942b77d6272a35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Mon, 14 Apr 2025 03:17:51 +0200 Subject: [PATCH] Fix FTBFS when building kxkb without tdehw library. This relates to issue #550. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- kxkb/kxkb.cpp | 6 ++++++ kxkb/kxkb.h | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/kxkb/kxkb.cpp b/kxkb/kxkb.cpp index d62999015..6aa5b8ee2 100644 --- a/kxkb/kxkb.cpp +++ b/kxkb/kxkb.cpp @@ -34,7 +34,9 @@ DESCRIPTION #include #include +#ifdef WITH_TDEHWLIB #include +#endif #include #include #include @@ -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 5cbebed5a..803057f61 100644 --- a/kxkb/kxkb.h +++ b/kxkb/kxkb.h @@ -32,7 +32,11 @@ DESCRIPTION #include #include +#ifdef WITH_TDEHWLIB #include +#else +#define TDEGenericDevice void +#endif #include "kxkbtraywindow.h" #include "kxkbconfig.h"