From d36503a6e094038b15b064e8731cc1dd2929329a Mon Sep 17 00:00:00 2001 From: Benni Date: Mon, 5 Aug 2024 00:20:54 +0200 Subject: [PATCH] Rename "t_AllowedGames" struct to "AllowedGames" --- src/gameinfo.cpp | 2 +- src/preferencesdlg.cpp | 4 ++-- src/selectgamecolorbox.h | 4 ++-- src/selectgametypebox.h | 4 ++-- src/settings.cpp | 6 +++--- src/settings.h | 6 +++--- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/gameinfo.cpp b/src/gameinfo.cpp index 0c50641..34b9666 100644 --- a/src/gameinfo.cpp +++ b/src/gameinfo.cpp @@ -147,7 +147,7 @@ bool GameInfo::istTrumpf(Card *card) const */ bool GameInfo::isAllowed( CardList* cards, int mode, int color ) { - t_AllowedGames* allowed = NULL; + AllowedGames* allowed = NULL; // it is never allowed to decide to play Ramsch if( mode == GameInfo::RAMSCH ) diff --git a/src/preferencesdlg.cpp b/src/preferencesdlg.cpp index 23eb164..983e06d 100644 --- a/src/preferencesdlg.cpp +++ b/src/preferencesdlg.cpp @@ -54,7 +54,7 @@ PreferencesDlg::~PreferencesDlg() void PreferencesDlg::accept() { ResultValues r; - t_AllowedGames allowed; + AllowedGames allowed; Settings* s = Settings::instance(); s->setResultsType( m_radioMoney->isChecked() ? Settings::MONEY: Settings::POINTS ); @@ -423,7 +423,7 @@ void PreferencesDlg::addPageGames() layout->addItem( spacer, 6, 0 ); // load settings - t_AllowedGames* allowed = Settings::instance()->allowedGames(); + AllowedGames* allowed = Settings::instance()->allowedGames(); m_games_wenz->setChecked( allowed->wenz ); m_games_farbwenz->setChecked( allowed->farb_wenz ); m_games_geier->setChecked( allowed->geier ); diff --git a/src/selectgamecolorbox.h b/src/selectgamecolorbox.h index eda5815..827b499 100644 --- a/src/selectgamecolorbox.h +++ b/src/selectgamecolorbox.h @@ -31,7 +31,7 @@ class Card; class SelectGameWizard; class GameInfo; -struct t_AllowedGames; +struct AllowedGames; /** @author Christian Kern @@ -50,7 +50,7 @@ class SelectGameColorBox : public QWizardPage bool getFinish(); private: - t_AllowedGames* m_allowed; + AllowedGames* m_allowed; protected: GameInfo* m_gameinfo; diff --git a/src/selectgametypebox.h b/src/selectgametypebox.h index 9463c13..13b6587 100644 --- a/src/selectgametypebox.h +++ b/src/selectgametypebox.h @@ -28,7 +28,7 @@ class QLabel; class QRadioButton; class GameInfo; -struct t_AllowedGames; +struct AllowedGames; /** @author Christian Kern @@ -43,7 +43,7 @@ class SelectGameTypeBox : public QWizardPage GameInfo* gameInfo() const; private: - t_AllowedGames* m_allowed; + AllowedGames* m_allowed; protected: QRadioButton* checkRufspiel; diff --git a/src/settings.cpp b/src/settings.cpp index 859d2be..1719532 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -331,10 +331,10 @@ QString Settings::backgroundImage() const } -t_AllowedGames* Settings::allowedGames() const +AllowedGames* Settings::allowedGames() const { QMutexLocker locker( m_mutex ); - t_AllowedGames* a = new t_AllowedGames; + AllowedGames* a = new AllowedGames; KConfigGroup config = m_config->group("Games"); a->wenz = config.readEntry( "AllowWenz", true ); @@ -346,7 +346,7 @@ t_AllowedGames* Settings::allowedGames() const return a; } -void Settings::setAllowedGames( const t_AllowedGames* allowed ) +void Settings::setAllowedGames( const AllowedGames* allowed ) { QMutexLocker locker( m_mutex ); KConfigGroup config = m_config->group("Games"); diff --git a/src/settings.h b/src/settings.h index 67de810..ab70af7 100644 --- a/src/settings.h +++ b/src/settings.h @@ -41,7 +41,7 @@ struct ResultValues { /** a datatype defining which games are allowed to be * played in this game according to the users preferences */ -struct t_AllowedGames { +struct AllowedGames { bool wenz; bool farb_wenz; @@ -117,8 +117,8 @@ class Settings : public QObject /** delete after usage */ - t_AllowedGames* allowedGames() const; - void setAllowedGames( const t_AllowedGames* allowed ); + AllowedGames* allowedGames() const; + void setAllowedGames( const AllowedGames* allowed ); signals: void cardChanged();