From 838baf3f99ec5ab81b063eb5449a3381d860f377 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 11 Jun 2011 04:58:26 +0000 Subject: 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 --- libkdegames/highscore/kconfigrawbackend.cpp | 2 +- libkdegames/highscore/kconfigrawbackend.h | 1 + libkdegames/highscore/kexthighscore.cpp | 18 ++++----- libkdegames/highscore/kexthighscore.h | 8 ++-- libkdegames/highscore/kexthighscore_gui.cpp | 48 +++++++++++------------ libkdegames/highscore/kexthighscore_gui.h | 26 +++++++----- libkdegames/highscore/kexthighscore_internal.cpp | 50 ++++++++++++------------ libkdegames/highscore/kexthighscore_internal.h | 18 ++++----- libkdegames/highscore/kexthighscore_item.cpp | 18 ++++----- libkdegames/highscore/kexthighscore_item.h | 12 +++--- libkdegames/highscore/kexthighscore_tab.cpp | 30 +++++++------- libkdegames/highscore/kexthighscore_tab.h | 16 +++++--- libkdegames/highscore/khighscore.cpp | 30 +++++++------- libkdegames/highscore/khighscore.h | 21 +++++----- libkdegames/highscore/kscoredialog.cpp | 48 +++++++++++------------ libkdegames/highscore/kscoredialog.h | 7 ++-- 16 files changed, 184 insertions(+), 169 deletions(-) (limited to 'libkdegames/highscore') diff --git a/libkdegames/highscore/kconfigrawbackend.cpp b/libkdegames/highscore/kconfigrawbackend.cpp index 29ffa845..c2643056 100644 --- a/libkdegames/highscore/kconfigrawbackend.cpp +++ b/libkdegames/highscore/kconfigrawbackend.cpp @@ -25,7 +25,7 @@ KConfigRawBackEnd::KConfigRawBackEnd(KConfigBase *_config, int fd) - : KConfigINIBackEnd(_config, TQString::null, "config", false), + : KConfigINIBackEnd(_config, TQString(), "config", false), _fd(fd), _stream(0) { _file.open(IO_ReadOnly, _fd); diff --git a/libkdegames/highscore/kconfigrawbackend.h b/libkdegames/highscore/kconfigrawbackend.h index 0c5fde03..6a1ea4b9 100644 --- a/libkdegames/highscore/kconfigrawbackend.h +++ b/libkdegames/highscore/kconfigrawbackend.h @@ -48,6 +48,7 @@ private: class KRawConfig : public KSimpleConfig { Q_OBJECT + TQ_OBJECT public: KRawConfig(int fd, bool readOnly) : KSimpleConfig(new KConfigRawBackEnd(this, fd), readOnly) {} diff --git a/libkdegames/highscore/kexthighscore.cpp b/libkdegames/highscore/kexthighscore.cpp index 585dafd4..22fa4a85 100644 --- a/libkdegames/highscore/kexthighscore.cpp +++ b/libkdegames/highscore/kexthighscore.cpp @@ -44,19 +44,19 @@ void setGameType(uint type) internal->setGameType(type); } -bool configure(TQWidget *parent) +bool configure(TQWidget *tqparent) { internal->checkFirst(); - ConfigDialog *cd = new ConfigDialog(parent); + ConfigDialog *cd = new ConfigDialog(tqparent); cd->exec(); bool saved = cd->hasBeenSaved(); delete cd; return saved; } -void show(TQWidget *parent, int rank) +void show(TQWidget *tqparent, int rank) { - HighscoresDialog *hd = new HighscoresDialog(rank, parent); + HighscoresDialog *hd = new HighscoresDialog(rank, tqparent); hd->exec(); delete hd; } @@ -208,19 +208,19 @@ Item *Manager::createItem(ItemType type) Item *item = 0; switch (type) { case ScoreDefault: - item = new Item((uint)0, i18n("Score"), Qt::AlignRight); + item = new Item((uint)0, i18n("Score"), TQt::AlignRight); break; case MeanScoreDefault: - item = new Item((double)0, i18n("Mean Score"), Qt::AlignRight); + item = new Item((double)0, i18n("Mean Score"), TQt::AlignRight); item->setPrettyFormat(Item::OneDecimal); item->setPrettySpecial(Item::DefaultNotDefined); break; case BestScoreDefault: - item = new Item((uint)0, i18n("Best Score"), Qt::AlignRight); + item = new Item((uint)0, i18n("Best Score"), TQt::AlignRight); item->setPrettySpecial(Item::DefaultNotDefined); break; case ElapsedTime: - item = new Item((uint)0, i18n("Elapsed Time"), Qt::AlignRight); + item = new Item((uint)0, i18n("Elapsed Time"), TQt::AlignRight); item->setPrettyFormat(Item::MinuteTime); item->setPrettySpecial(Item::ZeroNotDefined); break; @@ -272,7 +272,7 @@ TQString Manager::gameTypeLabel(uint gameType, LabelType type) const case I18N: break; case WW: return "normal"; } - return TQString::null; + return TQString(); } void Manager::addToQueryURL(KURL &url, const TQString &item, diff --git a/libkdegames/highscore/kexthighscore.h b/libkdegames/highscore/kexthighscore.h index 5809a896..575ab592 100644 --- a/libkdegames/highscore/kexthighscore.h +++ b/libkdegames/highscore/kexthighscore.h @@ -51,17 +51,17 @@ KDE_EXPORT void setGameType(uint gameType); * Configure the highscores. * @return true if the configuration has been modified and saved */ -KDE_EXPORT bool configure(TQWidget *parent); +KDE_EXPORT bool configure(TQWidget *tqparent); /** * Show the highscores lists. */ -KDE_EXPORT void show(TQWidget *parent); +KDE_EXPORT void show(TQWidget *tqparent); /** * Submit a score. See @ref Manager for usage example. * - * @param widget a widget used as parent for error message box. + * @param widget a widget used as tqparent for error message box. */ KDE_EXPORT void submitScore(const Score &score, TQWidget *widget); @@ -111,7 +111,7 @@ KDE_EXPORT Score firstScore(); * You can replace the score item (for e.g. displaying it differently) with * setScoreItem or add an item with addScoreItem. * - * The players list contains : + * The players list tqcontains : *