From 2f84d0e2d3d4252e6aee24aceafa45dbdb7f4d1d Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 25 Jan 2013 00:32:59 -0600 Subject: Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4 --- libtdegames/highscore/kconfigrawbackend.cpp | 10 ++++----- libtdegames/highscore/kconfigrawbackend.h | 12 +++++------ libtdegames/highscore/kexthighscore_gui.cpp | 4 ++-- libtdegames/highscore/kexthighscore_internal.cpp | 8 ++++---- libtdegames/highscore/kexthighscore_internal.h | 4 ++-- libtdegames/highscore/khighscore.cpp | 16 +++++++-------- libtdegames/highscore/khighscore.h | 26 ++++++++++++------------ libtdegames/highscore/kscoredialog.cpp | 4 ++-- libtdegames/kcarddialog.cpp | 10 ++++----- libtdegames/kcarddialog.h | 12 +++++------ libtdegames/kchatbase.cpp | 4 ++-- libtdegames/kchatbase.h | 16 +++++++-------- libtdegames/kgame/TODO | 4 ++-- libtdegames/kgame/kmessageserver.h | 2 +- 14 files changed, 66 insertions(+), 66 deletions(-) (limited to 'libtdegames') 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 -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 -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 #include #include -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); diff --git a/libtdegames/kcarddialog.cpp b/libtdegames/kcarddialog.cpp index 4a2c4168..f544f308 100644 --- a/libtdegames/kcarddialog.cpp +++ b/libtdegames/kcarddialog.cpp @@ -49,7 +49,7 @@ #define SLIDER_MIN 400 #define SLIDER_MAX 3000 -// KConfig entries +// TDEConfig entries #define CONF_GROUP "KCardDialog" #define CONF_RANDOMDECK TQString::fromLatin1("RandomDeck") #define CONF_DECK TQString::fromLatin1("Deck") @@ -111,7 +111,7 @@ public: int KCardDialog::getCardDeck(TQString &pDeck, TQString &pCardDir, TQWidget *pParent, CardFlags pFlags, bool* pRandomDeck, bool* pRandomCardDir, - double* pScale, KConfig* pConf) + double* pScale, TDEConfig* pConf) { KCardDialog dlg(pParent, "dlg", pFlags); @@ -176,7 +176,7 @@ int KCardDialog::getCardDeck(TQString &pDeck, TQString &pCardDir, TQWidget *pPar return result; } -void KCardDialog::getConfigCardDeck(KConfig* conf, TQString &pDeck, TQString &pCardDir, double& pScale) +void KCardDialog::getConfigCardDeck(TDEConfig* conf, TQString &pDeck, TQString &pCardDir, double& pScale) { // TODO check for global cards/decks!!!! if (!conf) { @@ -643,7 +643,7 @@ void KCardDialog::slotRandomCardDirToggled(bool on) } } -void KCardDialog::loadConfig(KConfig* conf) +void KCardDialog::loadConfig(TDEConfig* conf) { if (!conf) { return; @@ -717,7 +717,7 @@ void KCardDialog::slotDefaultSize() d->scaleSlider->setValue(-1000 + SLIDER_MIN + SLIDER_MAX); } -void KCardDialog::saveConfig(KConfig* conf) +void KCardDialog::saveConfig(TDEConfig* conf) { if (!conf) { return; diff --git a/libtdegames/kcarddialog.h b/libtdegames/kcarddialog.h index 58bc3d34..b80e87cd 100644 --- a/libtdegames/kcarddialog.h +++ b/libtdegames/kcarddialog.h @@ -26,7 +26,7 @@ #include class TQIconViewItem; -class KConfig; +class TDEConfig; class KCardDialogPrivate; @@ -63,7 +63,7 @@ class KCardDialogPrivate; * deck/carddir. You have to save the value of those parameters in your config * file - that's why the parameters are needed. * - * You can also provide a KConfig pointer (usually kapp->config()). This + * You can also provide a TDEConfig pointer (usually kapp->config()). This * pointer is used to store information about the dialog in an own group * ("KCardDailog"). * So you can just ignore the randomCardDir and randomDeck @@ -156,7 +156,7 @@ public: */ static int getCardDeck(TQString &deck,TQString &carddir, TQWidget *parent=0, CardFlags flags=Both, bool* randomDeck=0, - bool* randomCardDir=0, double* scale=0, KConfig* conf=0); + bool* randomCardDir=0, double* scale=0, TDEConfig* conf=0); /** * Read the configuration from the applications rc file and put the @@ -173,7 +173,7 @@ public: * random cardDir if this is desired according to the config) * @param scale The scaling factor (usually 1) **/ - static void getConfigCardDeck(KConfig* conf, TQString& deck, TQString& cardDir, double& scale); + static void getConfigCardDeck(TDEConfig* conf, TQString& deck, TQString& cardDir, double& scale); /** * Returns the default path to the card deck backsides. You want @@ -301,7 +301,7 @@ public: * Load the default settings into the dialog (e.g. whether the "use random * deck" checkbox is checked or not). **/ - void loadConfig(KConfig* conf); + void loadConfig(TDEConfig* conf); /** * Saves the KCardDialog config into a config file. This should be the @@ -309,7 +309,7 @@ public: * ("KCardDialog"). These settings are used by @ref loadConfig and @ref * getConfigCardDeck. **/ - void saveConfig(KConfig* conf); + void saveConfig(TDEConfig* conf); protected: diff --git a/libtdegames/kchatbase.cpp b/libtdegames/kchatbase.cpp index 771975ca..5422c552 100644 --- a/libtdegames/kchatbase.cpp +++ b/libtdegames/kchatbase.cpp @@ -465,7 +465,7 @@ const TQFont& KChatBase::systemNameFont() const const TQFont& KChatBase::systemMessageFont() const { return d->mSystemMessageFont; } -void KChatBase::saveConfig(KConfig* conf) +void KChatBase::saveConfig(TDEConfig* conf) { TQString oldGroup; if (!conf) { @@ -485,7 +485,7 @@ void KChatBase::saveConfig(KConfig* conf) } } -void KChatBase::readConfig(KConfig* conf) +void KChatBase::readConfig(TDEConfig* conf) { TQString oldGroup; if (!conf) { diff --git a/libtdegames/kchatbase.h b/libtdegames/kchatbase.h index 5c28f6a7..4c264472 100644 --- a/libtdegames/kchatbase.h +++ b/libtdegames/kchatbase.h @@ -27,7 +27,7 @@ #include class TQListBoxItem; -class KConfig; +class TDEConfig; class KChatBaseTextPrivate; @@ -361,22 +361,22 @@ public: const TQFont& systemMessageFont() const; /** - * Save the configuration of the dialog to a KConfig object. If - * the supplied KConfig pointer is NULL then kapp->config() is used + * Save the configuration of the dialog to a TDEConfig object. If + * the supplied TDEConfig pointer is NULL then kapp->config() is used * instead (and the group is changed to "KChatBase") butr the current * group is restored at the end. - * @param conf A pointer to the KConfig object to save the config + * @param conf A pointer to the TDEConfig object to save the config * to. If you use 0 then kapp->config() is used and the group is changed * to "KChatBase" (the current group is restored at the end). **/ - virtual void saveConfig(KConfig* conf = 0); + virtual void saveConfig(TDEConfig* conf = 0); /** - * Read the configuration from a KConfig object. If the pointer is + * Read the configuration from a TDEConfig object. If the pointer is * NULL kapp->config() is used and the group is changed to "KChatBase". - * The current KConfig::group is restored after this call. + * The current TDEConfig::group is restored after this call. **/ - virtual void readConfig(KConfig* conf = 0); + virtual void readConfig(TDEConfig* conf = 0); /** * Set the maximum number of items in the list. If the number of item diff --git a/libtdegames/kgame/TODO b/libtdegames/kgame/TODO index 2f100b8a..5a80cfe5 100644 --- a/libtdegames/kgame/TODO +++ b/libtdegames/kgame/TODO @@ -12,8 +12,8 @@ the user... - 03.06.2001: can we translate the group of a KPlayer? Probably not as there are no international connections possible then... maybe a group id? -- 05.06.2001: KGameDialog::saveConfig(KConfig*) might be useful (as well as - KGameDialog::loadConfig(KConfig*). Should set an own group in the +- 05.06.2001: KGameDialog::saveConfig(TDEConfig*) might be useful (as well as + KGameDialog::loadConfig(TDEConfig*). Should set an own group in the config file (setGroup("KGameDialog")). Problem: shalll network settings be saved? Could be used for startup configuration (i.e. load the config of the previous game) otherwise. diff --git a/libtdegames/kgame/kmessageserver.h b/libtdegames/kgame/kmessageserver.h index b9b6b66e..66551658 100644 --- a/libtdegames/kgame/kmessageserver.h +++ b/libtdegames/kgame/kmessageserver.h @@ -471,7 +471,7 @@ private: NOTE: This has to be here in the header file, because it is a subclass from TQObject and has to go through the moc. - @short An internal class for KServerSocket + @short An internal class for TDEServerSocket @author Burkhard Lehner */ class KMessageServerSocket : public TQServerSocket -- cgit v1.2.1