summaryrefslogtreecommitdiffstats
path: root/tdecore/kinstance.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-03-29 17:11:06 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-03-29 17:11:06 -0500
commit22f8381c08ec2c39dbafb9d9851c2b55d94be4a8 (patch)
tree030156035a2203c377221fbf50e0ad2c9ed1f6ce /tdecore/kinstance.cpp
parent2b5fed5f0e79c29ad49b0926cf4433114abe335c (diff)
downloadtdelibs-22f8381c08ec2c39dbafb9d9851c2b55d94be4a8.tar.gz
tdelibs-22f8381c08ec2c39dbafb9d9851c2b55d94be4a8.zip
Add initial tdehardwaredevices skeleton to tdecore
Do not use the added classes yet, as the API and ABI are still under heavy construction!
Diffstat (limited to 'tdecore/kinstance.cpp')
-rw-r--r--tdecore/kinstance.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tdecore/kinstance.cpp b/tdecore/kinstance.cpp
index 3e96e0365..fe0a5152c 100644
--- a/tdecore/kinstance.cpp
+++ b/tdecore/kinstance.cpp
@@ -24,6 +24,7 @@
#include "klocale.h"
#include "kcharsets.h"
#include "kiconloader.h"
+#include "tdehardwaredevices.h"
#include "kaboutdata.h"
#include "kstandarddirs.h"
#include "kdebug.h"
@@ -70,6 +71,7 @@ KInstance::KInstance( const TQCString& name)
: _dirs (0L),
_config (0L),
_iconLoader (0L),
+ _hardwaredevices (0L),
_name( name ), _aboutData( new KAboutData( name, "", 0 ) )
{
DEBUG_ADD
@@ -88,6 +90,7 @@ KInstance::KInstance( const KAboutData * aboutData )
: _dirs (0L),
_config (0L),
_iconLoader (0L),
+ _hardwaredevices (0L),
_name( aboutData->appName() ), _aboutData( aboutData )
{
DEBUG_ADD
@@ -107,6 +110,7 @@ KInstance::KInstance( KInstance* src )
: _dirs ( src->_dirs ),
_config ( src->_config ),
_iconLoader ( src->_iconLoader ),
+ _hardwaredevices ( src->_hardwaredevices ),
_name( src->_name ), _aboutData( src->_aboutData )
{
DEBUG_ADD
@@ -125,6 +129,7 @@ KInstance::KInstance( KInstance* src )
src->_dirs = 0L;
src->_config = 0L;
src->_iconLoader = 0L;
+ src->_hardwaredevices = 0L;
src->_aboutData = 0L;
delete src;
}
@@ -143,6 +148,9 @@ KInstance::~KInstance()
delete _iconLoader;
_iconLoader = 0;
+ delete _hardwaredevices;
+ _hardwaredevices = 0;
+
// delete _config; // Do not delete, stored in d->sharedConfig
_config = 0;
delete _dirs;
@@ -247,6 +255,16 @@ KIconLoader *KInstance::iconLoader() const
return _iconLoader;
}
+TDEHardwareDevices *KInstance::hardwareDevices() const
+{
+ DEBUG_CHECK_ALIVE
+ if( _hardwaredevices == 0 ) {
+ _hardwaredevices = new TDEHardwareDevices( );
+ }
+
+ return _hardwaredevices;
+}
+
void KInstance::newIconLoader() const
{
DEBUG_CHECK_ALIVE