|
|
|
@ -25,6 +25,8 @@
|
|
|
|
|
#include "kcharsets.h"
|
|
|
|
|
#include "kiconloader.h"
|
|
|
|
|
#ifdef __TDE_HAVE_TDEHWLIB
|
|
|
|
|
#include "klibloader.h"
|
|
|
|
|
#include "tdeversion.h"
|
|
|
|
|
#include "tdehardwaredevices.h"
|
|
|
|
|
#include "tdenetworkconnections.h"
|
|
|
|
|
#endif
|
|
|
|
@ -286,8 +288,18 @@ TDEIconLoader *TDEInstance::iconLoader() const
|
|
|
|
|
TDEHardwareDevices *TDEInstance::hardwareDevices() const
|
|
|
|
|
{
|
|
|
|
|
DEBUG_CHECK_ALIVE
|
|
|
|
|
if( _hardwaredevices == 0 ) {
|
|
|
|
|
_hardwaredevices = new TDEHardwareDevices( );
|
|
|
|
|
if (_hardwaredevices == 0)
|
|
|
|
|
{
|
|
|
|
|
TQString libName = TQString("libtdehw.so.%1").arg(TDE_VERSION_MAJOR);
|
|
|
|
|
KLibrary *lib = KLibLoader::self()->library(libName.latin1());
|
|
|
|
|
if (lib)
|
|
|
|
|
{
|
|
|
|
|
TDEHardwareDevices* (*create)() = (TDEHardwareDevices* (*)())lib->symbol("create_tdeHardwareDevices");
|
|
|
|
|
if (create)
|
|
|
|
|
{
|
|
|
|
|
_hardwaredevices = create();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return _hardwaredevices;
|
|
|
|
@ -296,8 +308,18 @@ TDEHardwareDevices *TDEInstance::hardwareDevices() const
|
|
|
|
|
TDEGlobalNetworkManager *TDEInstance::networkManager() const
|
|
|
|
|
{
|
|
|
|
|
DEBUG_CHECK_ALIVE
|
|
|
|
|
if( _networkmanager == 0 ) {
|
|
|
|
|
_networkmanager = new TDEGlobalNetworkManager( );
|
|
|
|
|
if (_networkmanager == 0)
|
|
|
|
|
{
|
|
|
|
|
TQString libName = TQString("libtdehw.so.%1").arg(TDE_VERSION_MAJOR);
|
|
|
|
|
KLibrary *lib = KLibLoader::self()->library(libName.latin1());
|
|
|
|
|
if (lib)
|
|
|
|
|
{
|
|
|
|
|
TDEGlobalNetworkManager* (*create)() = (TDEGlobalNetworkManager* (*)())lib->symbol("create_tdeGlobalNetworkManager");
|
|
|
|
|
if (create)
|
|
|
|
|
{
|
|
|
|
|
_networkmanager = create();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return _networkmanager;
|
|
|
|
|