diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:58:26 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:58:26 +0000 |
commit | 838baf3f99ec5ab81b063eb5449a3381d860f377 (patch) | |
tree | dd31abcfde08ca92e4623b8f50b3d762a87c997a /libkdegames/highscore/khighscore.cpp | |
parent | 2bf598bafa22fac4126fc8842df6b0119aadc0e9 (diff) | |
download | tdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.tar.gz tdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.zip |
TQt4 port kdegames
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1236074 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdegames/highscore/khighscore.cpp')
-rw-r--r-- | libkdegames/highscore/khighscore.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/libkdegames/highscore/khighscore.cpp b/libkdegames/highscore/khighscore.cpp index 26bb47c3..dd10f2ab 100644 --- a/libkdegames/highscore/khighscore.cpp +++ b/libkdegames/highscore/khighscore.cpp @@ -56,14 +56,14 @@ static KStaticDeleter<KFileLock> lockSD; static KStaticDeleter<KRawConfig> configSD; -KHighscore::KHighscore(TQObject* parent) - : TQObject(parent) +KHighscore::KHighscore(TQObject* tqparent) + : TQObject(tqparent) { init(true); } -KHighscore::KHighscore(bool forceLocal, TQObject* parent) - : TQObject(parent) +KHighscore::KHighscore(bool forceLocal, TQObject* tqparent) + : TQObject(tqparent) { init(forceLocal); } @@ -96,7 +96,7 @@ void KHighscore::init(const char *appname) { #ifdef HIGHSCORE_DIRECTORY const TQString filename = TQString::fromLocal8Bit("%1/%2.scores") - .arg(HIGHSCORE_DIRECTORY).arg(appname); + .tqarg(HIGHSCORE_DIRECTORY).tqarg(appname); int fd = open(filename.local8Bit(), O_RDWR); if ( fd<0 ) kdFatal(11002) << "cannot open global highscore file \"" << filename << "\"" << endl; @@ -132,7 +132,7 @@ bool KHighscore::lockForWriting(TQWidget *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."), TQString::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(), item, "ask_lock_global_highscore_file"); if ( res==KMessageBox::Cancel ) break; } else sleep(1); first = false; @@ -169,7 +169,7 @@ void KHighscore::writeEntry(int entry, const TQString& key, const TQVariant& val { Q_ASSERT( isLocked() ); KConfigGroupSaver cg(config(), group()); - TQString confKey = TQString("%1_%2").arg(entry).arg(key); + TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key); cg.config()->writeEntry(confKey, value); } @@ -177,7 +177,7 @@ void KHighscore::writeEntry(int entry, const TQString& key, int value) { Q_ASSERT( isLocked() ); KConfigGroupSaver cg(config(), group()); - TQString confKey = TQString("%1_%2").arg(entry).arg(key); + TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key); cg.config()->writeEntry(confKey, value); } @@ -185,35 +185,35 @@ void KHighscore::writeEntry(int entry, const TQString& key, const TQString &valu { Q_ASSERT (isLocked() ); KConfigGroupSaver cg(config(), group()); - TQString confKey = TQString("%1_%2").arg(entry).arg(key); + TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key); cg.config()->writeEntry(confKey, value); } TQVariant KHighscore::readPropertyEntry(int entry, const TQString& key, const TQVariant& pDefault) const { KConfigGroupSaver cg(config(), group()); - TQString confKey = TQString("%1_%2").arg(entry).arg(key); + TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key); return cg.config()->readPropertyEntry(confKey, pDefault); } TQString KHighscore::readEntry(int entry, const TQString& key, const TQString& pDefault) const { KConfigGroupSaver cg(config(), group()); - TQString confKey = TQString("%1_%2").arg(entry).arg(key); + TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key); return cg.config()->readEntry(confKey, pDefault); } int KHighscore::readNumEntry(int entry, const TQString& key, int pDefault) const { KConfigGroupSaver cg(config(), group()); - TQString confKey = TQString("%1_%2").arg(entry).arg(key); + TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key); return cg.config()->readNumEntry(confKey, pDefault); } bool KHighscore::hasEntry(int entry, const TQString& key) const { KConfigGroupSaver cg(config(), group()); - TQString confKey = TQString("%1_%2").arg(entry).arg(key); + TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key); return cg.config()->hasKey(confKey); } @@ -246,9 +246,9 @@ const TQString& KHighscore::highscoreGroup() const TQString KHighscore::group() const { if ( highscoreGroup().isNull() ) - return (d->global ? TQString::null : GROUP); + return (d->global ? TQString() : GROUP); return (d->global ? highscoreGroup() - : TQString("%1_%2").arg(GROUP).arg(highscoreGroup())); + : TQString("%1_%2").tqarg(GROUP).tqarg(highscoreGroup())); } bool KHighscore::hasTable() const |