diff options
Diffstat (limited to 'libkdegames/highscore/khighscore.cpp')
-rw-r--r-- | libkdegames/highscore/khighscore.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/libkdegames/highscore/khighscore.cpp b/libkdegames/highscore/khighscore.cpp index 4e1f68e5..26bb47c3 100644 --- a/libkdegames/highscore/khighscore.cpp +++ b/libkdegames/highscore/khighscore.cpp @@ -46,7 +46,7 @@ class KHighscorePrivate public: KHighscorePrivate() {} - QString group; + TQString group; bool global; }; @@ -56,14 +56,14 @@ static KStaticDeleter<KFileLock> lockSD; static KStaticDeleter<KRawConfig> configSD; -KHighscore::KHighscore(QObject* parent) - : QObject(parent) +KHighscore::KHighscore(TQObject* parent) + : TQObject(parent) { init(true); } -KHighscore::KHighscore(bool forceLocal, QObject* parent) - : QObject(parent) +KHighscore::KHighscore(bool forceLocal, TQObject* parent) + : TQObject(parent) { init(forceLocal); } @@ -95,7 +95,7 @@ void KHighscore::readCurrentConfig() void KHighscore::init(const char *appname) { #ifdef HIGHSCORE_DIRECTORY - const QString filename = QString::fromLocal8Bit("%1/%2.scores") + const TQString filename = TQString::fromLocal8Bit("%1/%2.scores") .arg(HIGHSCORE_DIRECTORY).arg(appname); int fd = open(filename.local8Bit(), O_RDWR); if ( fd<0 ) kdFatal(11002) << "cannot open global highscore file \"" @@ -111,7 +111,7 @@ void KHighscore::init(const char *appname) #endif } -bool KHighscore::lockForWriting(QWidget *widget) +bool KHighscore::lockForWriting(TQWidget *widget) { if ( isLocked() ) return true; @@ -132,7 +132,7 @@ bool KHighscore::lockForWriting(QWidget *widget) if ( !first ) { KGuiItem item = KStdGuiItem::cont(); item.setText(i18n("Retry")); - int res = KMessageBox::warningContinueCancel(widget, i18n("Cannot access the highscore file. Another user is probably currently writing to it."), QString::null, item, "ask_lock_global_highscore_file"); + int res = KMessageBox::warningContinueCancel(widget, i18n("Cannot access the highscore file. Another user is probably currently writing to it."), TQString::null, item, "ask_lock_global_highscore_file"); if ( res==KMessageBox::Cancel ) break; } else sleep(1); first = false; @@ -165,90 +165,90 @@ KConfig* KHighscore::config() const return (d->global ? _config : kapp->config()); } -void KHighscore::writeEntry(int entry, const QString& key, const QVariant& value) +void KHighscore::writeEntry(int entry, const TQString& key, const TQVariant& value) { Q_ASSERT( isLocked() ); KConfigGroupSaver cg(config(), group()); - QString confKey = QString("%1_%2").arg(entry).arg(key); + TQString confKey = TQString("%1_%2").arg(entry).arg(key); cg.config()->writeEntry(confKey, value); } -void KHighscore::writeEntry(int entry, const QString& key, int value) +void KHighscore::writeEntry(int entry, const TQString& key, int value) { Q_ASSERT( isLocked() ); KConfigGroupSaver cg(config(), group()); - QString confKey = QString("%1_%2").arg(entry).arg(key); + TQString confKey = TQString("%1_%2").arg(entry).arg(key); cg.config()->writeEntry(confKey, value); } -void KHighscore::writeEntry(int entry, const QString& key, const QString &value) +void KHighscore::writeEntry(int entry, const TQString& key, const TQString &value) { Q_ASSERT (isLocked() ); KConfigGroupSaver cg(config(), group()); - QString confKey = QString("%1_%2").arg(entry).arg(key); + TQString confKey = TQString("%1_%2").arg(entry).arg(key); cg.config()->writeEntry(confKey, value); } -QVariant KHighscore::readPropertyEntry(int entry, const QString& key, const QVariant& pDefault) const +TQVariant KHighscore::readPropertyEntry(int entry, const TQString& key, const TQVariant& pDefault) const { KConfigGroupSaver cg(config(), group()); - QString confKey = QString("%1_%2").arg(entry).arg(key); + TQString confKey = TQString("%1_%2").arg(entry).arg(key); return cg.config()->readPropertyEntry(confKey, pDefault); } -QString KHighscore::readEntry(int entry, const QString& key, const QString& pDefault) const +TQString KHighscore::readEntry(int entry, const TQString& key, const TQString& pDefault) const { KConfigGroupSaver cg(config(), group()); - QString confKey = QString("%1_%2").arg(entry).arg(key); + TQString confKey = TQString("%1_%2").arg(entry).arg(key); return cg.config()->readEntry(confKey, pDefault); } -int KHighscore::readNumEntry(int entry, const QString& key, int pDefault) const +int KHighscore::readNumEntry(int entry, const TQString& key, int pDefault) const { KConfigGroupSaver cg(config(), group()); - QString confKey = QString("%1_%2").arg(entry).arg(key); + TQString confKey = TQString("%1_%2").arg(entry).arg(key); return cg.config()->readNumEntry(confKey, pDefault); } -bool KHighscore::hasEntry(int entry, const QString& key) const +bool KHighscore::hasEntry(int entry, const TQString& key) const { KConfigGroupSaver cg(config(), group()); - QString confKey = QString("%1_%2").arg(entry).arg(key); + TQString confKey = TQString("%1_%2").arg(entry).arg(key); return cg.config()->hasKey(confKey); } -QStringList KHighscore::readList(const QString& key, int lastEntry) const +TQStringList KHighscore::readList(const TQString& key, int lastEntry) const { - QStringList list; + TQStringList list; for (int i = 1; hasEntry(i, key) && ((lastEntry > 0) ? (i <= lastEntry) : true); i++) { list.append(readEntry(i, key)); } return list; } -void KHighscore::writeList(const QString& key, const QStringList& list) +void KHighscore::writeList(const TQString& key, const TQStringList& list) { for (int unsigned i = 1; i <= list.count(); i++) { writeEntry(i, key, list[i - 1]); } } -void KHighscore::setHighscoreGroup(const QString& group) +void KHighscore::setHighscoreGroup(const TQString& group) { d->group = group; } -const QString& KHighscore::highscoreGroup() const +const TQString& KHighscore::highscoreGroup() const { return d->group; } -QString KHighscore::group() const +TQString KHighscore::group() const { if ( highscoreGroup().isNull() ) - return (d->global ? QString::null : GROUP); + return (d->global ? TQString::null : GROUP); return (d->global ? highscoreGroup() - : QString("%1_%2").arg(GROUP).arg(highscoreGroup())); + : TQString("%1_%2").arg(GROUP).arg(highscoreGroup())); } bool KHighscore::hasTable() const |