Use TDESimpleConfig

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/52/head
Michele Calgaro 2 months ago
parent 8329caf4f2
commit 2681b5b264
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -15,7 +15,7 @@
#include <kiconloader.h>
#include <tdeglobal.h>
#include <tdestandarddirs.h>
#include <ksimpleconfig.h>
#include <tdesimpleconfig.h>
#include "molek.h"
#include "feld.h"
#include "settings.h"
@ -67,7 +67,7 @@ void Feld::resetValidDirs()
}
}
void Feld::load (const KSimpleConfig& config)
void Feld::load (const TDESimpleConfig& config)
{
if(moving)
this->killTimers();

@ -22,7 +22,7 @@
#define MAX_UNDO (100)
class KSimpleConfig;
class TDESimpleConfig;
class Molek;
#define FIELD_SIZE 15
@ -45,7 +45,7 @@ public:
void startAnimation (Direction dir);
void done ();
void load (const KSimpleConfig& config);
void load (const TDESimpleConfig& config);
void setMolek(Molek *_mol) { mol = _mol; }

@ -35,7 +35,7 @@
#include <tdelocale.h>
#include <tdestandarddirs.h>
#include <tdeglobal.h>
#include <ksimpleconfig.h>
#include <tdesimpleconfig.h>
#include <tdeglobalsettings.h>
Options settings;
@ -143,7 +143,7 @@ void GameWidget::updateLevel (int l)
return updateLevel(1);
}
KSimpleConfig cfg(levelFile, true);
TDESimpleConfig cfg(levelFile, true);
cfg.setGroup("Level");
feld->load(cfg);

