summaryrefslogtreecommitdiffstats
path: root/tdecore
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-07-11 14:14:04 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-07-12 17:55:25 +0900
commit1e1cb981d39c663091ce0089f3ed66b5db2238da (patch)
tree7ecbebcd7bcb70770dc4613424acbe17b034b01f /tdecore
parent2e76346c68e5c1db6b6058014c024bb70fec5e34 (diff)
downloadtdelibs-1e1cb981d39c663091ce0089f3ed66b5db2238da.tar.gz
tdelibs-1e1cb981d39c663091ce0089f3ed66b5db2238da.zip
Rename ksimpleconfig.{h,cpp} to tdesimpleconfig.{h.cpp}.
Add temporary ksimpleconfig.h to keep things building. This is a change of API/ABI. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tdecore')
-rw-r--r--tdecore/CMakeLists.txt4
-rw-r--r--tdecore/DESIGN.tdeconfig4
-rw-r--r--tdecore/KCONFIG_DESIGN2
-rw-r--r--tdecore/MAINTAINERS2
-rw-r--r--tdecore/Makefile.am4
-rw-r--r--tdecore/kiconloader.cpp2
-rw-r--r--tdecore/kicontheme.cpp4
-rw-r--r--tdecore/kprotocolinfo_tdecore.cpp4
-rw-r--r--tdecore/ksimpleconfig.h82
-rw-r--r--tdecore/tdeapplication.cpp2
-rw-r--r--tdecore/tdeconfig.h2
-rw-r--r--tdecore/tdeconfig_compiler/tdeconfig_compiler.cpp4
-rw-r--r--tdecore/tdeconfigbase.h14
-rw-r--r--tdecore/tdeglobalsettings.cpp2
-rw-r--r--tdecore/tdelocale.cpp6
-rw-r--r--tdecore/tdeshortcut.cpp2
-rw-r--r--tdecore/tdesimpleconfig.cpp (renamed from tdecore/ksimpleconfig.cpp)22
-rw-r--r--tdecore/tdesimpleconfig.h81
-rw-r--r--tdecore/tdestandarddirs.cpp4
-rw-r--r--tdecore/tests/CMakeLists.txt8
-rw-r--r--tdecore/tests/Makefile.am4
-rw-r--r--tdecore/tests/tdeconfigtestgui.cpp2
-rw-r--r--tdecore/tests/tdeconfigtestgui.h2
-rw-r--r--tdecore/tests/tdesimpleconfigtest.cpp (renamed from tdecore/tests/ksimpleconfigtest.cpp)12
24 files changed, 139 insertions, 136 deletions
diff --git a/tdecore/CMakeLists.txt b/tdecore/CMakeLists.txt
index 8528c4c01..d25a06577 100644
--- a/tdecore/CMakeLists.txt
+++ b/tdecore/CMakeLists.txt
@@ -49,7 +49,7 @@ link_directories(
##### headers ###################################
install( FILES
- tdeconfig.h tdeconfigskeleton.h tdeconfigdata.h ksimpleconfig.h
+ tdeconfig.h tdeconfigskeleton.h tdeconfigdata.h tdesimpleconfig.h ksimpleconfig.h
tdeconfigdialogmanager.h tdeconfigbase.h kdesktopfile.h
kurl.h ksock.h tdeaboutdata.h tdecmdlineargs.h tdeconfigbackend.h
tdeapplication.h tdeuniqueapplication.h
@@ -106,7 +106,7 @@ set( target tdecore )
set( ${target}_SRCS
libintl.cpp tdeapplication.cpp kdebug.cpp netwm.cpp
- tdeconfigbase.cpp tdeconfig.cpp ksimpleconfig.cpp tdeconfigbackend.cpp
+ tdeconfigbase.cpp tdeconfig.cpp tdesimpleconfig.cpp tdeconfigbackend.cpp
kmanagerselection.cpp kdesktopfile.cpp tdestandarddirs.cpp
ksock.cpp kpty.cpp tdeprocess.cpp tdeprocctrl.cpp tdelocale.cpp
krfcdate.cpp kiconeffect.cpp kicontheme.cpp kiconloader.cpp
diff --git a/tdecore/DESIGN.tdeconfig b/tdecore/DESIGN.tdeconfig
index ef8c40546..1a3645051 100644
--- a/tdecore/DESIGN.tdeconfig
+++ b/tdecore/DESIGN.tdeconfig
@@ -176,7 +176,7 @@ Class overview
TDEConfigBackend <-----> TDEConfig <------> TDEConfigSkeleton /--< myapp.kcfg
| | | /
v v |*---------------<
-TDEConfigINIBackend KSimpleConfig |tdeconfig_compiler \
+TDEConfigINIBackend TDESimpleConfig |tdeconfig_compiler \
| \--< myconfig.kcfg-codegen
v
MyConfig <-----TDEConfigDialogManager----> MyConfigWidget *---< myconfigwidget.ui
@@ -187,7 +187,7 @@ TDEConfigBase: defines API for generic config class
TDEConfig: functional generic config class that supports merging of cascaded
configuration files
-KSimpleConfig: functional generic config class without support for cascading
+TDESimpleConfig: functional generic config class without support for cascading
configuration files.
TDEConfigBackend: defines API for config backend, t.i. the actual handling
diff --git a/tdecore/KCONFIG_DESIGN b/tdecore/KCONFIG_DESIGN
index d0fa141ff..83b6bf2d4 100644
--- a/tdecore/KCONFIG_DESIGN
+++ b/tdecore/KCONFIG_DESIGN
@@ -30,7 +30,7 @@ reads/writes the standard windows INI-style configuration files that
KDE has used since KDE 1.x days. However, it is conceivable that one
might program an XML backend, or even a database/registry style
backend. Again, this abstract data type approach provides flexibility
-for the future. Currently TDEConfig and KSimpleConfig hardcode that
+for the future. Currently TDEConfig and TDESimpleConfig hardcode that
they are using a TDEConfigINIBackEnd in the constructor. If more back
ends are implemented, this will have to be changed to use a factory
method of some sort to create the backend; all they maintain is a
diff --git a/tdecore/MAINTAINERS b/tdecore/MAINTAINERS
index fef36b95d..7e8da86be 100644
--- a/tdecore/MAINTAINERS
+++ b/tdecore/MAINTAINERS
@@ -57,7 +57,7 @@ krfcdate.cpp Waldo Bastian <bastian@kde.org>
krootprop.cpp Lubos Lunak <l.lunak@kde.org>
ksavefile.cpp Waldo Bastian <bastian@kde.org>
tdeshortcut.cpp Ellis Whitehead <ellis@kde.org>
-ksimpleconfig.cpp Waldo Bastian <bastian@kde.org>
+tdesimpleconfig.cpp Waldo Bastian <bastian@kde.org>
ksocks.cpp
tdestandarddirs.cpp Waldo Bastian <bastian@kde.org>
tdestartupinfo.cpp Lubos Lunak <l.lunak@kde.org>
diff --git a/tdecore/Makefile.am b/tdecore/Makefile.am
index b3772b1c7..2982e24ae 100644
--- a/tdecore/Makefile.am
+++ b/tdecore/Makefile.am
@@ -37,7 +37,7 @@ lib_LTLIBRARIES = libtdefakes.la libtdecore.la
lib_LIBRARIES = libtdefakes_nonpic.a libtdefakes_pic.a
include_HEADERS = tdeconfig.h tdeconfigskeleton.h \
- tdeconfigdata.h ksimpleconfig.h tdeconfigdialogmanager.h \
+ tdeconfigdata.h tdesimpleconfig.h ksimpleconfig.h tdeconfigdialogmanager.h \
tdeconfigbase.h kdesktopfile.h kurl.h ksock.h tdeaboutdata.h \
tdecmdlineargs.h tdeconfigbackend.h tdeapplication.h \
tdeuniqueapplication.h kcharsets.h tdeversion.h kpty.h tdeprocess.h \
@@ -90,7 +90,7 @@ noinst_HEADERS = tdeaccelaction.h tdeaccelbase.h tdeaccelprivate.h kckey.h \
kprotocolinfofactory.h kqiodevicegzip_p.h kiconloader_p.h
libtdecore_la_SOURCES = libintl.cpp tdeapplication.cpp \
- kdebug.cpp netwm.cpp tdeconfigbase.cpp tdeconfig.cpp ksimpleconfig.cpp \
+ kdebug.cpp netwm.cpp tdeconfigbase.cpp tdeconfig.cpp tdesimpleconfig.cpp \
tdeconfigbackend.cpp kmanagerselection.cpp kdesktopfile.cpp \
tdestandarddirs.cpp ksock.cpp kpty.cpp tdeprocess.cpp tdeprocctrl.cpp \
tdelocale.cpp krfcdate.cpp kiconeffect.cpp kicontheme.cpp \
diff --git a/tdecore/kiconloader.cpp b/tdecore/kiconloader.cpp
index 8c56990d8..177e3d781 100644
--- a/tdecore/kiconloader.cpp
+++ b/tdecore/kiconloader.cpp
@@ -32,7 +32,7 @@
#include <tdestandarddirs.h>
#include <tdeglobal.h>
#include <tdeconfig.h>
-#include <ksimpleconfig.h>
+#include <tdesimpleconfig.h>
#include <kinstance.h>
#include <kicontheme.h>
diff --git a/tdecore/kicontheme.cpp b/tdecore/kicontheme.cpp
index f0793f2c1..7c2c34aa1 100644
--- a/tdecore/kicontheme.cpp
+++ b/tdecore/kicontheme.cpp
@@ -32,7 +32,7 @@
#include <tdestandarddirs.h>
#include <tdeglobal.h>
#include <tdeconfig.h>
-#include <ksimpleconfig.h>
+#include <tdesimpleconfig.h>
#include <kinstance.h>
#include "kicontheme.h"
@@ -140,7 +140,7 @@ TDEIconTheme::TDEIconTheme(const TQString& name, const TQString& appName)
// Need to keep a ref to it to make this useful
d->sharedConfig = TDESharedConfig::openConfig( fileName, true /*readonly*/, false /*useKDEGlobals*/ );
TDEConfig& cfg = *d->sharedConfig;
- //was: KSimpleConfig cfg(fileName);
+ //was: TDESimpleConfig cfg(fileName);
cfg.setGroup(mainSection);
mName = cfg.readEntry("Name");
diff --git a/tdecore/kprotocolinfo_tdecore.cpp b/tdecore/kprotocolinfo_tdecore.cpp
index 3d08cccd5..482181784 100644
--- a/tdecore/kprotocolinfo_tdecore.cpp
+++ b/tdecore/kprotocolinfo_tdecore.cpp
@@ -29,7 +29,7 @@
#include <tdeglobal.h>
#include <tdeapplication.h>
#include <kdebug.h>
-#include <ksimpleconfig.h>
+#include <tdesimpleconfig.h>
#include <tdeconfig.h>
#include <kstringhandler.h>
@@ -58,7 +58,7 @@ KProtocolInfo::KProtocolInfo(const TQString &path)
d = new KProtocolInfoPrivate;
TQString fullPath = locate("services", path);
- KSimpleConfig config( fullPath, true );
+ TDESimpleConfig config( fullPath, true );
config.setGroup( "Protocol" );
m_name = config.readEntry( "protocol" );
diff --git a/tdecore/ksimpleconfig.h b/tdecore/ksimpleconfig.h
index 0ef703208..b0ff7fbdb 100644
--- a/tdecore/ksimpleconfig.h
+++ b/tdecore/ksimpleconfig.h
@@ -1,81 +1,3 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1997 Matthias Kalle Dalheimer (kalle@kde.org)
- Copyright (c) 1999 Preston Brown <pbrown@kde.org>
+#include <tdesimpleconfig.h>
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-#ifndef _KSIMPLECONFIG_H
-#define _KSIMPLECONFIG_H
-
-#include "tdeconfig.h"
-
-class KSimpleConfigPrivate;
-
-/**
- * KDE Configuration entries
- *
- * This is a trivial extension of TDEConfig for applications that need
- * only one configuration file and no default system.
- * A difference with TDEConfig is that when the data in memory is written back
- * it is not merged with what is on disk.
- * Whatever is in memory simply replaces what is on disk entirely.
- *
- * @author Kalle Dalheimer <kalle@kde.org>, Preston Brown <pbrown@kde.org>
- * @see TDEConfigBase TDEConfig
- * @short KDE Configuration Management class with deletion ability
- */
-class TDECORE_EXPORT KSimpleConfig : public TDEConfig
-{
- TQ_OBJECT
-
-public:
- /**
- * Construct a KSimpleConfig object and make it either read-write
- * or read-only.
- *
- * @param fileName The file used for saving the config data. Either
- * a full path can be specified or just the filename.
- * If only a filename is specified, the default
- * directory for "config" files is used.
- * @param bReadOnly Whether the object should be read-only.
- */
- KSimpleConfig( const TQString &fileName, bool bReadOnly = false);
-
- KSimpleConfig(TDEConfigBackEnd *backEnd, bool bReadOnly = false);
-
- /**
- * Destructor.
- *
- * Writes back any dirty configuration entries.
- */
- virtual ~KSimpleConfig();
-
- virtual void sync();
-
-private:
-
- // copy-construction and assignment are not allowed
- KSimpleConfig( const KSimpleConfig& );
- KSimpleConfig& operator= ( const KSimpleConfig& rConfig );
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- KSimpleConfigPrivate *d;
-};
-
-#endif
+#define KSimpleConfig TDESimpleConfig
diff --git a/tdecore/tdeapplication.cpp b/tdecore/tdeapplication.cpp
index bd410e4d5..4b5b427f3 100644
--- a/tdecore/tdeapplication.cpp
+++ b/tdecore/tdeapplication.cpp
@@ -76,7 +76,7 @@
#include <kiconloader.h>
#include <kclipboard.h>
#include <tdeconfig.h>
-#include <ksimpleconfig.h>
+#include <tdesimpleconfig.h>
#include <tdecmdlineargs.h>
#include <tdeaboutdata.h>
#include <tdeglobalsettings.h>
diff --git a/tdecore/tdeconfig.h b/tdecore/tdeconfig.h
index 0c23525af..7d535e38b 100644
--- a/tdecore/tdeconfig.h
+++ b/tdecore/tdeconfig.h
@@ -37,7 +37,7 @@ class TDEConfigPrivate;
* This class implements KDE's default configuration system.
*
* @author Kalle Dalheimer <kalle@kde.org>, Preston Brown <pbrown@kde.org>
-* @see TDEGlobal::config(), TDEConfigBase, KSimpleConfig
+* @see TDEGlobal::config(), TDEConfigBase, TDESimpleConfig
* @short KDE Configuration Management class
*/
class TDECORE_EXPORT TDEConfig : public TDEConfigBase
diff --git a/tdecore/tdeconfig_compiler/tdeconfig_compiler.cpp b/tdecore/tdeconfig_compiler/tdeconfig_compiler.cpp
index ec4b16b96..a4f4bc9c0 100644
--- a/tdecore/tdeconfig_compiler/tdeconfig_compiler.cpp
+++ b/tdecore/tdeconfig_compiler/tdeconfig_compiler.cpp
@@ -33,7 +33,7 @@
#include <tdecmdlineargs.h>
#include <tdeglobal.h>
#include <tdeconfig.h>
-#include <ksimpleconfig.h>
+#include <tdesimpleconfig.h>
#include <tdestandarddirs.h>
#include <iostream>
@@ -994,7 +994,7 @@ int main( int argc, char **argv )
TQString baseName = args->url( 1 ).fileName();
baseName = baseName.left(baseName.length() - 6);
- KSimpleConfig codegenConfig( codegenFilename, true );
+ TDESimpleConfig codegenConfig( codegenFilename, true );
TQString nameSpace = codegenConfig.readEntry("NameSpace");
TQString className = codegenConfig.readEntry("ClassName");
diff --git a/tdecore/tdeconfigbase.h b/tdecore/tdeconfigbase.h
index 43a8e281e..d05064e73 100644
--- a/tdecore/tdeconfigbase.h
+++ b/tdecore/tdeconfigbase.h
@@ -45,7 +45,7 @@ class TDEConfigGroup;
* This class forms the base for all %KDE configuration. It is an
* abstract base class, meaning that you cannot directly instantiate
* objects of this class. Either use TDEConfig (for usual %KDE
- * configuration) or KSimpleConfig (for special needs as in ksamba), or
+ * configuration) or TDESimpleConfig (for special needs as in ksamba), or
* even TDESharedConfig (stores values in shared memory).
*
* All configuration entries are key, value pairs. Each entry also
@@ -64,7 +64,7 @@ class TDEConfigGroup;
* @author Kalle Dalheimer <kalle@kde.org>, Preston Brown <pbrown@kde.org>
* @see TDEGlobal#config()
* @see TDEConfig
- * @see KSimpleConfig
+ * @see TDESimpleConfig
* @see TDESharedConfig
*/
class TDECORE_EXPORT TDEConfigBase : public TQObject
@@ -2025,7 +2025,7 @@ protected:
bool bDirty;
bool bLocaleInitialized;
- bool bReadOnly; // currently only used by KSimpleConfig
+ bool bReadOnly; // currently only used by TDESimpleConfig
mutable bool bExpand; // whether dollar expansion is used
protected:
@@ -2044,11 +2044,11 @@ private:
class TDEConfigGroupSaverPrivate;
/**
- * Helper class to facilitate working with TDEConfig / KSimpleConfig
+ * Helper class to facilitate working with TDEConfig / TDESimpleConfig
* groups.
*
* Careful programmers always set the group of a
- * TDEConfig KSimpleConfig object to the group they want to read from
+ * TDEConfig TDESimpleConfig object to the group they want to read from
* and set it back to the old one of afterwards. This is usually
* written as:
* \code
@@ -2075,8 +2075,8 @@ class TDEConfigGroupSaverPrivate;
* way.
*
* @author Matthias Kalle Dalheimer <kalle@kde.org>
- * @see TDEConfigBase, TDEConfig, KSimpleConfig, TDEConfigGroup
- * @short Helper class for easier use of TDEConfig/KSimpleConfig groups
+ * @see TDEConfigBase, TDEConfig, TDESimpleConfig, TDEConfigGroup
+ * @short Helper class for easier use of TDEConfig/TDESimpleConfig groups
*/
class TDECORE_EXPORT TDEConfigGroupSaver // KDE4 remove
diff --git a/tdecore/tdeglobalsettings.cpp b/tdecore/tdeglobalsettings.cpp
index 526970e1c..f03b4d9a5 100644
--- a/tdecore/tdeglobalsettings.cpp
+++ b/tdecore/tdeglobalsettings.cpp
@@ -24,7 +24,7 @@
#include <tqcursor.h>
#include <tdeconfig.h>
-#include <ksimpleconfig.h>
+#include <tdesimpleconfig.h>
#include <tdeapplication.h>
#include <kipc.h>
diff --git a/tdecore/tdelocale.cpp b/tdecore/tdelocale.cpp
index 07f3eea21..53e85de22 100644
--- a/tdecore/tdelocale.cpp
+++ b/tdecore/tdelocale.cpp
@@ -34,7 +34,7 @@
#include "kcatalogue.h"
#include "tdeglobal.h"
#include "tdestandarddirs.h"
-#include "ksimpleconfig.h"
+#include "tdesimpleconfig.h"
#include "kinstance.h"
#include "tdeconfig.h"
#include "kdebug.h"
@@ -310,7 +310,7 @@ void TDELocale::initFormat()
TDEConfigGroupSaver saver(config, "Locale");
- KSimpleConfig entry(locate("locale",
+ TDESimpleConfig entry(locate("locale",
TQString::fromLatin1("l10n/%1/entry.desktop")
.arg(m_country)), true);
entry.setGroup("KCM Locale");
@@ -370,7 +370,7 @@ void TDELocale::initFormat()
//Grammatical
//Precedence here is l10n / i18n / config file
- KSimpleConfig language(locate("locale",
+ TDESimpleConfig language(locate("locale",
TQString::fromLatin1("%1/entry.desktop")
.arg(m_language)), true);
language.setGroup("KCM Locale");
diff --git a/tdecore/tdeshortcut.cpp b/tdecore/tdeshortcut.cpp
index e3c82ce7e..e4337163f 100644
--- a/tdecore/tdeshortcut.cpp
+++ b/tdecore/tdeshortcut.cpp
@@ -27,7 +27,7 @@
#include <kdebug.h>
#include <tdeglobal.h>
#include <tdelocale.h>
-#include <ksimpleconfig.h>
+#include <tdesimpleconfig.h>
//----------------------------------------------------
diff --git a/tdecore/ksimpleconfig.cpp b/tdecore/tdesimpleconfig.cpp
index 26a201f85..15638dd65 100644
--- a/tdecore/ksimpleconfig.cpp
+++ b/tdecore/tdesimpleconfig.cpp
@@ -35,13 +35,13 @@
#include "tdestandarddirs.h"
#include "tdeconfigbackend.h"
-#include "ksimpleconfig.h"
+#include "tdesimpleconfig.h"
-KSimpleConfig::KSimpleConfig(const TQString &fileName, bool bReadOnly)
+TDESimpleConfig::TDESimpleConfig(const TQString &fileName, bool bReadOnly)
: TDEConfig(TQString::fromLatin1(""), bReadOnly, false)
{
- // the difference between TDEConfig and KSimpleConfig is just that
- // for KSimpleConfig an absolute filename is guaranteed
+ // the difference between TDEConfig and TDESimpleConfig is just that
+ // for TDESimpleConfig an absolute filename is guaranteed
if (!fileName.isNull() && TQDir::isRelativePath(fileName)) {
backEnd->changeFileName( TDEGlobal::dirs()->
saveLocation("config", TQString::null, !bReadOnly)+fileName, "config", false);
@@ -52,20 +52,20 @@ KSimpleConfig::KSimpleConfig(const TQString &fileName, bool bReadOnly)
reparseConfiguration();
}
-KSimpleConfig::KSimpleConfig(TDEConfigBackEnd *backEnd, bool bReadOnly)
+TDESimpleConfig::TDESimpleConfig(TDEConfigBackEnd *backEnd, bool bReadOnly)
: TDEConfig(backEnd, bReadOnly)
{}
-KSimpleConfig::~KSimpleConfig()
+TDESimpleConfig::~TDESimpleConfig()
{
- // we need to call the KSimpleConfig version of sync. Relying on the
- // regular TDEConfig sync is bad, because the KSimpleConfig sync has
+ // we need to call the TDESimpleConfig version of sync. Relying on the
+ // regular TDEConfig sync is bad, because the TDESimpleConfig sync has
// different behavior. Syncing here will insure that the sync() call
// in the TDEConfig destructor doesn't actually do anything.
sync();
}
-void KSimpleConfig::sync()
+void TDESimpleConfig::sync()
{
if (isReadOnly())
return;
@@ -75,7 +75,7 @@ void KSimpleConfig::sync()
rollback();
}
-void KSimpleConfig::virtual_hook( int id, void* data )
+void TDESimpleConfig::virtual_hook( int id, void* data )
{ TDEConfig::virtual_hook( id, data ); }
-#include "ksimpleconfig.moc"
+#include "tdesimpleconfig.moc"
diff --git a/tdecore/tdesimpleconfig.h b/tdecore/tdesimpleconfig.h
new file mode 100644
index 000000000..ec3e552b8
--- /dev/null
+++ b/tdecore/tdesimpleconfig.h
@@ -0,0 +1,81 @@
+/* This file is part of the KDE libraries
+ Copyright (C) 1997 Matthias Kalle Dalheimer (kalle@kde.org)
+ Copyright (c) 1999 Preston Brown <pbrown@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _TDESIMPLECONFIG_H
+#define _TDESIMPLECONFIG_H
+
+#include "tdeconfig.h"
+
+class TDESimpleConfigPrivate;
+
+/**
+ * KDE Configuration entries
+ *
+ * This is a trivial extension of TDEConfig for applications that need
+ * only one configuration file and no default system.
+ * A difference with TDEConfig is that when the data in memory is written back
+ * it is not merged with what is on disk.
+ * Whatever is in memory simply replaces what is on disk entirely.
+ *
+ * @author Kalle Dalheimer <kalle@kde.org>, Preston Brown <pbrown@kde.org>
+ * @see TDEConfigBase TDEConfig
+ * @short KDE Configuration Management class with deletion ability
+ */
+class TDECORE_EXPORT TDESimpleConfig : public TDEConfig
+{
+ TQ_OBJECT
+
+public:
+ /**
+ * Construct a TDESimpleConfig object and make it either read-write
+ * or read-only.
+ *
+ * @param fileName The file used for saving the config data. Either
+ * a full path can be specified or just the filename.
+ * If only a filename is specified, the default
+ * directory for "config" files is used.
+ * @param bReadOnly Whether the object should be read-only.
+ */
+ TDESimpleConfig( const TQString &fileName, bool bReadOnly = false);
+
+ TDESimpleConfig(TDEConfigBackEnd *backEnd, bool bReadOnly = false);
+
+ /**
+ * Destructor.
+ *
+ * Writes back any dirty configuration entries.
+ */
+ virtual ~TDESimpleConfig();
+
+ virtual void sync();
+
+private:
+
+ // copy-construction and assignment are not allowed
+ TDESimpleConfig( const TDESimpleConfig& );
+ TDESimpleConfig& operator= ( const TDESimpleConfig& rConfig );
+
+protected:
+ virtual void virtual_hook( int id, void* data );
+private:
+ TDESimpleConfigPrivate *d;
+};
+
+#endif
diff --git a/tdecore/tdestandarddirs.cpp b/tdecore/tdestandarddirs.cpp
index 89889367a..ac827c883 100644
--- a/tdecore/tdestandarddirs.cpp
+++ b/tdecore/tdestandarddirs.cpp
@@ -50,7 +50,7 @@
#include "tdeconfig.h"
#include "kinstance.h"
#include "kshell.h"
-#include "ksimpleconfig.h"
+#include "tdesimpleconfig.h"
#include "kuser.h"
#include "kstaticdeleter.h"
#include <kde_file.h>
@@ -1487,7 +1487,7 @@ static TQStringList lookupProfiles(const TQString &mapFile)
gid_t sup_gids[512];
int sup_gids_nr = getgroups(512, sup_gids);
- KSimpleConfig mapCfg(mapFile, true);
+ TDESimpleConfig mapCfg(mapFile, true);
mapCfg.setGroup("Users");
if (mapCfg.hasKey(user.data()))
{
diff --git a/tdecore/tests/CMakeLists.txt b/tdecore/tests/CMakeLists.txt
index 19b1fa9d3..2cabe1866 100644
--- a/tdecore/tests/CMakeLists.txt
+++ b/tdecore/tests/CMakeLists.txt
@@ -34,10 +34,10 @@ set( AUTOMATED_CHECKS
kcharsetstest kglobaltest kmacroexpandertest krfcdatetest
kstringhandlertest kurltest tdestdacceltest
- # cplusplustest # -- skip (doesn't error on errors)
- # ksimpleconfigtest # -- skip (doesn't error on errors)
- # ksortablevaluelist # -- skip (doesn't error on errors)
- # ksocktest # -- skip due to DNS failure
+ # cplusplustest # -- skip (doesn't error on errors)
+ # tdesimpleconfigtest # -- skip (doesn't error on errors)
+ # ksortablevaluelist # -- skip (doesn't error on errors)
+ # ksocktest # -- skip due to DNS failure
)
# Tests that require some graphical interaction / confirmation.
diff --git a/tdecore/tests/Makefile.am b/tdecore/tests/Makefile.am
index b7d4dc88e..378e442d2 100644
--- a/tdecore/tests/Makefile.am
+++ b/tdecore/tests/Makefile.am
@@ -21,7 +21,7 @@ INCLUDES = -I$(top_srcdir)/tdecore $(all_includes)
AM_LDFLAGS = $(QT_LDFLAGS) $(X_LDFLAGS) $(KDE_RPATH)
-check_PROGRAMS = tdeconfigtestgui klocaletest tdeprocesstest ksimpleconfigtest \
+check_PROGRAMS = tdeconfigtestgui klocaletest tdeprocesstest tdesimpleconfigtest \
tdestandarddirstest kurltest tdeuniqueapptest ktempfiletest krandomsequencetest \
kdebugtest ksocktest kstringhandlertest kcmdlineargstest tdeapptest \
kmemtest kidlservertest kidlclienttest dcopkonqtest kipctest \
@@ -43,7 +43,7 @@ kdebugtest_SOURCES = kdebugtest.cpp
klocaletest_SOURCES = klocaletest.cpp
#klocaletest2_SOURCES = klocaletest2.cpp tdelocale.cpp libintl.cpp kcatalogue.cpp
#kcatalogue_SOURCES = kcatalogue.cpp libintl.cpp
-ksimpleconfigtest_SOURCES = ksimpleconfigtest.cpp
+tdesimpleconfigtest_SOURCES = tdesimpleconfigtest.cpp
kurltest_SOURCES = kurltest.cpp
tdestandarddirstest_SOURCES = tdestandarddirstest.cpp
tdeprocesstest_SOURCES = tdeprocesstest.cpp
diff --git a/tdecore/tests/tdeconfigtestgui.cpp b/tdecore/tests/tdeconfigtestgui.cpp
index c785aa3b3..8db4fce3a 100644
--- a/tdecore/tests/tdeconfigtestgui.cpp
+++ b/tdecore/tests/tdeconfigtestgui.cpp
@@ -35,7 +35,7 @@
#include <tqfileinfo.h>
#include <tqdatetime.h>
#include <kdebug.h>
-#include <ksimpleconfig.h>
+#include <tdesimpleconfig.h>
#include <config.h>
// Standard Qt widgets
diff --git a/tdecore/tests/tdeconfigtestgui.h b/tdecore/tests/tdeconfigtestgui.h
index 4c3384d90..520cb79cf 100644
--- a/tdecore/tests/tdeconfigtestgui.h
+++ b/tdecore/tests/tdeconfigtestgui.h
@@ -24,7 +24,7 @@
#include <tqfile.h>
#include <tqfileinfo.h>
#include <kdebug.h>
-#include <ksimpleconfig.h>
+#include <tdesimpleconfig.h>
#include <tqtextstream.h>
// Standard Qt widgets
diff --git a/tdecore/tests/ksimpleconfigtest.cpp b/tdecore/tests/tdesimpleconfigtest.cpp
index ca91581dd..5759d8941 100644
--- a/tdecore/tests/ksimpleconfigtest.cpp
+++ b/tdecore/tests/tdesimpleconfigtest.cpp
@@ -3,9 +3,9 @@
//
// configtest.cpp: libKDEcore example
//
-// demonstrates use of KSimpleConfig class
+// demonstrates use of TDESimpleConfig class
-#include <ksimpleconfig.h>
+#include <tdesimpleconfig.h>
#include <tdeapplication.h>
#include <unistd.h>
#include <stdio.h>
@@ -22,7 +22,7 @@ int main( int argc, char **argv )
{
TDEApplication a( argc, argv, TQCString("tdeconfigtest") );
- KSimpleConfig aConfig( _PATH_TMP"/simpleconfig.cfg" );
+ TDESimpleConfig aConfig( _PATH_TMP"/simpleconfig.cfg" );
aConfig.setGroup( "Test group" );
aConfig.writeEntry( "key1", "value1" );
@@ -32,17 +32,17 @@ int main( int argc, char **argv )
aConfig.writeEntry( "akey1", "avalue1" );
aConfig.writeEntry( "akey2", "avalue2" );
- fprintf( stderr, "[ksimpleconfigtest] entries written, sleeping for 10 seconds\n" );
+ fprintf( stderr, "[tdesimpleconfigtest] entries written, sleeping for 10 seconds\n" );
aConfig.sync();
sleep( 10 );
aConfig.setGroup( "Test group" );
aConfig.deleteEntry( "key2", false );
- fprintf( stderr, "[ksimpleconfigtest] Deleted on entry from Test group, sleeping\n" );
+ fprintf( stderr, "[tdesimpleconfigtest] Deleted on entry from Test group, sleeping\n" );
aConfig.sync();
sleep( 10 );
aConfig.deleteGroup( "Another Test group", true );
- fprintf( stderr, "[ksimpleconfigtest] Deleted Another Test group\n" );
+ fprintf( stderr, "[tdesimpleconfigtest] Deleted Another Test group\n" );
}