Respect build option WITH_TDEHWLIB, otherwise it can lead to FTBFS in special cases.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit e031e12d06)
r14.0.x
Slávek Banko 3 years ago
parent 9bdd3a0e47
commit 225ddaa366
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -36,7 +36,7 @@
#include <tdemessagebox.h> #include <tdemessagebox.h>
#include <tdelocale.h> #include <tdelocale.h>
#include <tdetempfile.h> #include <tdetempfile.h>
#ifdef __TDE_HAVE_TDEHWLIB #ifdef WITH_TDEHWLIB
#include <tdehardwaredevices.h> #include <tdehardwaredevices.h>
#endif #endif
@ -358,7 +358,7 @@ void BackTrace::processBacktrace()
} }
#endif // HAVE_ELFICON #endif // HAVE_ELFICON
#ifdef __TDE_HAVE_TDEHWLIB #ifdef WITH_TDEHWLIB
// Append potentially important hardware information // Append potentially important hardware information
m_strBt.append("\n==== (tdehwlib) hardware information ====\n"); m_strBt.append("\n==== (tdehwlib) hardware information ====\n");
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices(); TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();

@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqlayout.h> #include <tqlayout.h>
@ -744,7 +748,7 @@ void KDisplayConfig::setRealResolutionSliderValue(int index) {
KDisplayConfig::KDisplayConfig(TQWidget *parent, const char *name, const TQStringList &) KDisplayConfig::KDisplayConfig(TQWidget *parent, const char *name, const TQStringList &)
: TDECModule(KDisplayCFactory::instance(), parent, name), iccTab(0), numberOfProfiles(0), numberOfScreens(0), m_randrsimple(0), activeProfileName(""), m_gammaApplyTimer(0) : TDECModule(KDisplayCFactory::instance(), parent, name), iccTab(0), numberOfProfiles(0), numberOfScreens(0), m_randrsimple(0), activeProfileName(""), m_gammaApplyTimer(0)
{ {
#ifdef __TDE_HAVE_TDEHWLIB #ifdef WITH_TDEHWLIB
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices(); TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
connect(hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(deviceChanged(TDEGenericDevice*))); connect(hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(deviceChanged(TDEGenericDevice*)));
#endif #endif
@ -863,7 +867,7 @@ KDisplayConfig::~KDisplayConfig()
} }
void KDisplayConfig::deviceChanged (TDEGenericDevice* device) { void KDisplayConfig::deviceChanged (TDEGenericDevice* device) {
#ifdef __TDE_HAVE_TDEHWLIB #ifdef WITH_TDEHWLIB
if (device->type() == TDEGenericDeviceType::Monitor) { if (device->type() == TDEGenericDeviceType::Monitor) {
if (base->rescanHardware->isEnabled()) { if (base->rescanHardware->isEnabled()) {
base->rescanHardware->setEnabled(false); base->rescanHardware->setEnabled(false);

@ -21,10 +21,6 @@
#ifndef _KCM_DisplayCONFIG_H #ifndef _KCM_DisplayCONFIG_H
#define _KCM_DisplayCONFIG_H #define _KCM_DisplayCONFIG_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <tqptrlist.h> #include <tqptrlist.h>
#include <tqslider.h> #include <tqslider.h>
#include <tqworkspace.h> #include <tqworkspace.h>
@ -35,7 +31,7 @@
#include <dcopobject.h> #include <dcopobject.h>
#include <libtderandr/libtderandr.h> #include <libtderandr/libtderandr.h>
#ifdef __TDE_HAVE_TDEHWLIB #ifdef WITH_TDEHWLIB
#include <tdehardwaredevices.h> #include <tdehardwaredevices.h>
#else #else
#define TDEGenericDevice void #define TDEGenericDevice void

@ -11,6 +11,7 @@
include_directories( include_directories(
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}
${TDE_INCLUDE_DIR} ${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS} ${TQT_INCLUDE_DIRS}
) )

@ -16,6 +16,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <tqtimer.h> #include <tqtimer.h>
#include <tqimage.h> #include <tqimage.h>
#include <tqtooltip.h> #include <tqtooltip.h>
@ -92,7 +96,7 @@ KRandRSystemTray::KRandRSystemTray(TQWidget* parent, const char *name)
applyIccConfiguration(cur_profile, NULL); applyIccConfiguration(cur_profile, NULL);
} }
#ifdef __TDE_HAVE_TDEHWLIB #ifdef WITH_TDEHWLIB
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices(); TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
connect(hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(deviceChanged(TDEGenericDevice*))); connect(hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(deviceChanged(TDEGenericDevice*)));
#endif #endif
@ -888,7 +892,7 @@ void KRandRSystemTray::slotOutputChanged(int parameter)
} }
void KRandRSystemTray::deviceChanged (TDEGenericDevice* device) { void KRandRSystemTray::deviceChanged (TDEGenericDevice* device) {
#ifdef __TDE_HAVE_TDEHWLIB #ifdef WITH_TDEHWLIB
if (device->type() == TDEGenericDeviceType::Monitor) { if (device->type() == TDEGenericDeviceType::Monitor) {
KRandrPassivePopup::message( KRandrPassivePopup::message(
i18n("New display output options are available!"), i18n("New display output options are available!"),

@ -25,7 +25,7 @@
#include <kglobalaccel.h> #include <kglobalaccel.h>
#include <libtderandr/libtderandr.h> #include <libtderandr/libtderandr.h>
#ifdef __TDE_HAVE_TDEHWLIB #ifdef WITH_TDEHWLIB
#include <tdehardwaredevices.h> #include <tdehardwaredevices.h>
#else #else
#define TDEGenericDevice void #define TDEGenericDevice void

@ -21,6 +21,10 @@
******************************************************************/ ******************************************************************/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
@ -52,7 +56,7 @@
#include <kdebug.h> #include <kdebug.h>
#include <tdeglobal.h> #include <tdeglobal.h>
#include <tdeglobalsettings.h> #include <tdeglobalsettings.h>
#ifdef __TDE_HAVE_TDEHWLIB #ifdef WITH_TDEHWLIB
#include <tdehardwaredevices.h> #include <tdehardwaredevices.h>
#endif #endif
#include <kiconloader.h> #include <kiconloader.h>
@ -1366,7 +1370,7 @@ void KMenu::insertStaticExitItems()
#if defined(COMPILE_HALBACKEND) #if defined(COMPILE_HALBACKEND)
if (ksmserver.readBoolEntry( "offerShutdown", true ) && DM().canShutdown()) if (ksmserver.readBoolEntry( "offerShutdown", true ) && DM().canShutdown())
maysd = true; maysd = true;
#elif defined(__TDE_HAVE_TDEHWLIB) #elif defined(WITH_TDEHWLIB)
TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice(); TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice();
if( rootDevice ) { if( rootDevice ) {
maysd = rootDevice->canPowerOff(); maysd = rootDevice->canPowerOff();
@ -3790,7 +3794,7 @@ void KMenu::insertSuspendOption( int &nId, int &index )
"/org/freedesktop/Hal/devices/computer", "/org/freedesktop/Hal/devices/computer",
"power_management.can_hibernate", "power_management.can_hibernate",
NULL); NULL);
#elif defined(__TDE_HAVE_TDEHWLIB) // COMPILE_HALBACKEND #elif defined(WITH_TDEHWLIB) // COMPILE_HALBACKEND
TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice(); TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice();
if (rootDevice) { if (rootDevice) {
suspend_ram = rootDevice->canSuspend(); suspend_ram = rootDevice->canSuspend();
@ -3884,7 +3888,7 @@ void KMenu::slotSuspend(int id)
} }
dbus_message_unref(msg); dbus_message_unref(msg);
} }
#elif defined(__TDE_HAVE_TDEHWLIB) // COMPILE_HALBACKEND #elif defined(WITH_TDEHWLIB) // COMPILE_HALBACKEND
TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice(); TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice();
if (rootDevice) { if (rootDevice) {
if (id == 1) { if (id == 1) {

@ -598,7 +598,7 @@ KSMServer::KSMServer( const TQString& windowManager, const TQString& windowManag
clientInteracting = 0; clientInteracting = 0;
xonCommand = config->readEntry( "xonCommand", "xon" ); xonCommand = config->readEntry( "xonCommand", "xon" );
#ifdef __TDE_HAVE_TDEHWLIB #ifdef WITH_TDEHWLIB
hwDevices = TDEGlobal::hardwareDevices(); hwDevices = TDEGlobal::hardwareDevices();
#endif #endif
@ -722,7 +722,7 @@ void KSMServer::cleanUp()
DM().shutdown( shutdownType, shutdownMode, bootOption ); DM().shutdown( shutdownType, shutdownMode, bootOption );
} }
else { else {
#ifdef __TDE_HAVE_TDEHWLIB #ifdef WITH_TDEHWLIB
TDERootSystemDevice* rootDevice = hwDevices->rootSystemDevice(); TDERootSystemDevice* rootDevice = hwDevices->rootSystemDevice();
if (rootDevice) { if (rootDevice) {
if (shutdownType == TDEApplication::ShutdownTypeHalt) { if (shutdownType == TDEApplication::ShutdownTypeHalt) {

@ -23,7 +23,7 @@ Copyright (C) 2000 Matthias Ettrich <ettrich@kde.org>
#include <tqtimer.h> #include <tqtimer.h>
#include <dcopobject.h> #include <dcopobject.h>
#ifdef __TDE_HAVE_TDEHWLIB #ifdef WITH_TDEHWLIB
#include <tdehardwaredevices.h> #include <tdehardwaredevices.h>
#endif #endif
@ -253,7 +253,7 @@ private:
WindowMap legacyWindows; WindowMap legacyWindows;
#ifdef __TDE_HAVE_TDEHWLIB #ifdef WITH_TDEHWLIB
TDEHardwareDevices* hwDevices; TDEHardwareDevices* hwDevices;
#endif #endif
int initialClientCount; int initialClientCount;

@ -152,7 +152,7 @@ bool KSMServer::checkStatus( bool &logoutConfirmed, bool &maysd, bool &mayrb,
mayrb = true; mayrb = true;
} }
else { else {
#ifdef __TDE_HAVE_TDEHWLIB #ifdef WITH_TDEHWLIB
TDERootSystemDevice* rootDevice = hwDevices->rootSystemDevice(); TDERootSystemDevice* rootDevice = hwDevices->rootSystemDevice();
if (rootDevice) { if (rootDevice) {
if (rootDevice->canPowerOff()) { if (rootDevice->canPowerOff()) {
@ -241,7 +241,7 @@ void KSMServer::shutdownInternal( TDEApplication::ShutdownConfirm confirm,
// If this is not done the desktop of the locked session will be shown after suspend/hibernate until the lock fully engages! // If this is not done the desktop of the locked session will be shown after suspend/hibernate until the lock fully engages!
kapp->dcopClient()->call("kdesktop", "KScreensaverIface", "lock()", TQCString(""), replyType, replyData); kapp->dcopClient()->call("kdesktop", "KScreensaverIface", "lock()", TQCString(""), replyType, replyData);
} }
#ifdef __TDE_HAVE_TDEHWLIB #ifdef WITH_TDEHWLIB
TDERootSystemDevice* rootDevice = hwDevices->rootSystemDevice(); TDERootSystemDevice* rootDevice = hwDevices->rootSystemDevice();
if (rootDevice) { if (rootDevice) {
if (selection == 1) { // Suspend if (selection == 1) { // Suspend

@ -6,6 +6,10 @@ Copyright (C) 2010 Timothy Pearson <kb9vqf@pearsoncomputing.net>
Copyright (C) 2000 Matthias Ettrich <ettrich@kde.org> Copyright (C) 2000 Matthias Ettrich <ettrich@kde.org>
******************************************************************/ ******************************************************************/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "shutdowndlg.h" #include "shutdowndlg.h"
#include <tqapplication.h> #include <tqapplication.h>
@ -33,7 +37,7 @@ Copyright (C) 2000 Matthias Ettrich <ettrich@kde.org>
#include <tdelocale.h> #include <tdelocale.h>
#include <tdeconfig.h> #include <tdeconfig.h>
#include <tdeapplication.h> #include <tdeapplication.h>
#ifdef __TDE_HAVE_TDEHWLIB #ifdef WITH_TDEHWLIB
#include <tdehardwaredevices.h> #include <tdehardwaredevices.h>
#endif #endif
#include <kdebug.h> #include <kdebug.h>
@ -866,7 +870,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
canHibernate = true; canHibernate = true;
} }
} }
#elif defined(__TDE_HAVE_TDEHWLIB) // COMPILE_HALBACKEND #elif defined(WITH_TDEHWLIB) // COMPILE_HALBACKEND
TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice(); TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice();
if (rootDevice) { if (rootDevice) {
canFreeze = rootDevice->canFreeze(); canFreeze = rootDevice->canFreeze();

@ -14,6 +14,7 @@ include_directories(
${CMAKE_BINARY_DIR}/tdeioslave/media/libmediacommon ${CMAKE_BINARY_DIR}/tdeioslave/media/libmediacommon
${CMAKE_SOURCE_DIR}/tdeioslave/media/libmediacommon ${CMAKE_SOURCE_DIR}/tdeioslave/media/libmediacommon
${CMAKE_SOURCE_DIR}/tdmlib ${CMAKE_SOURCE_DIR}/tdmlib
${CMAKE_BINARY_DIR}
${TDE_INCLUDE_DIR} ${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS} ${TQT_INCLUDE_DIRS}
) )

@ -17,6 +17,10 @@
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "notificationdialog.h" #include "notificationdialog.h"
#include <tqlayout.h> #include <tqlayout.h>
@ -28,7 +32,7 @@
#include <tqlabel.h> #include <tqlabel.h>
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
#ifdef __TDE_HAVE_TDEHWLIB #ifdef WITH_TDEHWLIB
#include <tdehardwaredevices.h> #include <tdehardwaredevices.h>
#endif #endif

@ -12,6 +12,7 @@
include_directories( include_directories(
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_SOURCE_DIR}/tdeioslave/media/libmediacommon ${CMAKE_SOURCE_DIR}/tdeioslave/media/libmediacommon
${CMAKE_BINARY_DIR}
${TDE_INCLUDE_DIR} ${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS} ${TQT_INCLUDE_DIRS}
) )

@ -19,6 +19,10 @@
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <tdecmdlineargs.h> #include <tdecmdlineargs.h>
#include <tdelocale.h> #include <tdelocale.h>
#include <tdeapplication.h> #include <tdeapplication.h>
@ -33,7 +37,7 @@
#include <kprocess.h> #include <kprocess.h>
#include <tdestartupinfo.h> #include <tdestartupinfo.h>
#include <kmimetype.h> #include <kmimetype.h>
#ifdef __TDE_HAVE_TDEHWLIB #ifdef WITH_TDEHWLIB
#include <tdehardwaredevices.h> #include <tdehardwaredevices.h>
#endif #endif
@ -189,7 +193,7 @@ MountHelper::MountHelper() : TDEApplication()
void MountHelper::invokeEject(const TQString &device, bool quiet) void MountHelper::invokeEject(const TQString &device, bool quiet)
{ {
#ifdef __TDE_HAVE_TDEHWLIB #ifdef WITH_TDEHWLIB
// Try TDE HW library eject first... // Try TDE HW library eject first...
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices(); TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
TDEGenericDevice *hwdevice = hwdevices->findByDeviceNode(device); TDEGenericDevice *hwdevice = hwdevices->findByDeviceNode(device);

@ -122,14 +122,14 @@ void GreeterApp::init()
startTimer( pingInterval * 60000 ); startTimer( pingInterval * 60000 );
} }
#ifdef __TDE_HAVE_TDEHWLIB #ifdef WITH_TDEHWLIB
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices(); TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
connect(hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(deviceChanged(TDEGenericDevice*))); connect(hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(deviceChanged(TDEGenericDevice*)));
#endif #endif
} }
void GreeterApp::deviceChanged(TDEGenericDevice* device) { void GreeterApp::deviceChanged(TDEGenericDevice* device) {
#ifdef __TDE_HAVE_TDEHWLIB #ifdef WITH_TDEHWLIB
#ifdef WITH_XRANDR #ifdef WITH_XRANDR
if (device->type() == TDEGenericDeviceType::Monitor) { if (device->type() == TDEGenericDeviceType::Monitor) {
KRandrSimpleAPI *randrsimple = new KRandrSimpleAPI(); KRandrSimpleAPI *randrsimple = new KRandrSimpleAPI();
@ -137,7 +137,7 @@ void GreeterApp::deviceChanged(TDEGenericDevice* device) {
delete randrsimple; delete randrsimple;
} }
#endif // WITH_XRANDR #endif // WITH_XRANDR
#endif // __TDE_HAVE_TDEHWLIB #endif // WITH_TDEHWLIB
} }
void void

@ -27,7 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define KGAPP_H #define KGAPP_H
#include <tdeapplication.h> #include <tdeapplication.h>
#ifdef __TDE_HAVE_TDEHWLIB #ifdef WITH_TDEHWLIB
#include <tdehardwaredevices.h> #include <tdehardwaredevices.h>
#else #else
#define TDEGenericDevice void #define TDEGenericDevice void

Loading…
Cancel
Save