@ -18,7 +18,7 @@
#include <kiconloader.h>
#include <tdeglobal.h>
#include <tdestandarddirs.h>
#include <ksimpleconfig.h>
#include <tdesimpleconfig.h>
#include <tdelocale.h>
#include <kdebug.h>
@ -47,7 +47,7 @@ const atom& Molek::getAtom(uint index) const
return *atoms.at(index - 1);
}
void Molek::load (const KSimpleConfig& config)
void Molek::load (const TDESimpleConfig& config)
{
atoms.clear();
TQString key;

@ -16,7 +16,7 @@
#include "atom.h"
#include <tqvaluelist.h>
class KSimpleConfig;
class TDESimpleConfig;
#define MOLEK_SIZE 15
@ -29,7 +29,7 @@ public:
Molek (TQWidget *parent=0, const char *name=0);
~Molek ();
void load(const KSimpleConfig& config);
void load(const TDESimpleConfig& config);
const atom& getAtom(uint index) const;
int atomSize() const { return atoms.count(); }

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

@ -136,7 +136,7 @@ void KJumpingCube::saveGame(bool saveAs)
KTempFile tempFile;
tempFile.setAutoDelete(true);
KSimpleConfig config(tempFile.name());
TDESimpleConfig config(tempFile.name());
config.setGroup("KJumpingCube");
config.writeEntry("Version",KJC_VERSION);
@ -178,7 +178,7 @@ void KJumpingCube::openGame()
TQString tempFile;
if( TDEIO::NetAccess::download( url, tempFile, this ) )
{
KSimpleConfig config(tempFile,true);
TDESimpleConfig config(tempFile,true);
config.setGroup("KJumpingCube");
if(!config.hasKey("Version"))
{

@ -7,7 +7,7 @@
#include <kdebug.h>
#include <tdeglobal.h>
#include <tdestandarddirs.h>
#include <ksimpleconfig.h>
#include <tdesimpleconfig.h>
#include <klibloader.h>
#include "pluginloader.h"
@ -21,7 +21,7 @@ ObjectList *PluginLoader::loadAll()
for (TQStringList::Iterator it = files.begin(); it != files.end(); ++it)
{
KSimpleConfig cfg(*it);
TDESimpleConfig cfg(*it);
TQString filename(cfg.readEntry("Filename", ""));
libs.append(filename);

@ -27,7 +27,7 @@
#include <sys/file.h>
#include <tdeapplication.h>
#include <ksimpleconfig.h>
#include <tdesimpleconfig.h>
#include <tdeglobal.h>
#include <kstdguiitem.h>
#include <tdelocale.h>

@ -295,7 +295,7 @@ protected:
/**
* @return A pointer to the TDEConfig object to be used. This is
* either tdeApp->config() (default) or a KSimpleConfig object for
* either tdeApp->config() (default) or a TDESimpleConfig object for
* a system-wide highscore file.
**/
TDEConfig* config() const;

@ -23,7 +23,7 @@
#include <tqfile.h>
#include <tdeconfigbackend.h>
#include <ksimpleconfig.h>
#include <tdesimpleconfig.h>
class TDEConfigRawBackEnd : public TDEConfigINIBackEnd
@ -45,13 +45,13 @@ private:
TDEConfigRawBackEndPrivate *d;
};
class KRawConfig : public KSimpleConfig
class KRawConfig : public TDESimpleConfig
{
TQ_OBJECT
public:
KRawConfig(int fd, bool readOnly)
: KSimpleConfig(new TDEConfigRawBackEnd(this, fd), readOnly) {}
: TDESimpleConfig(new TDEConfigRawBackEnd(this, fd), readOnly) {}
};

@ -35,7 +35,7 @@
#include <tdelocale.h>
#include <tdestandarddirs.h>
#include <kiconview.h>
#include <ksimpleconfig.h>
#include <tdesimpleconfig.h>
#include "kcarddialog.h"
#include <tqpushbutton.h>
@ -464,7 +464,7 @@ void KCardDialog::insertCardIcons()
for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it)
{
KSimpleConfig cfg(*it);
TDESimpleConfig cfg(*it);
cfg.setGroup(TQString::fromLatin1("KDE Backdeck"));
TQString path = (*it).left((*it).findRev('/') + 1);
assert(path[path.length() - 1] == '/');
@ -500,7 +500,7 @@ void KCardDialog::insertDeckIcons()
for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it)
{
KSimpleConfig cfg(*it);
TDESimpleConfig cfg(*it);
TQPixmap pixmap(getDeckName(*it));
if (pixmap.isNull())
continue;
@ -742,7 +742,7 @@ void KCardDialog::saveConfig(TDEConfig* conf)
void KCardDialog::slotSetGlobalDeck()
{
KSimpleConfig* conf = new KSimpleConfig(TQString::fromLatin1("kdeglobals"), false);
TDESimpleConfig* conf = new TDESimpleConfig(TQString::fromLatin1("kdeglobals"), false);
conf->setGroup(CONF_GLOBAL_GROUP);
conf->writeEntry(CONF_GLOBAL_DECK, deck());
@ -753,7 +753,7 @@ void KCardDialog::slotSetGlobalDeck()
void KCardDialog::slotSetGlobalCardDir()
{
KSimpleConfig* conf = new KSimpleConfig(TQString::fromLatin1("kdeglobals"), false);
TDESimpleConfig* conf = new TDESimpleConfig(TQString::fromLatin1("kdeglobals"), false);
conf->setGroup(CONF_GLOBAL_GROUP);
conf->writePathEntry(CONF_GLOBAL_CARDDIR, cardDir());
@ -764,7 +764,7 @@ void KCardDialog::slotSetGlobalCardDir()
void KCardDialog::getGlobalDeck(TQString& deck, bool& random)
{
KSimpleConfig* conf = new KSimpleConfig(TQString::fromLatin1("kdeglobals"), true);
TDESimpleConfig* conf = new TDESimpleConfig(TQString::fromLatin1("kdeglobals"), true);
conf->setGroup(CONF_GLOBAL_GROUP);
if (!conf->hasKey(CONF_GLOBAL_DECK) || conf->readBoolEntry(CONF_GLOBAL_RANDOMDECK, false)) {
@ -780,7 +780,7 @@ void KCardDialog::getGlobalDeck(TQString& deck, bool& random)
void KCardDialog::getGlobalCardDir(TQString& dir, bool& random)
{
KSimpleConfig* conf = new KSimpleConfig(TQString::fromLatin1("kdeglobals"), true);
TDESimpleConfig* conf = new TDESimpleConfig(TQString::fromLatin1("kdeglobals"), true);
conf->setGroup(CONF_GLOBAL_GROUP);
if (!conf->hasKey(CONF_GLOBAL_CARDDIR) || conf->readBoolEntry(CONF_GLOBAL_RANDOMCARDDIR, false)) {

Loading…
Cancel
Save