diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-25 00:32:59 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-25 00:32:59 -0600 |
commit | 2f84d0e2d3d4252e6aee24aceafa45dbdb7f4d1d (patch) | |
tree | ea24a96bad3bb7356ec1a2dca2a1338692d79745 /libtdegames/highscore | |
parent | d6f3812c8d969a673b420beca2482804177704fb (diff) | |
download | tdegames-2f84d0e2d3d4252e6aee24aceafa45dbdb7f4d1d.tar.gz tdegames-2f84d0e2d3d4252e6aee24aceafa45dbdb7f4d1d.zip |
Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4
Diffstat (limited to 'libtdegames/highscore')
-rw-r--r-- | libtdegames/highscore/kconfigrawbackend.cpp | 10 | ||||
-rw-r--r-- | libtdegames/highscore/kconfigrawbackend.h | 12 | ||||
-rw-r--r-- | libtdegames/highscore/kexthighscore_gui.cpp | 4 | ||||
-rw-r--r-- | libtdegames/highscore/kexthighscore_internal.cpp | 8 | ||||
-rw-r--r-- | libtdegames/highscore/kexthighscore_internal.h | 4 | ||||
-rw-r--r-- | libtdegames/highscore/khighscore.cpp | 16 | ||||
-rw-r--r-- | libtdegames/highscore/khighscore.h | 26 | ||||
-rw-r--r-- | libtdegames/highscore/kscoredialog.cpp | 4 |
8 files changed, 42 insertions, 42 deletions
diff --git a/libtdegames/highscore/kconfigrawbackend.cpp b/libtdegames/highscore/kconfigrawbackend.cpp index 95a0ae38..7f75ed5d 100644 --- a/libtdegames/highscore/kconfigrawbackend.cpp +++ b/libtdegames/highscore/kconfigrawbackend.cpp @@ -24,26 +24,26 @@ #include <tqfile.h> -KConfigRawBackEnd::KConfigRawBackEnd(KConfigBase *_config, int fd) - : KConfigINIBackEnd(_config, TQString(), "config", false), +TDEConfigRawBackEnd::TDEConfigRawBackEnd(TDEConfigBase *_config, int fd) + : TDEConfigINIBackEnd(_config, TQString(), "config", false), _fd(fd), _stream(0) { _file.open(IO_ReadOnly, _fd); } -KConfigRawBackEnd::~KConfigRawBackEnd() +TDEConfigRawBackEnd::~TDEConfigRawBackEnd() { if (_stream) fclose(_stream); } -bool KConfigRawBackEnd::parseConfigFiles() +bool TDEConfigRawBackEnd::parseConfigFiles() { _file.reset(); parseSingleConfigFile(_file); return true; } -void KConfigRawBackEnd::sync(bool bMerge) +void TDEConfigRawBackEnd::sync(bool bMerge) { // write-sync is only necessary if there are dirty entries if ( !pConfig->isDirty() || pConfig->isReadOnly() ) return; diff --git a/libtdegames/highscore/kconfigrawbackend.h b/libtdegames/highscore/kconfigrawbackend.h index 43b87321..249fa22b 100644 --- a/libtdegames/highscore/kconfigrawbackend.h +++ b/libtdegames/highscore/kconfigrawbackend.h @@ -26,11 +26,11 @@ #include <ksimpleconfig.h> -class KConfigRawBackEnd : public KConfigINIBackEnd +class TDEConfigRawBackEnd : public TDEConfigINIBackEnd { public: - KConfigRawBackEnd(KConfigBase *_config, int fd); - ~KConfigRawBackEnd(); + TDEConfigRawBackEnd(TDEConfigBase *_config, int fd); + ~TDEConfigRawBackEnd(); bool parseConfigFiles(); @@ -41,8 +41,8 @@ private: FILE *_stream; TQFile _file; - class KConfigRawBackEndPrivate; - KConfigRawBackEndPrivate *d; + class TDEConfigRawBackEndPrivate; + TDEConfigRawBackEndPrivate *d; }; class KRawConfig : public KSimpleConfig @@ -51,7 +51,7 @@ class KRawConfig : public KSimpleConfig public: KRawConfig(int fd, bool readOnly) - : KSimpleConfig(new KConfigRawBackEnd(this, fd), readOnly) {} + : KSimpleConfig(new TDEConfigRawBackEnd(this, fd), readOnly) {} }; diff --git a/libtdegames/highscore/kexthighscore_gui.cpp b/libtdegames/highscore/kexthighscore_gui.cpp index 8ae91963..fa1a1887 100644 --- a/libtdegames/highscore/kexthighscore_gui.cpp +++ b/libtdegames/highscore/kexthighscore_gui.cpp @@ -253,7 +253,7 @@ void HighscoresDialog::slotUser2() { KURL url = KFileDialog::getSaveURL(TQString(), TQString(), this); if ( url.isEmpty() ) return; - if ( KIO::NetAccess::exists(url, true, this) ) { + if ( TDEIO::NetAccess::exists(url, true, this) ) { KGuiItem gi = KStdGuiItem::save(); gi.setText(i18n("Overwrite")); int res = KMessageBox::warningContinueCancel(this, @@ -264,7 +264,7 @@ void HighscoresDialog::slotUser2() KTempFile tmp; internal->exportHighscores(*tmp.textStream()); tmp.close(); - KIO::NetAccess::upload(tmp.name(), url, this); + TDEIO::NetAccess::upload(tmp.name(), url, this); tmp.unlink(); } diff --git a/libtdegames/highscore/kexthighscore_internal.cpp b/libtdegames/highscore/kexthighscore_internal.cpp index d31ffc3f..dae5be91 100644 --- a/libtdegames/highscore/kexthighscore_internal.cpp +++ b/libtdegames/highscore/kexthighscore_internal.cpp @@ -605,10 +605,10 @@ const char *UNABLE_TO_CONTACT = bool ManagerPrivate::doQuery(const KURL &url, TQWidget *parent, TQDomNamedNodeMap *map) { - KIO::http_update_cache(url, true, 0); // remove cache ! + TDEIO::http_update_cache(url, true, 0); // remove cache ! TQString tmpFile; - if ( !KIO::NetAccess::download(url, tmpFile, parent) ) { + if ( !TDEIO::NetAccess::download(url, tmpFile, parent) ) { TQString details = i18n("Server URL: %1").arg(url.host()); KMessageBox::detailedSorry(parent, i18n(UNABLE_TO_CONTACT), details); return false; @@ -616,7 +616,7 @@ bool ManagerPrivate::doQuery(const KURL &url, TQWidget *parent, TQFile file(tmpFile); if ( !file.open(IO_ReadOnly) ) { - KIO::NetAccess::removeTempFile(tmpFile); + TDEIO::NetAccess::removeTempFile(tmpFile); TQString details = i18n("Unable to open temporary file."); KMessageBox::detailedSorry(parent, i18n(UNABLE_TO_CONTACT), details); return false; @@ -625,7 +625,7 @@ bool ManagerPrivate::doQuery(const KURL &url, TQWidget *parent, TQTextStream t(&file); TQString content = t.read().stripWhiteSpace(); file.close(); - KIO::NetAccess::removeTempFile(tmpFile); + TDEIO::NetAccess::removeTempFile(tmpFile); TQDomDocument doc; if ( doc.setContent(content) ) { diff --git a/libtdegames/highscore/kexthighscore_internal.h b/libtdegames/highscore/kexthighscore_internal.h index 198e4922..f6924662 100644 --- a/libtdegames/highscore/kexthighscore_internal.h +++ b/libtdegames/highscore/kexthighscore_internal.h @@ -173,11 +173,11 @@ class ScoreInfos : public ItemArray }; //----------------------------------------------------------------------------- -class ConfigGroup : public KConfigGroupSaver +class ConfigGroup : public TDEConfigGroupSaver { public: ConfigGroup(const TQString &group = TQString()) - : KConfigGroupSaver(kapp->config(), group) {} + : TDEConfigGroupSaver(kapp->config(), group) {} }; //----------------------------------------------------------------------------- diff --git a/libtdegames/highscore/khighscore.cpp b/libtdegames/highscore/khighscore.cpp index da0c802c..8a36a748 100644 --- a/libtdegames/highscore/khighscore.cpp +++ b/libtdegames/highscore/khighscore.cpp @@ -160,7 +160,7 @@ KHighscore::~KHighscore() delete d; } -KConfig* KHighscore::config() const +TDEConfig* KHighscore::config() const { return (d->global ? _config : kapp->config()); } @@ -168,7 +168,7 @@ KConfig* KHighscore::config() const void KHighscore::writeEntry(int entry, const TQString& key, const TQVariant& value) { Q_ASSERT( isLocked() ); - KConfigGroupSaver cg(config(), group()); + TDEConfigGroupSaver cg(config(), group()); TQString confKey = TQString("%1_%2").arg(entry).arg(key); cg.config()->writeEntry(confKey, value); } @@ -176,7 +176,7 @@ void KHighscore::writeEntry(int entry, const TQString& key, const TQVariant& val void KHighscore::writeEntry(int entry, const TQString& key, int value) { Q_ASSERT( isLocked() ); - KConfigGroupSaver cg(config(), group()); + TDEConfigGroupSaver cg(config(), group()); TQString confKey = TQString("%1_%2").arg(entry).arg(key); cg.config()->writeEntry(confKey, value); } @@ -184,35 +184,35 @@ void KHighscore::writeEntry(int entry, const TQString& key, int value) void KHighscore::writeEntry(int entry, const TQString& key, const TQString &value) { Q_ASSERT (isLocked() ); - KConfigGroupSaver cg(config(), group()); + TDEConfigGroupSaver cg(config(), group()); TQString confKey = TQString("%1_%2").arg(entry).arg(key); cg.config()->writeEntry(confKey, value); } TQVariant KHighscore::readPropertyEntry(int entry, const TQString& key, const TQVariant& pDefault) const { - KConfigGroupSaver cg(config(), group()); + TDEConfigGroupSaver cg(config(), group()); TQString confKey = TQString("%1_%2").arg(entry).arg(key); return cg.config()->readPropertyEntry(confKey, pDefault); } TQString KHighscore::readEntry(int entry, const TQString& key, const TQString& pDefault) const { - KConfigGroupSaver cg(config(), group()); + TDEConfigGroupSaver cg(config(), group()); TQString confKey = TQString("%1_%2").arg(entry).arg(key); return cg.config()->readEntry(confKey, pDefault); } int KHighscore::readNumEntry(int entry, const TQString& key, int pDefault) const { - KConfigGroupSaver cg(config(), group()); + TDEConfigGroupSaver cg(config(), group()); TQString confKey = TQString("%1_%2").arg(entry).arg(key); return cg.config()->readNumEntry(confKey, pDefault); } bool KHighscore::hasEntry(int entry, const TQString& key) const { - KConfigGroupSaver cg(config(), group()); + TDEConfigGroupSaver cg(config(), group()); TQString confKey = TQString("%1_%2").arg(entry).arg(key); return cg.config()->hasKey(confKey); } diff --git a/libtdegames/highscore/khighscore.h b/libtdegames/highscore/khighscore.h index 81ee562e..4cf5778c 100644 --- a/libtdegames/highscore/khighscore.h +++ b/libtdegames/highscore/khighscore.h @@ -26,7 +26,7 @@ #include <tqstring.h> #include <tqobject.h> #include <kdemacros.h> -class KConfig; +class TDEConfig; class KFileLock; class KRawConfig; class KHighscorePrivate; @@ -39,7 +39,7 @@ class KHighscorePrivate; * --enable-highscore-dir=/var/games) and a theoretically unlimited number of * entries. * - * You can specify different "keys" for an entry - just like the KConfig + * You can specify different "keys" for an entry - just like the TDEConfig * keys. But it will be prefixed with the number of the entry. For example you * will probably use something like this to save the name of the player on the * top of the list (ie the winner): @@ -51,7 +51,7 @@ class KHighscorePrivate; * entry. I recommend to use "1", as several convenience methods use this. * * You can also specify different groups using setHighscoreGroup. Just - * like the keys mentioned above the groups behave like groups in KConfig + * like the keys mentioned above the groups behave like groups in TDEConfig * but are prefixed with "KHighscore_". The default group is just "KHighscore". * You might use this e.g. to create different highscore tables like * \code @@ -164,7 +164,7 @@ public: /** * @param entry The number of the entry / the placing of the player * @param key A key for this entry. E.g. "name" for the name of the - * player. Nearly the same as the usual keys in KConfig - but they + * player. Nearly the same as the usual keys in TDEConfig - but they * are prefixed with the entry number * @param value The value of this entry **/ @@ -179,7 +179,7 @@ public: /** * This is an overloaded member function, provided for convenience. * It differs from the above function only in what argument(s) it accepts. - * See KConfigBase documentation for allowed TQVariant::Type. + * See TDEConfigBase documentation for allowed TQVariant::Type. **/ void writeEntry(int entry, const TQString& key, const TQVariant &value); @@ -187,7 +187,7 @@ public: * Reads an entry from the highscore table. * @param entry The number of the entry / the placing to be read * @param key The key of the entry. E.g. "name" for the name of the - * player. Nearly the same as the usual keys in KConfig - but they + * player. Nearly the same as the usual keys in TDEConfig - but they * are prefixed with the entry number * @param pDefault This will be used as default value if the key+pair * entry can't be found. @@ -200,7 +200,7 @@ public: * Read a numeric value. * @param entry The number of the entry / the placing to be read * @param key The key of the entry. E.g. "name" for the name of the - * player. Nearly the same as the usual keys in KConfig - but they + * player. Nearly the same as the usual keys in TDEConfig - but they * are prefixed with the entry number * @param pDefault This will be used as default value if the key+pair * entry can't be found. @@ -211,7 +211,7 @@ public: /** * Read a TQVariant entry. - * See KConfigBase documentation for allowed TQVariant::Type. + * See TDEConfigBase documentation for allowed TQVariant::Type. * * @return the value of this entry+key pair or pDefault if the entry+key * pair doesn't exist or @@ -234,7 +234,7 @@ public: * readEntry(i, key) where i is from 1 to 20. Note that this function * depends on "1" as the first entry! * @param key The key of the entry. E.g. "name" for the name of the - * player. Nearly the same as the usual keys in KConfig - but they + * player. Nearly the same as the usual keys in TDEConfig - but they * are prefixed with the entry number * @param lastEntry the last entry which will be includes into the list. * 1 will include a list with maximal 1 entry - 20 a list with maximal @@ -250,7 +250,7 @@ public: * way of calling writeEntry(i, key, list[i]) from i = 1 to * list.count() * @param key A key for the entry. E.g. "name" for the name of the - * player. Nearly the same as the usual keys in KConfig - but they + * player. Nearly the same as the usual keys in TDEConfig - but they * are prefixed with the entry number * @param list The list of values **/ @@ -288,17 +288,17 @@ public: protected: /** - * @return A groupname to be used in KConfig. Used internally to + * @return A groupname to be used in TDEConfig. Used internally to * prefix the value from highscoreGroup() with "KHighscore_" **/ TQString group() const; /** - * @return A pointer to the KConfig object to be used. This is + * @return A pointer to the TDEConfig object to be used. This is * either kapp->config() (default) or a KSimpleConfig object for * a system-wide highscore file. **/ - KConfig* config() const; + TDEConfig* config() const; void init(bool forceLocal); diff --git a/libtdegames/highscore/kscoredialog.cpp b/libtdegames/highscore/kscoredialog.cpp index a1ed1988..1c3d241a 100644 --- a/libtdegames/highscore/kscoredialog.cpp +++ b/libtdegames/highscore/kscoredialog.cpp @@ -275,7 +275,7 @@ void KScoreDialog::loadScores() TQString key, value; d->loaded = true; d->scores.clear(); - KConfigGroup config(kapp->config(), d->configGroup.utf8()); + TDEConfigGroup config(kapp->config(), d->configGroup.utf8()); d->player = config.readEntry("LastPlayer"); @@ -298,7 +298,7 @@ void KScoreDialog::loadScores() void KScoreDialog::saveScores() { TQString key, value; - KConfigGroup config(kapp->config(), d->configGroup.utf8()); + TDEConfigGroup config(kapp->config(), d->configGroup.utf8()); config.writeEntry("LastPlayer", d->player); |