Skip to content

Commit

Permalink
Rename "t_AllowedGames" struct to "AllowedGames"
Browse files Browse the repository at this point in the history
  • Loading branch information
Benni committed Aug 4, 2024
1 parent 88d8642 commit d36503a
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/gameinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
4 changes: 2 additions & 2 deletions src/preferencesdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down Expand Up @@ -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 );
Expand Down
4 changes: 2 additions & 2 deletions src/selectgamecolorbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Card;
class SelectGameWizard;
class GameInfo;

struct t_AllowedGames;
struct AllowedGames;

/**
@author Christian Kern
Expand All @@ -50,7 +50,7 @@ class SelectGameColorBox : public QWizardPage
bool getFinish();

private:
t_AllowedGames* m_allowed;
AllowedGames* m_allowed;

protected:
GameInfo* m_gameinfo;
Expand Down
4 changes: 2 additions & 2 deletions src/selectgametypebox.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class QLabel;
class QRadioButton;
class GameInfo;

struct t_AllowedGames;
struct AllowedGames;

/**
@author Christian Kern
Expand All @@ -43,7 +43,7 @@ class SelectGameTypeBox : public QWizardPage
GameInfo* gameInfo() const;

private:
t_AllowedGames* m_allowed;
AllowedGames* m_allowed;

protected:
QRadioButton* checkRufspiel;
Expand Down
6 changes: 3 additions & 3 deletions src/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand All @@ -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");
Expand Down
6 changes: 3 additions & 3 deletions src/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit d36503a

Please sign in to comment.