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>
pull/362/head
Michele Calgaro 1 week ago
parent 2e76346c68
commit 1e1cb981d3
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -19,7 +19,7 @@
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <flowsystem.h> #include <flowsystem.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdeprocess.h> #include <tdeprocess.h>
#include <tdestandarddirs.h> #include <tdestandarddirs.h>
#include <tqdir.h> #include <tqdir.h>
@ -68,7 +68,7 @@ Arts::SoundServerV2 KArtsServer::server(void)
bool x11Comm = config.readBoolEntry("X11GlobalComm", false); bool x11Comm = config.readBoolEntry("X11GlobalComm", false);
// put the value of x11Comm into .mcoprc // put the value of x11Comm into .mcoprc
KSimpleConfig X11CommConfig(TQDir::homeDirPath()+"/.mcoprc"); TDESimpleConfig X11CommConfig(TQDir::homeDirPath()+"/.mcoprc");
if(x11Comm) if(x11Comm)
X11CommConfig.writeEntry("GlobalComm", "Arts::X11GlobalComm"); X11CommConfig.writeEntry("GlobalComm", "Arts::X11GlobalComm");

@ -28,7 +28,7 @@
#include <kdcopservicestarter.h> #include <kdcopservicestarter.h>
#include <kdebug.h> #include <kdebug.h>
#include <tdemessagebox.h> #include <tdemessagebox.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <kservice.h> #include <kservice.h>
#include <kservicetype.h> #include <kservicetype.h>
@ -643,7 +643,7 @@ KIMIface_stub * KIMProxy::stubForProtocol( const TQString &protocol)
TQString KIMProxy::preferredApp() TQString KIMProxy::preferredApp()
{ {
TDEConfig *store = new KSimpleConfig( IM_CLIENT_PREFERENCES_FILE ); TDEConfig *store = new TDESimpleConfig( IM_CLIENT_PREFERENCES_FILE );
store->setGroup( IM_CLIENT_PREFERENCES_SECTION ); store->setGroup( IM_CLIENT_PREFERENCES_SECTION );
TQString preferredApp = store->readEntry( IM_CLIENT_PREFERENCES_ENTRY ); TQString preferredApp = store->readEntry( IM_CLIENT_PREFERENCES_ENTRY );
//kdDebug( 790 ) << k_funcinfo << "found preferred app: " << preferredApp << endl; //kdDebug( 790 ) << k_funcinfo << "found preferred app: " << preferredApp << endl;

@ -44,7 +44,7 @@
#include "katefactory.h" #include "katefactory.h"
#include <tdeio/job.h> #include <tdeio/job.h>
#include <tdemainwindow.h> #include <tdemainwindow.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdeglobalsettings.h> #include <tdeglobalsettings.h>
#include <tqcolor.h> #include <tqcolor.h>
@ -464,7 +464,7 @@ int main(int argc, char *argv[])
TDEApplication a; TDEApplication a;
a.disableAutoDcopRegistration(); a.disableAutoDcopRegistration();
a.setStyle("windows"); a.setStyle("windows");
KSimpleConfig cfg( "testkateregressionrc" ); TDESimpleConfig cfg( "testkateregressionrc" );
cfg.setGroup("Kate Document Defaults"); cfg.setGroup("Kate Document Defaults");
cfg.writeEntry("Basic Config Flags", cfg.writeEntry("Basic Config Flags",
KateDocumentConfig::cfBackspaceIndents KateDocumentConfig::cfBackspaceIndents
@ -492,7 +492,7 @@ int main(int argc, char *argv[])
int rv = 1; int rv = 1;
{ {
KSimpleConfig dc( "kdebugrc" ); TDESimpleConfig dc( "kdebugrc" );
// FIXME adapt to kate // FIXME adapt to kate
static int areas[] = { 1000, 13000, 13001, 13002, 13010, static int areas[] = { 1000, 13000, 13001, 13002, 13010,
13020, 13025, 13030, 13033, 13035, 13020, 13025, 13030, 13033, 13035,
@ -563,14 +563,14 @@ int main(int argc, char *argv[])
failureSnapshot = findMostRecentFailureSnapshot(); failureSnapshot = findMostRecentFailureSnapshot();
if (!failureSnapshot.isEmpty()) if (!failureSnapshot.isEmpty())
regressionTest->setFailureSnapshotConfig( regressionTest->setFailureSnapshotConfig(
new KSimpleConfig(failureSnapshotPrefix + failureSnapshot, true), new TDESimpleConfig(failureSnapshotPrefix + failureSnapshot, true),
failureSnapshot); failureSnapshot);
} }
if (args->isSet("save-failures")) { if (args->isSet("save-failures")) {
TQString failureSaver = args->getOption("save-failures"); TQString failureSaver = args->getOption("save-failures");
regressionTest->setFailureSnapshotSaver( regressionTest->setFailureSnapshotSaver(
new KSimpleConfig(failureSnapshotPrefix + failureSaver, false), new TDESimpleConfig(failureSnapshotPrefix + failureSaver, false),
failureSaver); failureSaver);
} }

@ -23,7 +23,7 @@
#include <tdeapplication.h> #include <tdeapplication.h>
#include <kdebug.h> #include <kdebug.h>
#include <tdelocale.h> #include <tdelocale.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdestandarddirs.h> #include <tdestandarddirs.h>
#include <kstaticdeleter.h> #include <kstaticdeleter.h>
@ -340,7 +340,7 @@ TQString Address::formattedAddress( const TQString &realName,
// fall back to our own country // fall back to our own country
ciso = TDEGlobal::locale()->country(); ciso = TDEGlobal::locale()->country();
} }
KSimpleConfig entry( locate( "locale", TDESimpleConfig entry( locate( "locale",
TQString( "l10n/" ) + ciso + TQString( "/entry.desktop" ) ) ); TQString( "l10n/" ) + ciso + TQString( "/entry.desktop" ) ) );
entry.setGroup( "KCM Locale" ); entry.setGroup( "KCM Locale" );
@ -368,7 +368,7 @@ TQString Address::formattedAddress( const TQString &realName,
// now add the country line if needed (formatting this time according to // now add the country line if needed (formatting this time according to
// the rules of our own system country ) // the rules of our own system country )
if ( !country().isEmpty() ) { if ( !country().isEmpty() ) {
KSimpleConfig entry( locate( "locale", TQString( "l10n/" ) TDESimpleConfig entry( locate( "locale", TQString( "l10n/" )
+ TDEGlobal::locale()->country() + TQString( "/entry.desktop" ) ) ); + TDEGlobal::locale()->country() + TQString( "/entry.desktop" ) ) );
entry.setGroup( "KCM Locale" ); entry.setGroup( "KCM Locale" );
TQString cpos = entry.readEntry( "AddressCountryPosition" ); TQString cpos = entry.readEntry( "AddressCountryPosition" );

@ -22,7 +22,7 @@
#include <tqpair.h> #include <tqpair.h>
#include <tqvaluelist.h> #include <tqvaluelist.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdestandarddirs.h> #include <tdestandarddirs.h>
#include <kdebug.h> #include <kdebug.h>
@ -185,7 +185,7 @@ TQStringList DistributionListManager::listNames()
bool DistributionListManager::load() bool DistributionListManager::load()
{ {
KSimpleConfig cfg( locateLocal( "data", "tdeabc/distlists" ) ); TDESimpleConfig cfg( locateLocal( "data", "tdeabc/distlists" ) );
TQMap<TQString,TQString> entryMap = cfg.entryMap( "DistributionLists" ); TQMap<TQString,TQString> entryMap = cfg.entryMap( "DistributionLists" );
cfg.setGroup( "DistributionLists" ); cfg.setGroup( "DistributionLists" );
@ -233,7 +233,7 @@ bool DistributionListManager::save()
{ {
kdDebug(5700) << "DistListManager::save()" << endl; kdDebug(5700) << "DistListManager::save()" << endl;
KSimpleConfig cfg( locateLocal( "data", "tdeabc/distlists" ) ); TDESimpleConfig cfg( locateLocal( "data", "tdeabc/distlists" ) );
cfg.deleteGroup( "DistributionLists" ); cfg.deleteGroup( "DistributionLists" );
cfg.setGroup( "DistributionLists" ); cfg.setGroup( "DistributionLists" );

@ -20,7 +20,7 @@
#include <kdebug.h> #include <kdebug.h>
#include <tdelocale.h> #include <tdelocale.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdestandarddirs.h> #include <tdestandarddirs.h>
#include <kstaticdeleter.h> #include <kstaticdeleter.h>
@ -59,7 +59,7 @@ FormatFactory::FormatFactory()
const TQStringList list = TDEGlobal::dirs()->findAllResources( "data" ,"tdeabc/formats/*.desktop", true, true ); const TQStringList list = TDEGlobal::dirs()->findAllResources( "data" ,"tdeabc/formats/*.desktop", true, true );
for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it )
{ {
KSimpleConfig config( *it, true ); TDESimpleConfig config( *it, true );
if ( !config.hasGroup( "Misc" ) || !config.hasGroup( "Plugin" ) ) if ( !config.hasGroup( "Misc" ) || !config.hasGroup( "Plugin" ) )
continue; continue;

@ -25,7 +25,7 @@
#include <kdebug.h> #include <kdebug.h>
#include <tdelocale.h> #include <tdelocale.h>
#include <tderesources/manager.h> #include <tderesources/manager.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdestandarddirs.h> #include <tdestandarddirs.h>
#include <kstaticdeleter.h> #include <kstaticdeleter.h>

@ -716,7 +716,7 @@ void KCertPart::slotChain(int c) {
void KCertPart::slotImport() { void KCertPart::slotImport() {
if (_p12) { if (_p12) {
KSimpleConfig cfg("ksslcertificates", false); TDESimpleConfig cfg("ksslcertificates", false);
if (cfg.hasGroup(_p12->getCertificate()->getSubject())) { if (cfg.hasGroup(_p12->getCertificate()->getSubject())) {
TQString msg = _curName + "\n" + i18n("A certificate with that name already exists. Are you sure that you wish to replace it?"); TQString msg = _curName + "\n" + i18n("A certificate with that name already exists. Are you sure that you wish to replace it?");

@ -29,7 +29,7 @@
#include <tqtextstream.h> #include <tqtextstream.h>
#include <tdeconfig.h> #include <tdeconfig.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdelocale.h> #include <tdelocale.h>
#include <tdecmdlineargs.h> #include <tdecmdlineargs.h>
#include <tdeglobal.h> #include <tdeglobal.h>
@ -280,7 +280,7 @@ void KonfUpdate::checkGotFile(const TQString &_file, const TQString &id)
// tqDebug("File %s, id %s", file.latin1(), id.latin1()); // tqDebug("File %s, id %s", file.latin1(), id.latin1());
KSimpleConfig cfg(file); TDESimpleConfig cfg(file);
cfg.setGroup("$Version"); cfg.setGroup("$Version");
TQStringList ids = cfg.readListEntry("update_info"); TQStringList ids = cfg.readListEntry("update_info");
if (ids.contains(id)) if (ids.contains(id))
@ -791,7 +791,7 @@ void KonfUpdate::gotScript(const TQString &_script)
tmp1.setAutoDelete(false); tmp1.setAutoDelete(false);
log() << "Script input stored in " << tmp1.name() << endl; log() << "Script input stored in " << tmp1.name() << endl;
} }
KSimpleConfig cfg(tmp1.name()); TDESimpleConfig cfg(tmp1.name());
if (oldGroup.isEmpty()) if (oldGroup.isEmpty())
{ {

@ -49,7 +49,7 @@ link_directories(
##### headers ################################### ##### headers ###################################
install( FILES 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 tdeconfigdialogmanager.h tdeconfigbase.h kdesktopfile.h
kurl.h ksock.h tdeaboutdata.h tdecmdlineargs.h tdeconfigbackend.h kurl.h ksock.h tdeaboutdata.h tdecmdlineargs.h tdeconfigbackend.h
tdeapplication.h tdeuniqueapplication.h tdeapplication.h tdeuniqueapplication.h
@ -106,7 +106,7 @@ set( target tdecore )
set( ${target}_SRCS set( ${target}_SRCS
libintl.cpp tdeapplication.cpp kdebug.cpp netwm.cpp 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 kmanagerselection.cpp kdesktopfile.cpp tdestandarddirs.cpp
ksock.cpp kpty.cpp tdeprocess.cpp tdeprocctrl.cpp tdelocale.cpp ksock.cpp kpty.cpp tdeprocess.cpp tdeprocctrl.cpp tdelocale.cpp
krfcdate.cpp kiconeffect.cpp kicontheme.cpp kiconloader.cpp krfcdate.cpp kiconeffect.cpp kicontheme.cpp kiconloader.cpp

@ -176,7 +176,7 @@ Class overview
TDEConfigBackend <-----> TDEConfig <------> TDEConfigSkeleton /--< myapp.kcfg TDEConfigBackend <-----> TDEConfig <------> TDEConfigSkeleton /--< myapp.kcfg
| | | / | | | /
v v |*---------------< v v |*---------------<
TDEConfigINIBackend KSimpleConfig |tdeconfig_compiler \ TDEConfigINIBackend TDESimpleConfig |tdeconfig_compiler \
| \--< myconfig.kcfg-codegen | \--< myconfig.kcfg-codegen
v v
MyConfig <-----TDEConfigDialogManager----> MyConfigWidget *---< myconfigwidget.ui 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 TDEConfig: functional generic config class that supports merging of cascaded
configuration files configuration files
KSimpleConfig: functional generic config class without support for cascading TDESimpleConfig: functional generic config class without support for cascading
configuration files. configuration files.
TDEConfigBackend: defines API for config backend, t.i. the actual handling TDEConfigBackend: defines API for config backend, t.i. the actual handling

@ -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 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 might program an XML backend, or even a database/registry style
backend. Again, this abstract data type approach provides flexibility 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 they are using a TDEConfigINIBackEnd in the constructor. If more back
ends are implemented, this will have to be changed to use a factory 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 method of some sort to create the backend; all they maintain is a

@ -57,7 +57,7 @@ krfcdate.cpp Waldo Bastian <bastian@kde.org>
krootprop.cpp Lubos Lunak <l.lunak@kde.org> krootprop.cpp Lubos Lunak <l.lunak@kde.org>
ksavefile.cpp Waldo Bastian <bastian@kde.org> ksavefile.cpp Waldo Bastian <bastian@kde.org>
tdeshortcut.cpp Ellis Whitehead <ellis@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 ksocks.cpp
tdestandarddirs.cpp Waldo Bastian <bastian@kde.org> tdestandarddirs.cpp Waldo Bastian <bastian@kde.org>
tdestartupinfo.cpp Lubos Lunak <l.lunak@kde.org> tdestartupinfo.cpp Lubos Lunak <l.lunak@kde.org>

@ -37,7 +37,7 @@ lib_LTLIBRARIES = libtdefakes.la libtdecore.la
lib_LIBRARIES = libtdefakes_nonpic.a libtdefakes_pic.a lib_LIBRARIES = libtdefakes_nonpic.a libtdefakes_pic.a
include_HEADERS = tdeconfig.h tdeconfigskeleton.h \ 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 \ tdeconfigbase.h kdesktopfile.h kurl.h ksock.h tdeaboutdata.h \
tdecmdlineargs.h tdeconfigbackend.h tdeapplication.h \ tdecmdlineargs.h tdeconfigbackend.h tdeapplication.h \
tdeuniqueapplication.h kcharsets.h tdeversion.h kpty.h tdeprocess.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 kprotocolinfofactory.h kqiodevicegzip_p.h kiconloader_p.h
libtdecore_la_SOURCES = libintl.cpp tdeapplication.cpp \ 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 \ tdeconfigbackend.cpp kmanagerselection.cpp kdesktopfile.cpp \
tdestandarddirs.cpp ksock.cpp kpty.cpp tdeprocess.cpp tdeprocctrl.cpp \ tdestandarddirs.cpp ksock.cpp kpty.cpp tdeprocess.cpp tdeprocctrl.cpp \
tdelocale.cpp krfcdate.cpp kiconeffect.cpp kicontheme.cpp \ tdelocale.cpp krfcdate.cpp kiconeffect.cpp kicontheme.cpp \

@ -32,7 +32,7 @@
#include <tdestandarddirs.h> #include <tdestandarddirs.h>
#include <tdeglobal.h> #include <tdeglobal.h>
#include <tdeconfig.h> #include <tdeconfig.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <kinstance.h> #include <kinstance.h>
#include <kicontheme.h> #include <kicontheme.h>

@ -32,7 +32,7 @@
#include <tdestandarddirs.h> #include <tdestandarddirs.h>
#include <tdeglobal.h> #include <tdeglobal.h>
#include <tdeconfig.h> #include <tdeconfig.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <kinstance.h> #include <kinstance.h>
#include "kicontheme.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 // Need to keep a ref to it to make this useful
d->sharedConfig = TDESharedConfig::openConfig( fileName, true /*readonly*/, false /*useKDEGlobals*/ ); d->sharedConfig = TDESharedConfig::openConfig( fileName, true /*readonly*/, false /*useKDEGlobals*/ );
TDEConfig& cfg = *d->sharedConfig; TDEConfig& cfg = *d->sharedConfig;
//was: KSimpleConfig cfg(fileName); //was: TDESimpleConfig cfg(fileName);
cfg.setGroup(mainSection); cfg.setGroup(mainSection);
mName = cfg.readEntry("Name"); mName = cfg.readEntry("Name");

@ -29,7 +29,7 @@
#include <tdeglobal.h> #include <tdeglobal.h>
#include <tdeapplication.h> #include <tdeapplication.h>
#include <kdebug.h> #include <kdebug.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdeconfig.h> #include <tdeconfig.h>
#include <kstringhandler.h> #include <kstringhandler.h>
@ -58,7 +58,7 @@ KProtocolInfo::KProtocolInfo(const TQString &path)
d = new KProtocolInfoPrivate; d = new KProtocolInfoPrivate;
TQString fullPath = locate("services", path); TQString fullPath = locate("services", path);
KSimpleConfig config( fullPath, true ); TDESimpleConfig config( fullPath, true );
config.setGroup( "Protocol" ); config.setGroup( "Protocol" );
m_name = config.readEntry( "protocol" ); m_name = config.readEntry( "protocol" );

@ -1,81 +1,3 @@
/* This file is part of the KDE libraries #include <tdesimpleconfig.h>
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 #define KSimpleConfig TDESimpleConfig
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

@ -76,7 +76,7 @@
#include <kiconloader.h> #include <kiconloader.h>
#include <kclipboard.h> #include <kclipboard.h>
#include <tdeconfig.h> #include <tdeconfig.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdecmdlineargs.h> #include <tdecmdlineargs.h>
#include <tdeaboutdata.h> #include <tdeaboutdata.h>
#include <tdeglobalsettings.h> #include <tdeglobalsettings.h>

@ -37,7 +37,7 @@ class TDEConfigPrivate;
* This class implements KDE's default configuration system. * This class implements KDE's default configuration system.
* *
* @author Kalle Dalheimer <kalle@kde.org>, Preston Brown <pbrown@kde.org> * @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 * @short KDE Configuration Management class
*/ */
class TDECORE_EXPORT TDEConfig : public TDEConfigBase class TDECORE_EXPORT TDEConfig : public TDEConfigBase

@ -33,7 +33,7 @@
#include <tdecmdlineargs.h> #include <tdecmdlineargs.h>
#include <tdeglobal.h> #include <tdeglobal.h>
#include <tdeconfig.h> #include <tdeconfig.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdestandarddirs.h> #include <tdestandarddirs.h>
#include <iostream> #include <iostream>
@ -994,7 +994,7 @@ int main( int argc, char **argv )
TQString baseName = args->url( 1 ).fileName(); TQString baseName = args->url( 1 ).fileName();
baseName = baseName.left(baseName.length() - 6); baseName = baseName.left(baseName.length() - 6);
KSimpleConfig codegenConfig( codegenFilename, true ); TDESimpleConfig codegenConfig( codegenFilename, true );
TQString nameSpace = codegenConfig.readEntry("NameSpace"); TQString nameSpace = codegenConfig.readEntry("NameSpace");
TQString className = codegenConfig.readEntry("ClassName"); TQString className = codegenConfig.readEntry("ClassName");

@ -45,7 +45,7 @@ class TDEConfigGroup;
* This class forms the base for all %KDE configuration. It is an * This class forms the base for all %KDE configuration. It is an
* abstract base class, meaning that you cannot directly instantiate * abstract base class, meaning that you cannot directly instantiate
* objects of this class. Either use TDEConfig (for usual %KDE * 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). * even TDESharedConfig (stores values in shared memory).
* *
* All configuration entries are key, value pairs. Each entry also * 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> * @author Kalle Dalheimer <kalle@kde.org>, Preston Brown <pbrown@kde.org>
* @see TDEGlobal#config() * @see TDEGlobal#config()
* @see TDEConfig * @see TDEConfig
* @see KSimpleConfig * @see TDESimpleConfig
* @see TDESharedConfig * @see TDESharedConfig
*/ */
class TDECORE_EXPORT TDEConfigBase : public TQObject class TDECORE_EXPORT TDEConfigBase : public TQObject
@ -2025,7 +2025,7 @@ protected:
bool bDirty; bool bDirty;
bool bLocaleInitialized; bool bLocaleInitialized;
bool bReadOnly; // currently only used by KSimpleConfig bool bReadOnly; // currently only used by TDESimpleConfig
mutable bool bExpand; // whether dollar expansion is used mutable bool bExpand; // whether dollar expansion is used
protected: protected:
@ -2044,11 +2044,11 @@ private:
class TDEConfigGroupSaverPrivate; class TDEConfigGroupSaverPrivate;
/** /**
* Helper class to facilitate working with TDEConfig / KSimpleConfig * Helper class to facilitate working with TDEConfig / TDESimpleConfig
* groups. * groups.
* *
* Careful programmers always set the group of a * 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 * and set it back to the old one of afterwards. This is usually
* written as: * written as:
* \code * \code
@ -2075,8 +2075,8 @@ class TDEConfigGroupSaverPrivate;
* way. * way.
* *
* @author Matthias Kalle Dalheimer <kalle@kde.org> * @author Matthias Kalle Dalheimer <kalle@kde.org>
* @see TDEConfigBase, TDEConfig, KSimpleConfig, TDEConfigGroup * @see TDEConfigBase, TDEConfig, TDESimpleConfig, TDEConfigGroup
* @short Helper class for easier use of TDEConfig/KSimpleConfig groups * @short Helper class for easier use of TDEConfig/TDESimpleConfig groups
*/ */
class TDECORE_EXPORT TDEConfigGroupSaver // KDE4 remove class TDECORE_EXPORT TDEConfigGroupSaver // KDE4 remove

@ -24,7 +24,7 @@
#include <tqcursor.h> #include <tqcursor.h>
#include <tdeconfig.h> #include <tdeconfig.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdeapplication.h> #include <tdeapplication.h>
#include <kipc.h> #include <kipc.h>

@ -34,7 +34,7 @@
#include "kcatalogue.h" #include "kcatalogue.h"
#include "tdeglobal.h" #include "tdeglobal.h"
#include "tdestandarddirs.h" #include "tdestandarddirs.h"
#include "ksimpleconfig.h" #include "tdesimpleconfig.h"
#include "kinstance.h" #include "kinstance.h"
#include "tdeconfig.h" #include "tdeconfig.h"
#include "kdebug.h" #include "kdebug.h"
@ -310,7 +310,7 @@ void TDELocale::initFormat()
TDEConfigGroupSaver saver(config, "Locale"); TDEConfigGroupSaver saver(config, "Locale");
KSimpleConfig entry(locate("locale", TDESimpleConfig entry(locate("locale",
TQString::fromLatin1("l10n/%1/entry.desktop") TQString::fromLatin1("l10n/%1/entry.desktop")
.arg(m_country)), true); .arg(m_country)), true);
entry.setGroup("KCM Locale"); entry.setGroup("KCM Locale");
@ -370,7 +370,7 @@ void TDELocale::initFormat()
//Grammatical //Grammatical
//Precedence here is l10n / i18n / config file //Precedence here is l10n / i18n / config file
KSimpleConfig language(locate("locale", TDESimpleConfig language(locate("locale",
TQString::fromLatin1("%1/entry.desktop") TQString::fromLatin1("%1/entry.desktop")
.arg(m_language)), true); .arg(m_language)), true);
language.setGroup("KCM Locale"); language.setGroup("KCM Locale");

@ -27,7 +27,7 @@
#include <kdebug.h> #include <kdebug.h>
#include <tdeglobal.h> #include <tdeglobal.h>
#include <tdelocale.h> #include <tdelocale.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
//---------------------------------------------------- //----------------------------------------------------

@ -35,13 +35,13 @@
#include "tdestandarddirs.h" #include "tdestandarddirs.h"
#include "tdeconfigbackend.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) : TDEConfig(TQString::fromLatin1(""), bReadOnly, false)
{ {
// the difference between TDEConfig and KSimpleConfig is just that // the difference between TDEConfig and TDESimpleConfig is just that
// for KSimpleConfig an absolute filename is guaranteed // for TDESimpleConfig an absolute filename is guaranteed
if (!fileName.isNull() && TQDir::isRelativePath(fileName)) { if (!fileName.isNull() && TQDir::isRelativePath(fileName)) {
backEnd->changeFileName( TDEGlobal::dirs()-> backEnd->changeFileName( TDEGlobal::dirs()->
saveLocation("config", TQString::null, !bReadOnly)+fileName, "config", false); saveLocation("config", TQString::null, !bReadOnly)+fileName, "config", false);
@ -52,20 +52,20 @@ KSimpleConfig::KSimpleConfig(const TQString &fileName, bool bReadOnly)
reparseConfiguration(); reparseConfiguration();
} }
KSimpleConfig::KSimpleConfig(TDEConfigBackEnd *backEnd, bool bReadOnly) TDESimpleConfig::TDESimpleConfig(TDEConfigBackEnd *backEnd, bool bReadOnly)
: TDEConfig(backEnd, bReadOnly) : TDEConfig(backEnd, bReadOnly)
{} {}
KSimpleConfig::~KSimpleConfig() TDESimpleConfig::~TDESimpleConfig()
{ {
// we need to call the KSimpleConfig version of sync. Relying on the // we need to call the TDESimpleConfig version of sync. Relying on the
// regular TDEConfig sync is bad, because the KSimpleConfig sync has // regular TDEConfig sync is bad, because the TDESimpleConfig sync has
// different behavior. Syncing here will insure that the sync() call // different behavior. Syncing here will insure that the sync() call
// in the TDEConfig destructor doesn't actually do anything. // in the TDEConfig destructor doesn't actually do anything.
sync(); sync();
} }
void KSimpleConfig::sync() void TDESimpleConfig::sync()
{ {
if (isReadOnly()) if (isReadOnly())
return; return;
@ -75,7 +75,7 @@ void KSimpleConfig::sync()
rollback(); rollback();
} }
void KSimpleConfig::virtual_hook( int id, void* data ) void TDESimpleConfig::virtual_hook( int id, void* data )
{ TDEConfig::virtual_hook( id, data ); } { TDEConfig::virtual_hook( id, data ); }
#include "ksimpleconfig.moc" #include "tdesimpleconfig.moc"

@ -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

@ -50,7 +50,7 @@
#include "tdeconfig.h" #include "tdeconfig.h"
#include "kinstance.h" #include "kinstance.h"
#include "kshell.h" #include "kshell.h"
#include "ksimpleconfig.h" #include "tdesimpleconfig.h"
#include "kuser.h" #include "kuser.h"
#include "kstaticdeleter.h" #include "kstaticdeleter.h"
#include <kde_file.h> #include <kde_file.h>
@ -1487,7 +1487,7 @@ static TQStringList lookupProfiles(const TQString &mapFile)
gid_t sup_gids[512]; gid_t sup_gids[512];
int sup_gids_nr = getgroups(512, sup_gids); int sup_gids_nr = getgroups(512, sup_gids);
KSimpleConfig mapCfg(mapFile, true); TDESimpleConfig mapCfg(mapFile, true);
mapCfg.setGroup("Users"); mapCfg.setGroup("Users");
if (mapCfg.hasKey(user.data())) if (mapCfg.hasKey(user.data()))
{ {

@ -34,10 +34,10 @@ set( AUTOMATED_CHECKS
kcharsetstest kglobaltest kmacroexpandertest krfcdatetest kcharsetstest kglobaltest kmacroexpandertest krfcdatetest
kstringhandlertest kurltest tdestdacceltest kstringhandlertest kurltest tdestdacceltest
# cplusplustest # -- skip (doesn't error on errors) # cplusplustest # -- skip (doesn't error on errors)
# ksimpleconfigtest # -- skip (doesn't error on errors) # tdesimpleconfigtest # -- skip (doesn't error on errors)
# ksortablevaluelist # -- skip (doesn't error on errors) # ksortablevaluelist # -- skip (doesn't error on errors)
# ksocktest # -- skip due to DNS failure # ksocktest # -- skip due to DNS failure
) )
# Tests that require some graphical interaction / confirmation. # Tests that require some graphical interaction / confirmation.

@ -21,7 +21,7 @@ INCLUDES = -I$(top_srcdir)/tdecore $(all_includes)
AM_LDFLAGS = $(QT_LDFLAGS) $(X_LDFLAGS) $(KDE_RPATH) 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 \ tdestandarddirstest kurltest tdeuniqueapptest ktempfiletest krandomsequencetest \
kdebugtest ksocktest kstringhandlertest kcmdlineargstest tdeapptest \ kdebugtest ksocktest kstringhandlertest kcmdlineargstest tdeapptest \
kmemtest kidlservertest kidlclienttest dcopkonqtest kipctest \ kmemtest kidlservertest kidlclienttest dcopkonqtest kipctest \
@ -43,7 +43,7 @@ kdebugtest_SOURCES = kdebugtest.cpp
klocaletest_SOURCES = klocaletest.cpp klocaletest_SOURCES = klocaletest.cpp
#klocaletest2_SOURCES = klocaletest2.cpp tdelocale.cpp libintl.cpp kcatalogue.cpp #klocaletest2_SOURCES = klocaletest2.cpp tdelocale.cpp libintl.cpp kcatalogue.cpp
#kcatalogue_SOURCES = kcatalogue.cpp libintl.cpp #kcatalogue_SOURCES = kcatalogue.cpp libintl.cpp
ksimpleconfigtest_SOURCES = ksimpleconfigtest.cpp tdesimpleconfigtest_SOURCES = tdesimpleconfigtest.cpp
kurltest_SOURCES = kurltest.cpp kurltest_SOURCES = kurltest.cpp
tdestandarddirstest_SOURCES = tdestandarddirstest.cpp tdestandarddirstest_SOURCES = tdestandarddirstest.cpp
tdeprocesstest_SOURCES = tdeprocesstest.cpp tdeprocesstest_SOURCES = tdeprocesstest.cpp

@ -35,7 +35,7 @@
#include <tqfileinfo.h> #include <tqfileinfo.h>
#include <tqdatetime.h> #include <tqdatetime.h>
#include <kdebug.h> #include <kdebug.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <config.h> #include <config.h>
// Standard Qt widgets // Standard Qt widgets

@ -24,7 +24,7 @@
#include <tqfile.h> #include <tqfile.h>
#include <tqfileinfo.h> #include <tqfileinfo.h>
#include <kdebug.h> #include <kdebug.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tqtextstream.h> #include <tqtextstream.h>
// Standard Qt widgets // Standard Qt widgets

@ -3,9 +3,9 @@
// //
// configtest.cpp: libKDEcore example // configtest.cpp: libKDEcore example
// //
// demonstrates use of KSimpleConfig class // demonstrates use of TDESimpleConfig class
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdeapplication.h> #include <tdeapplication.h>
#include <unistd.h> #include <unistd.h>
#include <stdio.h> #include <stdio.h>
@ -22,7 +22,7 @@ int main( int argc, char **argv )
{ {
TDEApplication a( argc, argv, TQCString("tdeconfigtest") ); TDEApplication a( argc, argv, TQCString("tdeconfigtest") );
KSimpleConfig aConfig( _PATH_TMP"/simpleconfig.cfg" ); TDESimpleConfig aConfig( _PATH_TMP"/simpleconfig.cfg" );
aConfig.setGroup( "Test group" ); aConfig.setGroup( "Test group" );
aConfig.writeEntry( "key1", "value1" ); aConfig.writeEntry( "key1", "value1" );
@ -32,17 +32,17 @@ int main( int argc, char **argv )
aConfig.writeEntry( "akey1", "avalue1" ); aConfig.writeEntry( "akey1", "avalue1" );
aConfig.writeEntry( "akey2", "avalue2" ); 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(); aConfig.sync();
sleep( 10 ); sleep( 10 );
aConfig.setGroup( "Test group" ); aConfig.setGroup( "Test group" );
aConfig.deleteEntry( "key2", false ); 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(); aConfig.sync();
sleep( 10 ); sleep( 10 );
aConfig.deleteGroup( "Another Test group", true ); aConfig.deleteGroup( "Another Test group", true );
fprintf( stderr, "[ksimpleconfigtest] Deleted Another Test group\n" ); fprintf( stderr, "[tdesimpleconfigtest] Deleted Another Test group\n" );
} }

@ -70,7 +70,7 @@
#include <tdelocale.h> #include <tdelocale.h>
#include <knotifyclient.h> #include <knotifyclient.h>
#include <kprinter.h> #include <kprinter.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdestandarddirs.h> #include <tdestandarddirs.h>
#include <tdestdaccel.h> #include <tdestdaccel.h>
#include <kstringhandler.h> #include <kstringhandler.h>
@ -347,7 +347,7 @@ public:
bool ignoreWheelEvents:1; bool ignoreWheelEvents:1;
int borderX, borderY; int borderX, borderY;
KSimpleConfig *formCompletions; TDESimpleConfig *formCompletions;
bool paged; bool paged;
@ -3047,7 +3047,7 @@ TQStringList TDEHTMLView::formCompletionItems(const TQString &name) const
if (!m_part->settings()->isFormCompletionEnabled()) if (!m_part->settings()->isFormCompletionEnabled())
return TQStringList(); return TQStringList();
if (!d->formCompletions) if (!d->formCompletions)
d->formCompletions = new KSimpleConfig(locateLocal("data", "tdehtml/formcompletions")); d->formCompletions = new TDESimpleConfig(locateLocal("data", "tdehtml/formcompletions"));
return d->formCompletions->readListEntry(name); return d->formCompletions->readListEntry(name);
} }
@ -3055,7 +3055,7 @@ void TDEHTMLView::clearCompletionHistory(const TQString& name)
{ {
if (!d->formCompletions) if (!d->formCompletions)
{ {
d->formCompletions = new KSimpleConfig(locateLocal("data", "tdehtml/formcompletions")); d->formCompletions = new TDESimpleConfig(locateLocal("data", "tdehtml/formcompletions"));
} }
d->formCompletions->writeEntry(name, ""); d->formCompletions->writeEntry(name, "");
d->formCompletions->sync(); d->formCompletions->sync();
@ -3101,7 +3101,7 @@ void TDEHTMLView::removeFormCompletionItem(const TQString &name, const TQString
void TDEHTMLView::addNonPasswordStorableSite(const TQString& host) void TDEHTMLView::addNonPasswordStorableSite(const TQString& host)
{ {
if (!d->formCompletions) { if (!d->formCompletions) {
d->formCompletions = new KSimpleConfig(locateLocal("data", "tdehtml/formcompletions")); d->formCompletions = new TDESimpleConfig(locateLocal("data", "tdehtml/formcompletions"));
} }
d->formCompletions->setGroup("NonPasswordStorableSites"); d->formCompletions->setGroup("NonPasswordStorableSites");
@ -3115,7 +3115,7 @@ void TDEHTMLView::addNonPasswordStorableSite(const TQString& host)
bool TDEHTMLView::nonPasswordStorableSite(const TQString& host) const bool TDEHTMLView::nonPasswordStorableSite(const TQString& host) const
{ {
if (!d->formCompletions) { if (!d->formCompletions) {
d->formCompletions = new KSimpleConfig(locateLocal("data", "tdehtml/formcompletions")); d->formCompletions = new TDESimpleConfig(locateLocal("data", "tdehtml/formcompletions"));
} }
d->formCompletions->setGroup("NonPasswordStorableSites"); d->formCompletions->setGroup("NonPasswordStorableSites");
TQStringList sites = d->formCompletions->readListEntry("Sites"); TQStringList sites = d->formCompletions->readListEntry("Sites");

@ -64,7 +64,7 @@
#include "tdehtml_factory.h" #include "tdehtml_factory.h"
#include <tdeio/job.h> #include <tdeio/job.h>
#include <tdemainwindow.h> #include <tdemainwindow.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdeglobalsettings.h> #include <tdeglobalsettings.h>
#include <tqcolor.h> #include <tqcolor.h>
@ -514,7 +514,7 @@ int main(int argc, char *argv[])
TDEApplication a; TDEApplication a;
a.disableAutoDcopRegistration(); a.disableAutoDcopRegistration();
a.setStyle( "windows" ); a.setStyle( "windows" );
KSimpleConfig sc1( "cryptodefaults" ); TDESimpleConfig sc1( "cryptodefaults" );
sc1.setGroup( "Warnings" ); sc1.setGroup( "Warnings" );
sc1.writeEntry( "OnUnencrypted", false ); sc1.writeEntry( "OnUnencrypted", false );
a.config()->setGroup( "Notification Messages" ); a.config()->setGroup( "Notification Messages" );
@ -541,7 +541,7 @@ int main(int argc, char *argv[])
int rv = 1; int rv = 1;
if ( !args->isSet( "debug" ) ) { if ( !args->isSet( "debug" ) ) {
KSimpleConfig dc( "kdebugrc" ); TDESimpleConfig dc( "kdebugrc" );
static int areas[] = { 1000, 6000, 6005, 6010, 6020, 6030, static int areas[] = { 1000, 6000, 6005, 6010, 6020, 6030,
6031, 6035, 6036, 6040, 6041, 6045, 6031, 6035, 6036, 6040, 6041, 6045,
6050, 6060, 6061, 7000, 7006, 170, 6050, 6060, 6061, 7000, 7006, 170,

@ -22,7 +22,7 @@
#include <tqdom.h> #include <tqdom.h>
#include <tqcstring.h> #include <tqcstring.h>
#include <tqstringlist.h> #include <tqstringlist.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include "kbookmark.h" #include "kbookmark.h"

@ -23,7 +23,7 @@
#include <tqcstring.h> #include <tqcstring.h>
#include <tqstringlist.h> #include <tqstringlist.h>
#include <tqmap.h> #include <tqmap.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdemacros.h> #include <tdemacros.h>
#include "kbookmarkimporter.h" #include "kbookmarkimporter.h"

@ -22,7 +22,7 @@
#include <tqdom.h> #include <tqdom.h>
#include <tqcstring.h> #include <tqcstring.h>
#include <tqstringlist.h> #include <tqstringlist.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdemacros.h> #include <tdemacros.h>
#include <kbookmarkimporter.h> #include <kbookmarkimporter.h>

@ -92,7 +92,7 @@ void KBookmarkImporter::scanIntern( TQDomElement & parentElem, const TQString &
|| (res->name() == "media/builtin-trash") || (res->name() == "media/builtin-trash")
|| (res->name() == "media/builtin-webbrowser") ) || (res->name() == "media/builtin-webbrowser") )
{ {
KSimpleConfig cfg( file.path(), true ); TDESimpleConfig cfg( file.path(), true );
cfg.setDesktopGroup(); cfg.setDesktopGroup();
TQString type = cfg.readEntry( "Type" ); TQString type = cfg.readEntry( "Type" );
// Is it really a bookmark file ? // Is it really a bookmark file ?
@ -104,7 +104,7 @@ void KBookmarkImporter::scanIntern( TQDomElement & parentElem, const TQString &
else if ( res->name() == "text/plain") else if ( res->name() == "text/plain")
{ {
// maybe its an IE Favourite.. // maybe its an IE Favourite..
KSimpleConfig cfg( file.path(), true ); TDESimpleConfig cfg( file.path(), true );
TQStringList grp = cfg.groupList().grep( "internetshortcut", false ); TQStringList grp = cfg.groupList().grep( "internetshortcut", false );
if ( grp.count() == 0 ) if ( grp.count() == 0 )
continue; continue;
@ -122,7 +122,7 @@ void KBookmarkImporter::scanIntern( TQDomElement & parentElem, const TQString &
} }
void KBookmarkImporter::parseBookmark( TQDomElement & parentElem, TQCString _text, void KBookmarkImporter::parseBookmark( TQDomElement & parentElem, TQCString _text,
KSimpleConfig& _cfg, const TQString &_group ) TDESimpleConfig& _cfg, const TQString &_group )
{ {
if ( !_group.isEmpty() ) if ( !_group.isEmpty() )
_cfg.setGroup( _group ); _cfg.setGroup( _group );

@ -22,7 +22,7 @@
#include <tqdom.h> #include <tqdom.h>
#include <tqcstring.h> #include <tqcstring.h>
#include <tqstringlist.h> #include <tqstringlist.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
/** /**
* A class for importing the previous bookmarks (desktop files) * A class for importing the previous bookmarks (desktop files)
@ -39,7 +39,7 @@ public:
private: private:
void scanIntern( TQDomElement & parentElem, const TQString & _path ); void scanIntern( TQDomElement & parentElem, const TQString & _path );
void parseBookmark( TQDomElement & parentElem, TQCString _text, void parseBookmark( TQDomElement & parentElem, TQCString _text,
KSimpleConfig& _cfg, const TQString &_group ); TDESimpleConfig& _cfg, const TQString &_group );
TQDomDocument * m_pDoc; TQDomDocument * m_pDoc;
TQStringList m_lstParsedDirs; TQStringList m_lstParsedDirs;
}; };

@ -22,7 +22,7 @@
#include <tqdom.h> #include <tqdom.h>
#include <tqcstring.h> #include <tqcstring.h>
#include <tqstringlist.h> #include <tqstringlist.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdemacros.h> #include <tdemacros.h>
#include "kbookmarkimporter.h" #include "kbookmarkimporter.h"

@ -22,7 +22,7 @@
#include <tqdom.h> #include <tqdom.h>
#include <tqcstring.h> #include <tqcstring.h>
#include <tqstringlist.h> #include <tqstringlist.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <kbookmarkimporter.h> #include <kbookmarkimporter.h>

@ -23,12 +23,12 @@
#include <ksslpkcs12.h> #include <ksslpkcs12.h>
#include <kresolver.h> #include <kresolver.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
using namespace KNetwork; using namespace KNetwork;
TQStringList KSSLCertificateHome::getCertificateList() { TQStringList KSSLCertificateHome::getCertificateList() {
KSimpleConfig cfg("ksslcertificates", false); TDESimpleConfig cfg("ksslcertificates", false);
TQStringList list = cfg.groupList(); TQStringList list = cfg.groupList();
TQString defaultstr("<default>"); TQString defaultstr("<default>");
TQString blankstr(""); TQString blankstr("");
@ -42,7 +42,7 @@ return list;
// KDE 4: make it const TQString & // KDE 4: make it const TQString &
void KSSLCertificateHome::setDefaultCertificate(TQString name, TQString host, bool send, bool prompt) { void KSSLCertificateHome::setDefaultCertificate(TQString name, TQString host, bool send, bool prompt) {
KSimpleConfig cfg("ksslauthmap", false); TDESimpleConfig cfg("ksslauthmap", false);
#ifdef TQ_WS_WIN //temporary #ifdef TQ_WS_WIN //temporary
cfg.setGroup(host); cfg.setGroup(host);
@ -80,7 +80,7 @@ return true;
bool KSSLCertificateHome::addCertificate(KSSLPKCS12 *cert, TQString passToStore) { bool KSSLCertificateHome::addCertificate(KSSLPKCS12 *cert, TQString passToStore) {
if (!cert) return false; if (!cert) return false;
KSimpleConfig cfg("ksslcertificates", false); TDESimpleConfig cfg("ksslcertificates", false);
cfg.setGroup(cert->name()); cfg.setGroup(cert->name());
cfg.writeEntry("PKCS12Base64", cert->toString()); cfg.writeEntry("PKCS12Base64", cert->toString());
@ -109,7 +109,7 @@ bool KSSLCertificateHome::deleteCertificate(KSSLPKCS12 *cert) {
bool KSSLCertificateHome::deleteCertificateByName(const TQString &name) { bool KSSLCertificateHome::deleteCertificateByName(const TQString &name) {
if (name.isEmpty()) return false; if (name.isEmpty()) return false;
KSimpleConfig cfg("ksslcertificates", false); TDESimpleConfig cfg("ksslcertificates", false);
bool ok = cfg.deleteGroup(name); bool ok = cfg.deleteGroup(name);
cfg.sync(); cfg.sync();
@ -119,7 +119,7 @@ return ok;
// KDE 4: make it const TQString & // KDE 4: make it const TQString &
KSSLPKCS12* KSSLCertificateHome::getCertificateByName(TQString name, TQString password) { KSSLPKCS12* KSSLCertificateHome::getCertificateByName(TQString name, TQString password) {
KSimpleConfig cfg("ksslcertificates", false); TDESimpleConfig cfg("ksslcertificates", false);
if (!cfg.hasGroup(name)) return NULL; if (!cfg.hasGroup(name)) return NULL;
cfg.setGroup(name); cfg.setGroup(name);
@ -130,7 +130,7 @@ KSimpleConfig cfg("ksslcertificates", false);
// KDE 4: make it const TQString & // KDE 4: make it const TQString &
KSSLPKCS12* KSSLCertificateHome::getCertificateByName(TQString name) { KSSLPKCS12* KSSLCertificateHome::getCertificateByName(TQString name) {
KSimpleConfig cfg("ksslcertificates", false); TDESimpleConfig cfg("ksslcertificates", false);
if (!cfg.hasGroup(name)) return NULL; if (!cfg.hasGroup(name)) return NULL;
cfg.setGroup(name); cfg.setGroup(name);
@ -141,7 +141,7 @@ KSimpleConfig cfg("ksslcertificates", false);
// KDE 4: make it const TQString & // KDE 4: make it const TQString &
bool KSSLCertificateHome::hasCertificateByName(TQString name) { bool KSSLCertificateHome::hasCertificateByName(TQString name) {
KSimpleConfig cfg("ksslcertificates", false); TDESimpleConfig cfg("ksslcertificates", false);
if (!cfg.hasGroup(name)) return false; if (!cfg.hasGroup(name)) return false;
return true; return true;
} }
@ -154,7 +154,7 @@ KSSLPKCS12* KSSLCertificateHome::getCertificateByHost(TQString host, TQString pa
// KDE 4: make it const TQString & // KDE 4: make it const TQString &
TQString KSSLCertificateHome::getDefaultCertificateName(TQString host, KSSLAuthAction *aa) { TQString KSSLCertificateHome::getDefaultCertificateName(TQString host, KSSLAuthAction *aa) {
KSimpleConfig cfg("ksslauthmap", false); TDESimpleConfig cfg("ksslauthmap", false);
#ifdef TQ_WS_WIN //temporary #ifdef TQ_WS_WIN //temporary
if (!cfg.hasGroup(host)) { if (!cfg.hasGroup(host)) {
@ -206,7 +206,7 @@ return cfg.readEntry("DefaultCert", "");
// KDE 4: make it const TQString & // KDE 4: make it const TQString &
KSSLPKCS12* KSSLCertificateHome::getDefaultCertificate(TQString password, KSSLAuthAction *aa) { KSSLPKCS12* KSSLCertificateHome::getDefaultCertificate(TQString password, KSSLAuthAction *aa) {
TQString name = KSSLCertificateHome::getDefaultCertificateName(aa); TQString name = KSSLCertificateHome::getDefaultCertificateName(aa);
KSimpleConfig cfg("ksslcertificates", false); TDESimpleConfig cfg("ksslcertificates", false);
if (name.isEmpty()) return NULL; if (name.isEmpty()) return NULL;
@ -218,7 +218,7 @@ KSimpleConfig cfg("ksslcertificates", false);
KSSLPKCS12* KSSLCertificateHome::getDefaultCertificate(KSSLAuthAction *aa) { KSSLPKCS12* KSSLCertificateHome::getDefaultCertificate(KSSLAuthAction *aa) {
TQString name = KSSLCertificateHome::getDefaultCertificateName(aa); TQString name = KSSLCertificateHome::getDefaultCertificateName(aa);
KSimpleConfig cfg("ksslcertificates", false); TDESimpleConfig cfg("ksslcertificates", false);
if (name.isEmpty()) return NULL; if (name.isEmpty()) return NULL;
@ -230,7 +230,7 @@ KSimpleConfig cfg("ksslcertificates", false);
// KDE 4: make it const TQString & // KDE 4: make it const TQString &
void KSSLCertificateHome::setDefaultCertificate(TQString name, bool send, bool prompt) { void KSSLCertificateHome::setDefaultCertificate(TQString name, bool send, bool prompt) {
KSimpleConfig cfg("ksslauthmap", false); TDESimpleConfig cfg("ksslauthmap", false);
cfg.setGroup("<default>"); cfg.setGroup("<default>");
cfg.writeEntry("defaultCertificate", name); cfg.writeEntry("defaultCertificate", name);

@ -28,7 +28,7 @@
#include "kssld.h" #include "kssld.h"
#include <tdeconfig.h> #include <tdeconfig.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <ksslcertchain.h> #include <ksslcertchain.h>
#include <ksslcertificate.h> #include <ksslcertificate.h>
#include <ksslcertificatehome.h> #include <ksslcertificatehome.h>
@ -114,7 +114,7 @@ static void updatePoliciesConfig(TDEConfig *cfg) {
KSSLD::KSSLD(const TQCString &name) : KDEDModule(name) KSSLD::KSSLD(const TQCString &name) : KDEDModule(name)
{ {
// ----------------------- FOR THE CACHE ------------------------------------ // ----------------------- FOR THE CACHE ------------------------------------
cfg = new KSimpleConfig("ksslpolicies", false); cfg = new TDESimpleConfig("ksslpolicies", false);
cfg->setGroup("General"); cfg->setGroup("General");
if (2 != cfg->readNumEntry("policies version", 0)) { if (2 != cfg->readNumEntry("policies version", 0)) {
::updatePoliciesConfig(cfg); ::updatePoliciesConfig(cfg);
@ -167,7 +167,7 @@ KSSLCNode *node;
for (node = certList.first(); node; node = certList.next()) { for (node = certList.first(); node; node = certList.next()) {
// First convert to a binary format and then write the // First convert to a binary format and then write the
// tdeconfig entry write the (CN, policy, cert) to // tdeconfig entry write the (CN, policy, cert) to
// KSimpleConfig // TDESimpleConfig
cfg->setGroup(node->cert->getMD5Digest()); cfg->setGroup(node->cert->getMD5Digest());
cfg->writeEntry("Certificate", node->cert->toString()); cfg->writeEntry("Certificate", node->cert->toString());
cfg->writeEntry("Policy", node->policy); cfg->writeEntry("Policy", node->policy);
@ -205,7 +205,7 @@ KSSLCNode *node;
void KSSLD::cacheReload() { void KSSLD::cacheReload() {
cacheClearList(); cacheClearList();
delete cfg; delete cfg;
cfg = new KSimpleConfig("ksslpolicies", false); cfg = new TDESimpleConfig("ksslpolicies", false);
cacheLoadDefaultPolicies(); cacheLoadDefaultPolicies();
} }

@ -32,7 +32,7 @@
#include <tqptrvector.h> #include <tqptrvector.h>
class KSimpleConfig; class TDESimpleConfig;
class KSSLCNode; class KSSLCNode;
class KOpenSSLProxy; class KOpenSSLProxy;
@ -136,7 +136,7 @@ private:
void cacheLoadDefaultPolicies(); void cacheLoadDefaultPolicies();
// for the cache portion: // for the cache portion:
KSimpleConfig *cfg; TDESimpleConfig *cfg;
TQPtrList<KSSLCNode> certList; TQPtrList<KSSLCNode> certList;
// Our pointer to OpenSSL // Our pointer to OpenSSL

@ -27,7 +27,7 @@
#include <kdebug.h> #include <kdebug.h>
#include <tdelocale.h> #include <tdelocale.h>
#include <tdeprocess.h> #include <tdeprocess.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
static const TDECmdLineOptions options[] = static const TDECmdLineOptions options[] =
{ {

@ -2627,7 +2627,7 @@ KURLPropsPlugin::KURLPropsPlugin( KPropertiesDialog *_props )
} }
f.close(); f.close();
KSimpleConfig config( path ); TDESimpleConfig config( path );
config.setDesktopGroup(); config.setDesktopGroup();
URLStr = config.readPathEntry( "URL" ); URLStr = config.readPathEntry( "URL" );
@ -2688,7 +2688,7 @@ void KURLPropsPlugin::applyChanges()
} }
f.close(); f.close();
KSimpleConfig config( path ); TDESimpleConfig config( path );
config.setDesktopGroup(); config.setDesktopGroup();
config.writeEntry( "Type", TQString::fromLatin1("Link")); config.writeEntry( "Type", TQString::fromLatin1("Link"));
config.writePathEntry( "URL", URLEdit->url() ); config.writePathEntry( "URL", URLEdit->url() );
@ -2779,7 +2779,7 @@ KBindingPropsPlugin::KBindingPropsPlugin( KPropertiesDialog *_props ) : KPropsDl
return; return;
f.close(); f.close();
KSimpleConfig config( _props->kurl().path() ); TDESimpleConfig config( _props->kurl().path() );
config.setDesktopGroup(); config.setDesktopGroup();
TQString patternStr = config.readEntry( "Patterns" ); TQString patternStr = config.readEntry( "Patterns" );
TQString iconStr = config.readEntry( "Icon" ); TQString iconStr = config.readEntry( "Icon" );
@ -2845,7 +2845,7 @@ void KBindingPropsPlugin::applyChanges()
} }
f.close(); f.close();
KSimpleConfig config( path ); TDESimpleConfig config( path );
config.setDesktopGroup(); config.setDesktopGroup();
config.writeEntry( "Type", TQString::fromLatin1("MimeType") ); config.writeEntry( "Type", TQString::fromLatin1("MimeType") );
@ -2984,7 +2984,7 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgP
return; return;
f.close(); f.close();
KSimpleConfig config( path ); TDESimpleConfig config( path );
config.setDesktopGroup(); config.setDesktopGroup();
TQString deviceStr = config.readEntry( "Dev" ); TQString deviceStr = config.readEntry( "Dev" );
TQString mountPointStr = config.readEntry( "MountPoint" ); TQString mountPointStr = config.readEntry( "MountPoint" );
@ -3143,7 +3143,7 @@ void KDevicePropsPlugin::applyChanges()
} }
f.close(); f.close();
KSimpleConfig config( path ); TDESimpleConfig config( path );
config.setDesktopGroup(); config.setDesktopGroup();
config.writeEntry( "Type", TQString::fromLatin1("FSDevice") ); config.writeEntry( "Type", TQString::fromLatin1("FSDevice") );
@ -3431,7 +3431,7 @@ void KDesktopPropsPlugin::applyChanges()
// coupled to the command. // coupled to the command.
checkCommandChanged(); checkCommandChanged();
KSimpleConfig config( path ); TDESimpleConfig config( path );
config.setDesktopGroup(); config.setDesktopGroup();
config.writeEntry( "Type", TQString::fromLatin1("Application")); config.writeEntry( "Type", TQString::fromLatin1("Application"));
config.writeEntry( "Comment", w->commentEdit->text() ); config.writeEntry( "Comment", w->commentEdit->text() );
@ -3797,7 +3797,7 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
return; return;
f.close(); f.close();
KSimpleConfig config( path ); TDESimpleConfig config( path );
config.setDollarExpansion( false ); config.setDollarExpansion( false );
config.setDesktopGroup(); config.setDesktopGroup();
execStr = config.readPathEntry( "Exec" ); execStr = config.readPathEntry( "Exec" );
@ -3923,7 +3923,7 @@ void KExecPropsPlugin::applyChanges()
} }
f.close(); f.close();
KSimpleConfig config( path ); TDESimpleConfig config( path );
config.setDesktopGroup(); config.setDesktopGroup();
config.writeEntry( "Type", TQString::fromLatin1("Application")); config.writeEntry( "Type", TQString::fromLatin1("Application"));
config.writePathEntry( "Exec", execEdit->text() ); config.writePathEntry( "Exec", execEdit->text() );
@ -4166,7 +4166,7 @@ void TDEApplicationPropsPlugin::applyChanges()
} }
f.close(); f.close();
KSimpleConfig config( path ); TDESimpleConfig config( path );
config.setDesktopGroup(); config.setDesktopGroup();
config.writeEntry( "Type", TQString::fromLatin1("Application")); config.writeEntry( "Type", TQString::fromLatin1("Application"));
config.writeEntry( "Comment", commentEdit->text() ); config.writeEntry( "Comment", commentEdit->text() );

@ -38,7 +38,7 @@
#include <kseparator.h> #include <kseparator.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
#include <tdeapplication.h> #include <tdeapplication.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdemessagebox.h> #include <tdemessagebox.h>
class KFileSharePropsPlugin::Private class KFileSharePropsPlugin::Private

@ -26,7 +26,7 @@
* *
*/ */
#include <tderecentdirs.h> #include <tderecentdirs.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdestandarddirs.h> #include <tdestandarddirs.h>
#include <tdeglobalsettings.h> #include <tdeglobalsettings.h>
@ -52,7 +52,7 @@ static TDEConfig *recentdirs_readList(TQString &key, TQStringList &result, bool
if (key[1] == ':') if (key[1] == ':')
{ {
key = key.mid(2); key = key.mid(2);
config = new KSimpleConfig(TQString::fromLatin1("tderecentdirsrc"), readOnly); config = new TDESimpleConfig(TQString::fromLatin1("tderecentdirsrc"), readOnly);
} }
else else
{ {

@ -26,7 +26,7 @@
* *
*/ */
#include <tderecentdocument.h> #include <tderecentdocument.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdestandarddirs.h> #include <tdestandarddirs.h>
#include <tdeapplication.h> #include <tdeapplication.h>
#include <kurl.h> #include <kurl.h>
@ -106,7 +106,7 @@ void TDERecentDocument::add(const KURL& url, const TQString& desktopEntryName)
// check for duplicates // check for duplicates
while(TQFile::exists(ddesktop)){ while(TQFile::exists(ddesktop)){
// see if it points to the same file and application // see if it points to the same file and application
KSimpleConfig tmp(ddesktop); TDESimpleConfig tmp(ddesktop);
tmp.setDesktopGroup(); tmp.setDesktopGroup();
if(tmp.readEntry(TQString::fromLatin1("X-TDE-LastOpenedWith")) if(tmp.readEntry(TQString::fromLatin1("X-TDE-LastOpenedWith"))
== desktopEntryName) == desktopEntryName)
@ -135,7 +135,7 @@ void TDERecentDocument::add(const KURL& url, const TQString& desktopEntryName)
} }
// create the applnk // create the applnk
KSimpleConfig conf(ddesktop); TDESimpleConfig conf(ddesktop);
conf.setDesktopGroup(); conf.setDesktopGroup();
conf.writeEntry( TQString::fromLatin1("Type"), TQString::fromLatin1("Link") ); conf.writeEntry( TQString::fromLatin1("Type"), TQString::fromLatin1("Link") );
conf.writePathEntry( TQString::fromLatin1("URL"), openStr ); conf.writePathEntry( TQString::fromLatin1("URL"), openStr );

@ -44,7 +44,7 @@ extern "C" {
#include <tdeapplication.h> #include <tdeapplication.h>
#include <tdeglobal.h> #include <tdeglobal.h>
#include <tdelocale.h> #include <tdelocale.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <kdebug.h> #include <kdebug.h>
#include <kdialog.h> #include <kdialog.h>
#include <tdemessagebox.h> #include <tdemessagebox.h>
@ -3455,7 +3455,7 @@ void CopyJob::copyNextFile()
if ( f.open( IO_ReadWrite ) ) if ( f.open( IO_ReadWrite ) )
{ {
f.close(); f.close();
KSimpleConfig config( path ); TDESimpleConfig config( path );
config.setDesktopGroup(); config.setDesktopGroup();
KURL url = (*it).uSource; KURL url = (*it).uSource;
url.setPass( "" ); url.setPass( "" );

@ -25,7 +25,7 @@
#include <kdebug.h> #include <kdebug.h>
#include <tdeapplication.h> #include <tdeapplication.h>
#include <tqfile.h> #include <tqfile.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdestandarddirs.h> #include <tdestandarddirs.h>
#include <kstaticdeleter.h> #include <kstaticdeleter.h>
#include <klargefile.h> #include <klargefile.h>
@ -103,14 +103,14 @@ class KMimeMagicUtimeConf {
if ( !confDirs.isEmpty() ) { if ( !confDirs.isEmpty() ) {
TQString globalConf = confDirs.last() + "kmimemagicrc"; TQString globalConf = confDirs.last() + "kmimemagicrc";
if ( TQFile::exists( globalConf ) ) { if ( TQFile::exists( globalConf ) ) {
KSimpleConfig cfg( globalConf ); TDESimpleConfig cfg( globalConf );
cfg.setGroup( "Settings" ); cfg.setGroup( "Settings" );
tmpDirs = cfg.readListEntry( "atimeDirs" ); tmpDirs = cfg.readListEntry( "atimeDirs" );
} }
if ( confDirs.count() > 1 ) { if ( confDirs.count() > 1 ) {
TQString localConf = confDirs.first() + "kmimemagicrc"; TQString localConf = confDirs.first() + "kmimemagicrc";
if ( TQFile::exists( localConf ) ) { if ( TQFile::exists( localConf ) ) {
KSimpleConfig cfg( localConf ); TDESimpleConfig cfg( localConf );
cfg.setGroup( "Settings" ); cfg.setGroup( "Settings" );
tmpDirs += cfg.readListEntry( "atimeDirs" ); tmpDirs += cfg.readListEntry( "atimeDirs" );
} }

@ -53,7 +53,7 @@
#include <kdirwatch.h> #include <kdirwatch.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <tdelocale.h> #include <tdelocale.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdestandarddirs.h> #include <tdestandarddirs.h>
#include <kurl.h> #include <kurl.h>
#include <tdesycoca.h> #include <tdesycoca.h>
@ -617,7 +617,7 @@ TQString KFolderType::icon( const KURL& _url, bool _is_local ) const
// a file instead of a directory // a file instead of a directory
if ( TDEStandardDirs::exists( u.path() ) ) if ( TDEStandardDirs::exists( u.path() ) )
{ {
KSimpleConfig cfg( u.path(), true ); TDESimpleConfig cfg( u.path(), true );
cfg.setDesktopGroup(); cfg.setDesktopGroup();
icon = cfg.readEntry( "Icon" ); icon = cfg.readEntry( "Icon" );
TQString empty_icon = cfg.readEntry( "EmptyIcon" ); TQString empty_icon = cfg.readEntry( "EmptyIcon" );
@ -713,7 +713,7 @@ TQString KDEDesktopMimeType::icon( const KURL& _url, bool _is_local ) const
if ( !_is_local ) if ( !_is_local )
return KMimeType::icon( _url, _is_local ); return KMimeType::icon( _url, _is_local );
KSimpleConfig cfg( _url.path(), true ); TDESimpleConfig cfg( _url.path(), true );
cfg.setDesktopGroup(); cfg.setDesktopGroup();
TQString icon = cfg.readEntry( "Icon" ); TQString icon = cfg.readEntry( "Icon" );
TQString type = cfg.readEntry( "Type" ); TQString type = cfg.readEntry( "Type" );
@ -738,7 +738,7 @@ TQString KDEDesktopMimeType::icon( const KURL& _url, bool _is_local ) const
if ( url.protocol() == "trash" ) { if ( url.protocol() == "trash" ) {
// We need to find if the trash is empty, preferrably without using a TDEIO job. // We need to find if the trash is empty, preferrably without using a TDEIO job.
// So instead tdeio_trash leaves an entry in its config file for us. // So instead tdeio_trash leaves an entry in its config file for us.
KSimpleConfig trashConfig( "trashrc", true ); TDESimpleConfig trashConfig( "trashrc", true );
trashConfig.setGroup( "Status" ); trashConfig.setGroup( "Status" );
if ( trashConfig.readBoolEntry( "Empty", true ) ) { if ( trashConfig.readBoolEntry( "Empty", true ) ) {
return emptyIcon; return emptyIcon;
@ -794,7 +794,7 @@ pid_t KDEDesktopMimeType::run( const KURL& u, bool _is_local )
if ( !_is_local ) if ( !_is_local )
return 0; return 0;
KSimpleConfig cfg( u.path(), true ); TDESimpleConfig cfg( u.path(), true );
cfg.setDesktopGroup(); cfg.setDesktopGroup();
TQString type = cfg.readEntry( "Type" ); TQString type = cfg.readEntry( "Type" );
if ( type.isEmpty() ) if ( type.isEmpty() )
@ -826,7 +826,7 @@ pid_t KDEDesktopMimeType::run( const KURL& u, bool _is_local )
return 0; return 0;
} }
pid_t KDEDesktopMimeType::runFSDevice( const KURL& _url, const KSimpleConfig &cfg ) pid_t KDEDesktopMimeType::runFSDevice( const KURL& _url, const TDESimpleConfig &cfg )
{ {
pid_t retval = 0; pid_t retval = 0;
@ -875,7 +875,7 @@ pid_t KDEDesktopMimeType::runApplication( const KURL& , const TQString & _servic
return KRun::run( s, lst ); return KRun::run( s, lst );
} }
pid_t KDEDesktopMimeType::runLink( const KURL& _url, const KSimpleConfig &cfg ) pid_t KDEDesktopMimeType::runLink( const KURL& _url, const TDESimpleConfig &cfg )
{ {
TQString u = cfg.readPathEntry( "URL" ); TQString u = cfg.readPathEntry( "URL" );
if ( u.isEmpty() ) if ( u.isEmpty() )
@ -898,7 +898,7 @@ pid_t KDEDesktopMimeType::runLink( const KURL& _url, const KSimpleConfig &cfg )
return -1; // we don't want to return 0, but we don't want to return a pid return -1; // we don't want to return 0, but we don't want to return a pid
} }
pid_t KDEDesktopMimeType::runMimeType( const KURL& url , const KSimpleConfig & ) pid_t KDEDesktopMimeType::runMimeType( const KURL& url , const TDESimpleConfig & )
{ {
// Hmm, can't really use keditfiletype since we might be looking // Hmm, can't really use keditfiletype since we might be looking
// at the global file, or at a file not in share/mimelnk... // at the global file, or at a file not in share/mimelnk...
@ -924,7 +924,7 @@ TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::builtinServices( co
if ( !_url.isLocalFile() ) if ( !_url.isLocalFile() )
return result; return result;
KSimpleConfig cfg( _url.path(), true ); TDESimpleConfig cfg( _url.path(), true );
cfg.setDesktopGroup(); cfg.setDesktopGroup();
TQString type = cfg.readEntry( "Type" ); TQString type = cfg.readEntry( "Type" );
@ -972,7 +972,7 @@ TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::builtinServices( co
TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices( const TQString& path, bool bLocalFiles ) TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices( const TQString& path, bool bLocalFiles )
{ {
KSimpleConfig cfg( path, true ); TDESimpleConfig cfg( path, true );
return userDefinedServices( path, cfg, bLocalFiles ); return userDefinedServices( path, cfg, bLocalFiles );
} }
@ -1113,7 +1113,7 @@ void KDEDesktopMimeType::executeService( const KURL::List& urls, KDEDesktopMimeT
TQString path = urls.first().path(); TQString path = urls.first().path();
//kdDebug(7009) << "MOUNT&UNMOUNT" << endl; //kdDebug(7009) << "MOUNT&UNMOUNT" << endl;
KSimpleConfig cfg( path, true ); TDESimpleConfig cfg( path, true );
cfg.setDesktopGroup(); cfg.setDesktopGroup();
TQString dev = cfg.readEntry( "Dev" ); TQString dev = cfg.readEntry( "Dev" );
if ( dev.isEmpty() ) if ( dev.isEmpty() )

@ -32,7 +32,7 @@
#include <tdesycocatype.h> #include <tdesycocatype.h>
#include <kservicetype.h> #include <kservicetype.h>
class KSimpleConfig; class TDESimpleConfig;
/** /**
* Represent a mime type, like "text/plain", and the data that is associated * Represent a mime type, like "text/plain", and the data that is associated
* with it. * with it.
@ -607,10 +607,10 @@ protected:
TQString * path = 0L ) const TQString * path = 0L ) const
{ return KMimeType::pixmap( group, force_size, state, path ); } { return KMimeType::pixmap( group, force_size, state, path ); }
static pid_t runFSDevice( const KURL& _url, const KSimpleConfig &cfg ); static pid_t runFSDevice( const KURL& _url, const TDESimpleConfig &cfg );
static pid_t runApplication( const KURL& _url, const TQString & _serviceFile ); static pid_t runApplication( const KURL& _url, const TQString & _serviceFile );
static pid_t runLink( const KURL& _url, const KSimpleConfig &cfg ); static pid_t runLink( const KURL& _url, const TDESimpleConfig &cfg );
static pid_t runMimeType( const KURL& _url, const KSimpleConfig &cfg ); static pid_t runMimeType( const KURL& _url, const TDESimpleConfig &cfg );
protected: protected:
virtual void virtual_hook( int id, void* data ); virtual void virtual_hook( int id, void* data );
}; };

@ -23,7 +23,7 @@
#include <kdirwatch.h> #include <kdirwatch.h>
#include <kstaticdeleter.h> #include <kstaticdeleter.h>
#include <kdebug.h> #include <kdebug.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include "ksambashare.h" #include "ksambashare.h"
@ -62,7 +62,7 @@ bool KSambaSharePrivate::load() {
* @return wether a smb.conf was found. * @return wether a smb.conf was found.
**/ **/
bool KSambaSharePrivate::findSmbConf() { bool KSambaSharePrivate::findSmbConf() {
KSimpleConfig config(TQString::fromLatin1(FILESHARECONF),true); TDESimpleConfig config(TQString::fromLatin1(FILESHARECONF),true);
smbConf = config.readEntry("SMBCONF"); smbConf = config.readEntry("SMBCONF");
if ( TQFile::exists(smbConf) ) if ( TQFile::exists(smbConf) )

@ -37,7 +37,7 @@
#include <tqdir.h> #include <tqdir.h>
#include <tqtl.h> #include <tqtl.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdeapplication.h> #include <tdeapplication.h>
#include <kdebug.h> #include <kdebug.h>
#include <kdesktopfile.h> #include <kdesktopfile.h>

@ -32,7 +32,7 @@
#include <tqdatastream.h> #include <tqdatastream.h>
#include <tqvariant.h> #include <tqvariant.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
/** /**
* A service type is the generic notion for a mimetype, a type of service * A service type is the generic notion for a mimetype, a type of service

@ -32,7 +32,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <errno.h> #include <errno.h>
#include <kdirnotify_stub.h> #include <kdirnotify_stub.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <kuser.h> #include <kuser.h>
KFileShare::Authorization KFileShare::s_authorization = NotInitialized; KFileShare::Authorization KFileShare::s_authorization = NotInitialized;
@ -90,7 +90,7 @@ void KFileShare::readConfig() // static
{ {
// Create KFileSharePrivate instance // Create KFileSharePrivate instance
KFileSharePrivate::self(); KFileSharePrivate::self();
KSimpleConfig config(TQString::fromLatin1(FILESHARECONF),true); TDESimpleConfig config(TQString::fromLatin1(FILESHARECONF),true);
s_sharingEnabled = config.readEntry("FILESHARING", "yes") == "yes"; s_sharingEnabled = config.readEntry("FILESHARING", "yes") == "yes";
s_restricted = config.readEntry("RESTRICT", "yes") == "yes"; s_restricted = config.readEntry("RESTRICT", "yes") == "yes";

@ -27,7 +27,7 @@
#include <kdebug.h> #include <kdebug.h>
#include <tdecmdlineargs.h> #include <tdecmdlineargs.h>
#include <tdestandarddirs.h> #include <tdestandarddirs.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tqdir.h> #include <tqdir.h>
#include <tqregexp.h> #include <tqregexp.h>
@ -172,7 +172,7 @@ int main(int argc, char **argv)
// There is no default search engine by default (since it was annoying when making typos), // There is no default search engine by default (since it was annoying when making typos),
// so the user has to set it up, which we do here. // so the user has to set it up, which we do here.
{ {
KSimpleConfig cfg( "kuriikwsfilterrc" ); TDESimpleConfig cfg( "kuriikwsfilterrc" );
cfg.setGroup( "General" ); cfg.setGroup( "General" );
cfg.writeEntry( "DefaultSearchEngine", "google" ); cfg.writeEntry( "DefaultSearchEngine", "google" );
cfg.writeEntry( "Verbose", true ); cfg.writeEntry( "Verbose", true );
@ -182,7 +182,7 @@ int main(int argc, char **argv)
// Enable verbosity for debugging // Enable verbosity for debugging
{ {
KSimpleConfig cfg( "tdeshorturifilterrc" ); TDESimpleConfig cfg( "tdeshorturifilterrc" );
cfg.writeEntry( "Verbose", true ); cfg.writeEntry( "Verbose", true );
cfg.sync(); cfg.sync();
} }

@ -74,7 +74,7 @@
#include <kdebug.h> #include <kdebug.h>
#include <kurl.h> #include <kurl.h>
#include <kinstance.h> #include <kinstance.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdetempfile.h> #include <tdetempfile.h>
#include <tdelocale.h> #include <tdelocale.h>
#include <tqfile.h> #include <tqfile.h>

@ -36,7 +36,7 @@
#include <kxmlguifactory.h> #include <kxmlguifactory.h>
#include <tdelocale.h> #include <tdelocale.h>
#include <tdeconfig.h> #include <tdeconfig.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
using namespace KParts; using namespace KParts;
@ -256,7 +256,7 @@ void Plugin::loadPlugins( TQObject *parent, KXMLGUIClient* parentGUIClient, TDEI
if( !desktopfile.isEmpty() ) if( !desktopfile.isEmpty() )
{ {
//kdDebug(1000) << "loadPlugins found desktop file for " << name << ": " << desktopfile << endl; //kdDebug(1000) << "loadPlugins found desktop file for " << name << ": " << desktopfile << endl;
KSimpleConfig desktop( desktopfile, true ); TDESimpleConfig desktop( desktopfile, true );
desktop.setDesktopGroup(); desktop.setDesktopGroup();
pluginEnabled = desktop.readBoolEntry( pluginEnabled = desktop.readBoolEntry(
"X-TDE-PluginInfo-EnabledByDefault", enableNewPluginsByDefault ); "X-TDE-PluginInfo-EnabledByDefault", enableNewPluginsByDefault );

@ -38,7 +38,7 @@
#include <kdebug.h> #include <kdebug.h>
#include <tdemessagebox.h> #include <tdemessagebox.h>
#include <tdelocale.h> #include <tdelocale.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <kstaticdeleter.h> #include <kstaticdeleter.h>
#include <tdeapplication.h> #include <tdeapplication.h>
#include <dcopclient.h> #include <dcopclient.h>
@ -312,7 +312,7 @@ KMFactory::PluginInfo KMFactory::pluginInfo(const TQString& name)
TQString path(name); TQString path(name);
if (path[0] != '/') if (path[0] != '/')
path = locate("data", TQString::fromLatin1("tdeprint/plugins/%1.print").arg(name)); path = locate("data", TQString::fromLatin1("tdeprint/plugins/%1.print").arg(name));
KSimpleConfig conf(path); TDESimpleConfig conf(path);
PluginInfo info; PluginInfo info;
conf.setGroup("TDE Print Entry"); conf.setGroup("TDE Print Entry");

@ -27,7 +27,7 @@
#include <tqfile.h> #include <tqfile.h>
#include <tdestandarddirs.h> #include <tdestandarddirs.h>
#include <tdeglobal.h> #include <tdeglobal.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdelocale.h> #include <tdelocale.h>
#include <kdebug.h> #include <kdebug.h>
@ -60,7 +60,7 @@ bool KMSpecialManager::savePrinters()
else else
confname = locateLocal("data","tdeprint/specials.desktop"); confname = locateLocal("data","tdeprint/specials.desktop");
KSimpleConfig conf(confname); TDESimpleConfig conf(confname);
// first clear existing groups // first clear existing groups
conf.setGroup("General"); conf.setGroup("General");
@ -134,7 +134,7 @@ bool KMSpecialManager::loadPrinters()
bool KMSpecialManager::loadDesktopFile(const TQString& filename) bool KMSpecialManager::loadDesktopFile(const TQString& filename)
{ {
KSimpleConfig conf(filename); TDESimpleConfig conf(filename);
conf.setGroup("General"); conf.setGroup("General");
int n = conf.readNumEntry("Number",0); int n = conf.readNumEntry("Number",0);
for (int i=0;i<n;i++) for (int i=0;i<n;i++)

@ -31,7 +31,7 @@
#include <tqvaluelist.h> #include <tqvaluelist.h>
#include <tdestandarddirs.h> #include <tdestandarddirs.h>
#include <tdelocale.h> #include <tdelocale.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <kdialogbase.h> #include <kdialogbase.h>
#include <kdebug.h> #include <kdebug.h>
#include <tdeprocess.h> #include <tdeprocess.h>
@ -218,7 +218,7 @@ void KXmlCommand::check(bool use_xml)
void KXmlCommand::loadDesktop() void KXmlCommand::loadDesktop()
{ {
KSimpleConfig conf(locate("data", "tdeprint/filters/"+name()+".desktop")); TDESimpleConfig conf(locate("data", "tdeprint/filters/"+name()+".desktop"));
conf.setGroup("TDE Print Filter Entry"); conf.setGroup("TDE Print Filter Entry");
d->m_description = conf.readEntry("Comment"); d->m_description = conf.readEntry("Comment");
d->m_outputMime = conf.readEntry("MimeTypeOut"); d->m_outputMime = conf.readEntry("MimeTypeOut");
@ -229,7 +229,7 @@ void KXmlCommand::loadDesktop()
void KXmlCommand::saveDesktop() void KXmlCommand::saveDesktop()
{ {
KSimpleConfig conf(locateLocal("data", "tdeprint/filters/"+name()+".desktop")); TDESimpleConfig conf(locateLocal("data", "tdeprint/filters/"+name()+".desktop"));
conf.setGroup("TDE Print Filter Entry"); conf.setGroup("TDE Print Filter Entry");
conf.writeEntry("Comment", d->m_description); conf.writeEntry("Comment", d->m_description);
conf.writeEntry("MimeTypeIn", d->m_inputMime); conf.writeEntry("MimeTypeIn", d->m_inputMime);

@ -52,7 +52,7 @@
#include <tdepopupmenu.h> #include <tdepopupmenu.h>
#include <klibloader.h> #include <klibloader.h>
#include <kdialogbase.h> #include <kdialogbase.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdestandarddirs.h> #include <tdestandarddirs.h>
#include <tdeapplication.h> #include <tdeapplication.h>
#include <tdeprocess.h> #include <tdeprocess.h>
@ -233,7 +233,7 @@ void KMMainView::initActions()
TQStringList files = TDEGlobal::dirs()->findAllResources("data", "tdeprint/tools/*.desktop"); TQStringList files = TDEGlobal::dirs()->findAllResources("data", "tdeprint/tools/*.desktop");
for (TQStringList::ConstIterator it=files.begin(); it!=files.end(); ++it) for (TQStringList::ConstIterator it=files.begin(); it!=files.end(); ++it)
{ {
KSimpleConfig conf(*it); TDESimpleConfig conf(*it);
conf.setGroup("Desktop Entry"); conf.setGroup("Desktop Entry");
mact->popupMenu()->insertItem(conf.readEntry("Name", "Unnamed"), mact->popupMenu()->count()); mact->popupMenu()->insertItem(conf.readEntry("Name", "Unnamed"), mact->popupMenu()->count());
m_toollist << conf.readEntry("X-TDE-Library"); m_toollist << conf.readEntry("X-TDE-Library");

@ -80,14 +80,14 @@ TQString capitalizeString(TQString in) {
} }
TQString KRandrSimpleAPI::getIccFileName(TQString profileName, TQString screenName, TQString kde_confdir) { TQString KRandrSimpleAPI::getIccFileName(TQString profileName, TQString screenName, TQString kde_confdir) {
KSimpleConfig *t_config = NULL; TDESimpleConfig *t_config = NULL;
KSimpleConfig *t_systemconfig = NULL; TDESimpleConfig *t_systemconfig = NULL;
int t_numberOfProfiles; int t_numberOfProfiles;
TQStringList t_cfgProfiles; TQStringList t_cfgProfiles;
TQString retval; TQString retval;
if ((profileName != NULL) && (profileName != "")) { if ((profileName != NULL) && (profileName != "")) {
t_config = new KSimpleConfig( TQString::fromLatin1( "kiccconfigrc" )); t_config = new TDESimpleConfig( TQString::fromLatin1( "kiccconfigrc" ));
t_config->setGroup(NULL); t_config->setGroup(NULL);
if (t_config->readBoolEntry("EnableICC", false) == true) { if (t_config->readBoolEntry("EnableICC", false) == true) {
t_config->setGroup(profileName); t_config->setGroup(profileName);
@ -99,7 +99,7 @@ TQString KRandrSimpleAPI::getIccFileName(TQString profileName, TQString screenNa
delete t_config; delete t_config;
} }
else { else {
t_systemconfig = new KSimpleConfig( kde_confdir + TQString("/kicc/kiccconfigrc") ); t_systemconfig = new TDESimpleConfig( kde_confdir + TQString("/kicc/kiccconfigrc") );
t_systemconfig->setGroup(NULL); t_systemconfig->setGroup(NULL);
if (t_systemconfig->readBoolEntry("EnableICC", false) == true) { if (t_systemconfig->readBoolEntry("EnableICC", false) == true) {
retval = t_systemconfig->readEntry("ICCFile"); retval = t_systemconfig->readEntry("ICCFile");
@ -266,12 +266,12 @@ TQString KRandrSimpleAPI::applyIccConfiguration(TQString profileName, TQString k
Display *randr_display; Display *randr_display;
ScreenInfo *randr_screen_info; ScreenInfo *randr_screen_info;
XRROutputInfo *output_info; XRROutputInfo *output_info;
KSimpleConfig *t_config; TDESimpleConfig *t_config;
int screenNumber = 0; int screenNumber = 0;
TQString errorstr = ""; TQString errorstr = "";
t_config = new KSimpleConfig( TQString::fromLatin1( "kiccconfigrc" )); t_config = new TDESimpleConfig( TQString::fromLatin1( "kiccconfigrc" ));
// Find all screens // Find all screens
if (isValid() == true) { if (isValid() == true) {
@ -373,9 +373,9 @@ TQByteArray KRandrSimpleAPI::getEDID(int card, TQString displayname) {
TQString KRandrSimpleAPI::getCurrentProfile () { TQString KRandrSimpleAPI::getCurrentProfile () {
TQString profileName; TQString profileName;
KSimpleConfig *t_config; TDESimpleConfig *t_config;
t_config = new KSimpleConfig( TQString::fromLatin1( "kiccconfigrc" )); t_config = new TDESimpleConfig( TQString::fromLatin1( "kiccconfigrc" ));
profileName = t_config->readEntry("CurrentProfile"); profileName = t_config->readEntry("CurrentProfile");
delete t_config; delete t_config;
return profileName; return profileName;
@ -459,7 +459,7 @@ void KRandrSimpleAPI::saveDisplayConfiguration(bool enable, bool applyonstart, T
filename = "displayglobals"; filename = "displayglobals";
filename.prepend(kde_confdir.append("/")); filename.prepend(kde_confdir.append("/"));
KSimpleConfig* display_config = new KSimpleConfig( filename ); TDESimpleConfig* display_config = new TDESimpleConfig( filename );
display_config->setGroup("General"); display_config->setGroup("General");
display_config->writeEntry("EnableDisplayControl", enable); display_config->writeEntry("EnableDisplayControl", enable);
display_config->writeEntry("ApplySettingsOnStart", applyonstart); display_config->writeEntry("ApplySettingsOnStart", applyonstart);
@ -473,7 +473,7 @@ void KRandrSimpleAPI::saveDisplayConfiguration(bool enable, bool applyonstart, T
} }
filename.prepend(kde_confdir.append("/displayconfig/")); filename.prepend(kde_confdir.append("/displayconfig/"));
display_config = new KSimpleConfig( filename ); display_config = new TDESimpleConfig( filename );
i=0; i=0;
SingleScreenData *screendata; SingleScreenData *screendata;
@ -561,7 +561,7 @@ TQPtrList<SingleScreenData> KRandrSimpleAPI::loadDisplayConfiguration(TQString p
} }
filename.prepend(kde_confdir.append("/displayconfig/")); filename.prepend(kde_confdir.append("/displayconfig/"));
KSimpleConfig* display_config = new KSimpleConfig( filename ); TDESimpleConfig* display_config = new TDESimpleConfig( filename );
TQStringList grouplist = display_config->groupList(); TQStringList grouplist = display_config->groupList();
SingleScreenData *screendata; SingleScreenData *screendata;
@ -962,7 +962,7 @@ HotPlugRulesList KRandrSimpleAPI::getHotplugRules(TQString kde_confdir) {
filename = "displayglobals"; filename = "displayglobals";
filename.prepend(kde_confdir.append("/")); filename.prepend(kde_confdir.append("/"));
KSimpleConfig* display_config = new KSimpleConfig( filename ); TDESimpleConfig* display_config = new TDESimpleConfig( filename );
TQStringList grouplist = display_config->groupList(); TQStringList grouplist = display_config->groupList();
for ( TQStringList::Iterator it = grouplist.begin(); it != grouplist.end(); ++it ) { for ( TQStringList::Iterator it = grouplist.begin(); it != grouplist.end(); ++it ) {
@ -987,7 +987,7 @@ void KRandrSimpleAPI::saveHotplugRules(HotPlugRulesList rules, TQString kde_conf
filename = "displayglobals"; filename = "displayglobals";
filename.prepend(kde_confdir.append("/")); filename.prepend(kde_confdir.append("/"));
KSimpleConfig* display_config = new KSimpleConfig( filename ); TDESimpleConfig* display_config = new TDESimpleConfig( filename );
TQStringList grouplist = display_config->groupList(); TQStringList grouplist = display_config->groupList();
for ( TQStringList::Iterator it = grouplist.begin(); it != grouplist.end(); ++it ) { for ( TQStringList::Iterator it = grouplist.begin(); it != grouplist.end(); ++it ) {
if (!(*it).startsWith("Hotplug-Rule")) { if (!(*it).startsWith("Hotplug-Rule")) {
@ -1011,7 +1011,7 @@ void KRandrSimpleAPI::saveHotplugRules(HotPlugRulesList rules, TQString kde_conf
bool KRandrSimpleAPI::getDisplayConfigurationEnabled(TQString kde_confdir) { bool KRandrSimpleAPI::getDisplayConfigurationEnabled(TQString kde_confdir) {
TQString filename = "displayglobals"; TQString filename = "displayglobals";
filename.prepend(kde_confdir.append("/")); filename.prepend(kde_confdir.append("/"));
KSimpleConfig* display_config = new KSimpleConfig( filename ); TDESimpleConfig* display_config = new TDESimpleConfig( filename );
display_config->setGroup("General"); display_config->setGroup("General");
bool enabled = display_config->readBoolEntry("EnableDisplayControl", false); bool enabled = display_config->readBoolEntry("EnableDisplayControl", false);
delete display_config; delete display_config;
@ -1022,7 +1022,7 @@ bool KRandrSimpleAPI::getDisplayConfigurationEnabled(TQString kde_confdir) {
bool KRandrSimpleAPI::getDisplayConfigurationStartupAutoApplyEnabled(TQString kde_confdir) { bool KRandrSimpleAPI::getDisplayConfigurationStartupAutoApplyEnabled(TQString kde_confdir) {
TQString filename = "displayglobals"; TQString filename = "displayglobals";
filename.prepend(kde_confdir.append("/")); filename.prepend(kde_confdir.append("/"));
KSimpleConfig* display_config = new KSimpleConfig( filename ); TDESimpleConfig* display_config = new TDESimpleConfig( filename );
display_config->setGroup("General"); display_config->setGroup("General");
bool applyonstart = display_config->readBoolEntry("ApplySettingsOnStart", false); bool applyonstart = display_config->readBoolEntry("ApplySettingsOnStart", false);
delete display_config; delete display_config;
@ -1033,7 +1033,7 @@ bool KRandrSimpleAPI::getDisplayConfigurationStartupAutoApplyEnabled(TQString kd
TQString KRandrSimpleAPI::getDisplayConfigurationStartupAutoApplyName(TQString kde_confdir) { TQString KRandrSimpleAPI::getDisplayConfigurationStartupAutoApplyName(TQString kde_confdir) {
TQString filename = "displayglobals"; TQString filename = "displayglobals";
filename.prepend(kde_confdir.append("/")); filename.prepend(kde_confdir.append("/"));
KSimpleConfig* display_config = new KSimpleConfig( filename ); TDESimpleConfig* display_config = new TDESimpleConfig( filename );
display_config->setGroup("General"); display_config->setGroup("General");
TQString profilename = display_config->readEntry("StartupProfileName", ""); TQString profilename = display_config->readEntry("StartupProfileName", "");
delete display_config; delete display_config;

@ -32,7 +32,7 @@
#include <tqfile.h> #include <tqfile.h>
#include <tdeconfig.h> #include <tdeconfig.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdelibs_export.h> #include <tdelibs_export.h>
/** /**

@ -30,7 +30,7 @@
#include <kdebug.h> #include <kdebug.h>
#include <tdelocale.h> #include <tdelocale.h>
#include <tdemessagebox.h> #include <tdemessagebox.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdestandarddirs.h> #include <tdestandarddirs.h>
#include <kurlrequester.h> #include <kurlrequester.h>
#include <tdelistview.h> #include <tdelistview.h>

@ -23,7 +23,7 @@
#include <kdebug.h> #include <kdebug.h>
#include <tdelocale.h> #include <tdelocale.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdestandarddirs.h> #include <tdestandarddirs.h>
#include <kstaticdeleter.h> #include <kstaticdeleter.h>

@ -29,7 +29,7 @@
#include <tdecmdlineargs.h> #include <tdecmdlineargs.h>
#include <tdeglobal.h> #include <tdeglobal.h>
#include <tdelocale.h> #include <tdelocale.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdestandarddirs.h> #include <tdestandarddirs.h>
static const char desc[] = I18N_NOOP("TDE Tool to build a cache list of all pixmap themes installed"); static const char desc[] = I18N_NOOP("TDE Tool to build a cache list of all pixmap themes installed");
@ -48,7 +48,7 @@ int main(int argc, char **argv)
for (TQStringList::iterator i = themercs.begin(); i!=themercs.end(); ++i) for (TQStringList::iterator i = themercs.begin(); i!=themercs.end(); ++i)
{ {
TQString file=*i; TQString file=*i;
KSimpleConfig config(file, true); TDESimpleConfig config(file, true);
TQString name = TQFileInfo(file).baseName(); //This is nice and static... TQString name = TQFileInfo(file).baseName(); //This is nice and static...
//So we don't have to worry about our key changing when the language does. //So we don't have to worry about our key changing when the language does.
@ -62,7 +62,7 @@ int main(int argc, char **argv)
} }
} }
KSimpleConfig cache( TDEGlobal::dirs()->saveLocation("config")+"kthemestylerc"); TDESimpleConfig cache( TDEGlobal::dirs()->saveLocation("config")+"kthemestylerc");
#if 0 #if 0
//Doesn't seem to work with present Qt.. //Doesn't seem to work with present Qt..

@ -11,7 +11,7 @@
#include <kdialog.h> #include <kdialog.h>
#include <tdelocale.h> #include <tdelocale.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
#include <tqlayout.h> #include <tqlayout.h>
@ -137,7 +137,7 @@ KComboBoxTest::KComboBoxTest(TQWidget* widget, const char* name )
m_hc->completionObject()->setItems( list ); m_hc->completionObject()->setItems( list );
// Setup konq's combobox // Setup konq's combobox
KSimpleConfig historyConfig( "konq_history" ); TDESimpleConfig historyConfig( "konq_history" );
historyConfig.setGroup( "Location Bar" ); historyConfig.setGroup( "Location Bar" );
TDECompletion * s_pCompletion = new TDECompletion; TDECompletion * s_pCompletion = new TDECompletion;
s_pCompletion->setOrder( TDECompletion::Weighted ); s_pCompletion->setOrder( TDECompletion::Weighted );

@ -18,7 +18,7 @@
*/ */
#include "kplugininfo.h" #include "kplugininfo.h"
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <ktrader.h> #include <ktrader.h>
#include <kdebug.h> #include <kdebug.h>
#include <tdeconfigbase.h> #include <tdeconfigbase.h>

@ -37,7 +37,7 @@
#include <kdebug.h> #include <kdebug.h>
#include <tdelocale.h> #include <tdelocale.h>
#include <tdelistview.h> #include <tdelistview.h>
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <kdialog.h> #include <kdialog.h>
#include <tdeglobal.h> #include <tdeglobal.h>
#include <tdeglobalsettings.h> #include <tdeglobalsettings.h>
@ -589,7 +589,7 @@ void KPluginSelector::addPlugins( const TQString & instanceName,
checkNeedForTabWidget(); checkNeedForTabWidget();
Q_ASSERT( config ); // please set config, or use addPlugins( instance, ... ) which takes care of it Q_ASSERT( config ); // please set config, or use addPlugins( instance, ... ) which takes care of it
if ( !config ) // KDE4: ensure that config is always set; make it second in the arg list? if ( !config ) // KDE4: ensure that config is always set; make it second in the arg list?
config = new KSimpleConfig( instanceName ); // memleak! config = new TDESimpleConfig( instanceName ); // memleak!
TDEConfigGroup * cfgGroup = new TDEConfigGroup( config, "KParts Plugins" ); TDEConfigGroup * cfgGroup = new TDEConfigGroup( config, "KParts Plugins" );
kdDebug( 702 ) << k_funcinfo << "cfgGroup = " << cfgGroup << endl; kdDebug( 702 ) << k_funcinfo << "cfgGroup = " << cfgGroup << endl;
addPluginsInternal( plugininfos, catname, category, cfgGroup ); addPluginsInternal( plugininfos, catname, category, cfgGroup );

@ -95,7 +95,7 @@ class TDEUTILS_EXPORT KPluginSelector : public TQWidget
* always pass a TDEConfig object if you use * always pass a TDEConfig object if you use
* KSettings::PluginPage since you never know from where the * KSettings::PluginPage since you never know from where the
* page will be called (think global config app). * page will be called (think global config app).
* For example KViewCanvas passes KSimpleConfig( * For example KViewCanvas passes TDESimpleConfig(
* "kviewcanvas" ). * "kviewcanvas" ).
*/ */
void addPlugins( const TQString & instanceName, void addPlugins( const TQString & instanceName,
@ -134,7 +134,7 @@ class TDEUTILS_EXPORT KPluginSelector : public TQWidget
* always pass a TDEConfig object if you use * always pass a TDEConfig object if you use
* KSettings::PluginPage since you never know from where the * KSettings::PluginPage since you never know from where the
* page will be called (think global config app). * page will be called (think global config app).
* For example KViewCanvas passes KSimpleConfig( * For example KViewCanvas passes TDESimpleConfig(
* "kviewcanvas" ). * "kviewcanvas" ).
*/ */
void addPlugins( const TQValueList<KPluginInfo*> & plugininfos, void addPlugins( const TQValueList<KPluginInfo*> & plugininfos,

@ -77,7 +77,7 @@ MyAppConfig::MyAppConfig( TQWidget *parent, const char *, const QStringList &arg
\endcode \endcode
For the TDEConfig object you can either use For the TDEConfig object you can either use
TDEGlobal::config() (I don't recommend it) or KSimpleConfig( "myapprc" ). TDEGlobal::config() (I don't recommend it) or TDESimpleConfig( "myapprc" ).
I added a method to KSettings::Dispatcher that gives you the TDEConfig I added a method to KSettings::Dispatcher that gives you the TDEConfig
object for every registered instance name: \ref KSettings::Dispatcher::configForInstanceName object for every registered instance name: \ref KSettings::Dispatcher::configForInstanceName

@ -28,7 +28,7 @@
#include <kplugininfo.h> #include <kplugininfo.h>
#include "ksettings/dispatcher.h" #include "ksettings/dispatcher.h"
#include "ksettings/componentsdialog.h" #include "ksettings/componentsdialog.h"
#include <ksimpleconfig.h> #include <tdesimpleconfig.h>
#include <tdestandarddirs.h> #include <tdestandarddirs.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <tqvbox.h> #include <tqvbox.h>
@ -511,7 +511,7 @@ bool Dialog::isPluginForKCMEnabled( TDECModuleInfo * moduleinfo ) const
void Dialog::parseGroupFile( const TQString & filename ) void Dialog::parseGroupFile( const TQString & filename )
{ {
KSimpleConfig file( filename ); TDESimpleConfig file( filename );
TQStringList groups = file.groupList(); TQStringList groups = file.groupList();
for( TQStringList::ConstIterator it = groups.begin(); it != groups.end(); for( TQStringList::ConstIterator it = groups.begin(); it != groups.end();
++it ) ++it )

@ -93,7 +93,7 @@ TDEConfig * Dispatcher::configForInstanceName( const TQCString & instanceName )
return inst->config(); return inst->config();
} }
//if( fallback ) //if( fallback )
//return new KSimpleConfig( instanceName ); //return new TDESimpleConfig( instanceName );
return 0; return 0;
} }

@ -29,7 +29,7 @@ knotifyclient.cpp \
kcompletionbase.cpp \ kcompletionbase.cpp \
kcompletion.cpp \ kcompletion.cpp \
kmimesourcefactory.cpp \ kmimesourcefactory.cpp \
ksimpleconfig.cpp \ tdesimpleconfig.cpp \
libintl.cpp \ libintl.cpp \
kcatalogue.cpp \ kcatalogue.cpp \
kcalendarsystem.cpp \ kcalendarsystem.cpp \

Loading…
Cancel
Save