summaryrefslogtreecommitdiff
path: root/libopie2/opiecore
authormickeyl <mickeyl>2003-12-01 22:44:38 (UTC)
committer mickeyl <mickeyl>2003-12-01 22:44:38 (UTC)
commit7a7683d435cfbb4fa2d6ed99fd4a94d388402aec (patch) (side-by-side diff)
tree1a34de131d935f34dd2622e3606ba664a7783e24 /libopie2/opiecore
parenta4a47fca8badeca2b1aae51b39295ccdc8782c4f (diff)
downloadopie-7a7683d435cfbb4fa2d6ed99fd4a94d388402aec.zip
opie-7a7683d435cfbb4fa2d6ed99fd4a94d388402aec.tar.gz
opie-7a7683d435cfbb4fa2d6ed99fd4a94d388402aec.tar.bz2
slowly start to refactor & cleanup libopie2 before merging it with libopie1
Diffstat (limited to 'libopie2/opiecore') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/libopiecore2.control2
-rw-r--r--libopie2/opiecore/oconfig.cpp4
-rw-r--r--libopie2/opiecore/oconfig.h6
-rw-r--r--libopie2/opiecore/odebug.cpp3
-rw-r--r--libopie2/opiecore/oglobal.cpp9
-rw-r--r--libopie2/opiecore/oglobal.h18
-rw-r--r--libopie2/opiecore/oglobalsettings.cpp1
-rw-r--r--libopie2/opiecore/opiecore.pro2
8 files changed, 27 insertions, 18 deletions
diff --git a/libopie2/opiecore/libopiecore2.control b/libopie2/opiecore/libopiecore2.control
index 7dec1b9..956d24f 100644
--- a/libopie2/opiecore/libopiecore2.control
+++ b/libopie2/opiecore/libopiecore2.control
@@ -4,7 +4,7 @@ Priority: optional
Section: opie/system
Maintainer: Opie Team <opie@handhelds.org>
Architecture: arm
-Version: 1.8.1-$SUB_VERSION.2
+Version: 1.8.2-$SUB_VERSION.2
Depends: libqpe1
Provides: libopiecore2
Description: Opie library 2.0 CORE
diff --git a/libopie2/opiecore/oconfig.cpp b/libopie2/opiecore/oconfig.cpp
index dc4d0b3..fb5eabb 100644
--- a/libopie2/opiecore/oconfig.cpp
+++ b/libopie2/opiecore/oconfig.cpp
@@ -39,12 +39,14 @@
#include <opie2/oconfig.h>
OConfig::OConfig( const QString &name, Domain domain )
- :OpieConfig( name, domain )
+ :Config( name, domain )
{
+ qDebug( "OConfig::OConfig()" );
}
OConfig::~OConfig()
{
+ qDebug( "OConfig::~OConfig()" );
}
QColor OConfig::readColorEntry( const QString& key, const QColor* pDefault ) const
diff --git a/libopie2/opiecore/oconfig.h b/libopie2/opiecore/oconfig.h
index 75aa170..444d280 100644
--- a/libopie2/opiecore/oconfig.h
+++ b/libopie2/opiecore/oconfig.h
@@ -35,7 +35,7 @@
//FIXME: Implement for X11 or reuse libqpe/Config there also?
//FIXME: Or rather use QSettings also for libqpe?
-#include "opieconfig.h"
+#include <qpe/config.h>
class QColor;
class QFont;
@@ -45,7 +45,7 @@ class QFont;
* featuring additional handling of color and font entries
*/
-class OConfig : public OpieConfig
+class OConfig : public Config
{
public:
/**
@@ -63,7 +63,7 @@ class OConfig : public OpieConfig
* @returns the name of the current group.
* The current group is used for searching keys and accessing entries.
*/
- const QString& group() { return OpieConfig::group(); };
+ const QString& group() { return git.key(); };
/**
* @returns a @ref QColor entry or a @a default value if the key is not found.
*/
diff --git a/libopie2/opiecore/odebug.cpp b/libopie2/opiecore/odebug.cpp
index b2a37bc..4505ce7 100644
--- a/libopie2/opiecore/odebug.cpp
+++ b/libopie2/opiecore/odebug.cpp
@@ -1,9 +1,8 @@
/*
This file is part of the Opie Project
(C) 2003 Michael 'Mickey' Lauer (mickey@tm.informatik.uni-frankfurt.de)
- Inspired by the KDE debug classes, which are
- (C) 1997 Matthias Kalle Dalheimer (kalle@kde.org)
(C) 2002 Holger Freyther (freyther@kde.org)
+ (C) 1997 Matthias Kalle Dalheimer (kalle@kde.org)
=.
.=l.
           .>+-=
diff --git a/libopie2/opiecore/oglobal.cpp b/libopie2/opiecore/oglobal.cpp
index f6071be..ae2fcb6 100644
--- a/libopie2/opiecore/oglobal.cpp
+++ b/libopie2/opiecore/oglobal.cpp
@@ -30,7 +30,14 @@
#include <opie2/oglobal.h>
+OConfig* OGlobal::_config = 0;
+
OConfig* OGlobal::config()
{
- return globalconfig;
+ if ( !OGlobal::_config )
+ {
+ qDebug( "OGlobal::creating global configuration instance." );
+ OGlobal::_config = new OConfig( "global" );
+ }
+ return OGlobal::_config;
}
diff --git a/libopie2/opiecore/oglobal.h b/libopie2/opiecore/oglobal.h
index 23cedde..2dc4f9e 100644
--- a/libopie2/opiecore/oglobal.h
+++ b/libopie2/opiecore/oglobal.h
@@ -1,7 +1,6 @@
/*
                This file is part of the Opie Project
-
-              Copyright (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de>
+              Copyright (C) 2003 Michael 'Mickey' Lauer <mickey@Vanille.de>
=.
.=l.
           .>+-=
@@ -31,19 +30,20 @@
#ifndef OGLOBAL_H
#define OGLOBAL_H
-#include <qpe/global.h>
#include <opie2/oconfig.h>
-static OConfig *globalconfig = new OConfig( "global" );
-
-//FIXME: Is it wise or even necessary to inherit OGlobal from Global?
-// once we totally skip libqpe it should ideally swallow Global -zecke
+//FIXME Is it wise or even necessary to inherit OGlobal from Global?
+// once we totally skip libqpe it should ideally swallow Global -zecke
+// You're right. I deleted global as the base class. -mickeyl
-class OGlobal : public Global
+class OGlobal
{
public:
- // do we want to put that into OApplication as in KApplication -zecke
+ //FIXME Do we want to put that into OApplication as in KApplication? -zecke
+ // We already have a per-application config in OApplication
+ // ( accessed through oApp->config() ), but this one is the global one! -mickeyl
static OConfig* config();
+ static OConfig* _config;
};
#endif // OGLOBAL_H
diff --git a/libopie2/opiecore/oglobalsettings.cpp b/libopie2/opiecore/oglobalsettings.cpp
index 1799529..66adbd0 100644
--- a/libopie2/opiecore/oglobalsettings.cpp
+++ b/libopie2/opiecore/oglobalsettings.cpp
@@ -38,6 +38,7 @@
/* QT */
+#include <qobject.h>
#include <qdir.h>
#include <qpixmap.h>
#include <qfontinfo.h>
diff --git a/libopie2/opiecore/opiecore.pro b/libopie2/opiecore/opiecore.pro
index fe5800e..5d630ea 100644
--- a/libopie2/opiecore/opiecore.pro
+++ b/libopie2/opiecore/opiecore.pro
@@ -25,7 +25,7 @@ SOURCES = oapplication.cpp \
INTERFACES =
TARGET = opiecore2
-VERSION = 1.8.1
+VERSION = 1.8.2
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
MOC_DIR = moc