Add backwards support Qt6.7's checkStateChanged on QCheckBoxes (#5137)

This commit is contained in:
Zach H 2024-10-20 23:35:34 -04:00 committed by GitHub
parent b041f4ace2
commit 8d5421d9da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 251 additions and 176 deletions

View file

@ -172,7 +172,11 @@ bool SpoilerBackgroundUpdater::saveDownloadedFile(QByteArray data)
timeStamp.chop(6); // Remove " (UTC)" timeStamp.chop(6); // Remove " (UTC)"
auto utcTime = QLocale().toDateTime(timeStamp, "ddd, MMM dd yyyy, hh:mm:ss"); auto utcTime = QLocale().toDateTime(timeStamp, "ddd, MMM dd yyyy, hh:mm:ss");
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
utcTime.setTimeZone(QTimeZone::UTC);
#else
utcTime.setTimeSpec(Qt::UTC); utcTime.setTimeSpec(Qt::UTC);
#endif
QString localTime = utcTime.toLocalTime().toString("MMM d, hh:mm"); QString localTime = utcTime.toLocalTime().toString("MMM d, hh:mm");

View file

@ -2,6 +2,7 @@
#include "../server/user/user_info_connection.h" #include "../server/user/user_info_connection.h"
#include "../settings/cache_settings.h" #include "../settings/cache_settings.h"
#include "../utility/macros.h"
#include "trice_limits.h" #include "trice_limits.h"
#include <QCheckBox> #include <QCheckBox>
@ -79,7 +80,8 @@ DlgConnect::DlgConnect(QWidget *parent) : QDialog(parent)
autoConnectCheckBox->setEnabled(false); autoConnectCheckBox->setEnabled(false);
} }
connect(savePasswordCheckBox, SIGNAL(stateChanged(int)), this, SLOT(passwordSaved(int))); connect(savePasswordCheckBox, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), this,
SLOT(passwordSaved(QT_STATE_CHANGED_T)));
serverIssuesLabel = serverIssuesLabel =
new QLabel(tr("If you have any trouble connecting or registering then contact the server staff for help!")); new QLabel(tr("If you have any trouble connecting or registering then contact the server staff for help!"));
@ -292,7 +294,7 @@ void DlgConnect::newHostSelected(bool state)
} }
} }
void DlgConnect::passwordSaved(int state) void DlgConnect::passwordSaved(QT_STATE_CHANGED_T state)
{ {
Q_UNUSED(state); Q_UNUSED(state);
if (savePasswordCheckBox->isChecked()) { if (savePasswordCheckBox->isChecked()) {

View file

@ -3,6 +3,7 @@
#include "../server/handle_public_servers.h" #include "../server/handle_public_servers.h"
#include "../server/user/user_info_connection.h" #include "../server/user/user_info_connection.h"
#include "../utility/macros.h"
#include <QDialog> #include <QDialog>
#include <QLineEdit> #include <QLineEdit>
@ -54,7 +55,7 @@ public slots:
private slots: private slots:
void actOk(); void actOk();
void passwordSaved(int state); void passwordSaved(QT_STATE_CHANGED_T state);
void previousHostSelected(bool state); void previousHostSelected(bool state);
void newHostSelected(bool state); void newHostSelected(bool state);
void actForgotPassword(); void actForgotPassword();

View file

@ -81,7 +81,8 @@ void DlgCreateGame::sharedCtor()
spectatorsAllowedCheckBox = new QCheckBox(tr("&Spectators can watch")); spectatorsAllowedCheckBox = new QCheckBox(tr("&Spectators can watch"));
spectatorsAllowedCheckBox->setChecked(true); spectatorsAllowedCheckBox->setChecked(true);
connect(spectatorsAllowedCheckBox, SIGNAL(stateChanged(int)), this, SLOT(spectatorsAllowedChanged(int))); connect(spectatorsAllowedCheckBox, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), this,
SLOT(spectatorsAllowedChanged(QT_STATE_CHANGED_T)));
spectatorsNeedPasswordCheckBox = new QCheckBox(tr("Spectators &need a password to watch")); spectatorsNeedPasswordCheckBox = new QCheckBox(tr("Spectators &need a password to watch"));
spectatorsCanTalkCheckBox = new QCheckBox(tr("Spectators can &chat")); spectatorsCanTalkCheckBox = new QCheckBox(tr("Spectators can &chat"));
spectatorsSeeEverythingCheckBox = new QCheckBox(tr("Spectators can see &hands")); spectatorsSeeEverythingCheckBox = new QCheckBox(tr("Spectators can see &hands"));
@ -277,7 +278,7 @@ void DlgCreateGame::checkResponse(const Response &response)
} }
} }
void DlgCreateGame::spectatorsAllowedChanged(int state) void DlgCreateGame::spectatorsAllowedChanged(QT_STATE_CHANGED_T state)
{ {
spectatorsNeedPasswordCheckBox->setEnabled(state); spectatorsNeedPasswordCheckBox->setEnabled(state);
spectatorsCanTalkCheckBox->setEnabled(state); spectatorsCanTalkCheckBox->setEnabled(state);

View file

@ -1,6 +1,8 @@
#ifndef DLG_CREATEGAME_H #ifndef DLG_CREATEGAME_H
#define DLG_CREATEGAME_H #define DLG_CREATEGAME_H
#include "../utility/macros.h"
#include <QDialog> #include <QDialog>
#include <QMap> #include <QMap>
@ -26,7 +28,7 @@ private slots:
void actOK(); void actOK();
void actReset(); void actReset();
void checkResponse(const Response &response); void checkResponse(const Response &response);
void spectatorsAllowedChanged(int state); void spectatorsAllowedChanged(QT_STATE_CHANGED_T state);
private: private:
TabRoom *room; TabRoom *room;

View file

@ -73,8 +73,10 @@ GeneralSettingsPage::GeneralSettingsPage()
connect(&languageBox, SIGNAL(currentIndexChanged(int)), this, SLOT(languageBoxChanged(int))); connect(&languageBox, SIGNAL(currentIndexChanged(int)), this, SLOT(languageBoxChanged(int)));
connect(&updateReleaseChannelBox, SIGNAL(currentIndexChanged(int)), &settings, SLOT(setUpdateReleaseChannel(int))); connect(&updateReleaseChannelBox, SIGNAL(currentIndexChanged(int)), &settings, SLOT(setUpdateReleaseChannel(int)));
connect(&updateNotificationCheckBox, SIGNAL(stateChanged(int)), &settings, SLOT(setNotifyAboutUpdate(int))); connect(&updateNotificationCheckBox, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), &settings,
connect(&newVersionOracleCheckBox, SIGNAL(stateChanged(int)), &settings, SLOT(setNotifyAboutNewVersion(int))); SLOT(setNotifyAboutUpdate(QT_STATE_CHANGED_T)));
connect(&newVersionOracleCheckBox, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), &settings,
SLOT(setNotifyAboutNewVersion(QT_STATE_CHANGED_T)));
connect(&showTipsOnStartup, SIGNAL(clicked(bool)), &settings, SLOT(setShowTipsOnStartup(bool))); connect(&showTipsOnStartup, SIGNAL(clicked(bool)), &settings, SLOT(setShowTipsOnStartup(bool)));
auto *personalGrid = new QGridLayout; auto *personalGrid = new QGridLayout;
@ -321,10 +323,12 @@ AppearanceSettingsPage::AppearanceSettingsPage()
themeGroupBox->setLayout(themeGrid); themeGroupBox->setLayout(themeGrid);
displayCardNamesCheckBox.setChecked(settings.getDisplayCardNames()); displayCardNamesCheckBox.setChecked(settings.getDisplayCardNames());
connect(&displayCardNamesCheckBox, SIGNAL(stateChanged(int)), &settings, SLOT(setDisplayCardNames(int))); connect(&displayCardNamesCheckBox, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), &settings,
SLOT(setDisplayCardNames(QT_STATE_CHANGED_T)));
cardScalingCheckBox.setChecked(settings.getScaleCards()); cardScalingCheckBox.setChecked(settings.getScaleCards());
connect(&cardScalingCheckBox, SIGNAL(stateChanged(int)), &settings, SLOT(setCardScaling(int))); connect(&cardScalingCheckBox, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), &settings,
SLOT(setCardScaling(QT_STATE_CHANGED_T)));
verticalCardOverlapPercentBox.setValue(settings.getStackCardOverlapPercent()); verticalCardOverlapPercentBox.setValue(settings.getStackCardOverlapPercent());
verticalCardOverlapPercentBox.setRange(0, 80); verticalCardOverlapPercentBox.setRange(0, 80);
@ -341,10 +345,12 @@ AppearanceSettingsPage::AppearanceSettingsPage()
cardsGroupBox->setLayout(cardsGrid); cardsGroupBox->setLayout(cardsGrid);
horizontalHandCheckBox.setChecked(settings.getHorizontalHand()); horizontalHandCheckBox.setChecked(settings.getHorizontalHand());
connect(&horizontalHandCheckBox, SIGNAL(stateChanged(int)), &settings, SLOT(setHorizontalHand(int))); connect(&horizontalHandCheckBox, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), &settings,
SLOT(setHorizontalHand(QT_STATE_CHANGED_T)));
leftJustifiedHandCheckBox.setChecked(settings.getLeftJustified()); leftJustifiedHandCheckBox.setChecked(settings.getLeftJustified());
connect(&leftJustifiedHandCheckBox, SIGNAL(stateChanged(int)), &settings, SLOT(setLeftJustified(int))); connect(&leftJustifiedHandCheckBox, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), &settings,
SLOT(setLeftJustified(QT_STATE_CHANGED_T)));
auto *handGrid = new QGridLayout; auto *handGrid = new QGridLayout;
handGrid->addWidget(&horizontalHandCheckBox, 0, 0, 1, 2); handGrid->addWidget(&horizontalHandCheckBox, 0, 0, 1, 2);
@ -354,8 +360,8 @@ AppearanceSettingsPage::AppearanceSettingsPage()
handGroupBox->setLayout(handGrid); handGroupBox->setLayout(handGrid);
invertVerticalCoordinateCheckBox.setChecked(settings.getInvertVerticalCoordinate()); invertVerticalCoordinateCheckBox.setChecked(settings.getInvertVerticalCoordinate());
connect(&invertVerticalCoordinateCheckBox, SIGNAL(stateChanged(int)), &settings, connect(&invertVerticalCoordinateCheckBox, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), &settings,
SLOT(setInvertVerticalCoordinate(int))); SLOT(setInvertVerticalCoordinate(QT_STATE_CHANGED_T)));
minPlayersForMultiColumnLayoutEdit.setMinimum(2); minPlayersForMultiColumnLayoutEdit.setMinimum(2);
minPlayersForMultiColumnLayoutEdit.setValue(settings.getMinPlayersForMultiColumnLayout()); minPlayersForMultiColumnLayoutEdit.setValue(settings.getMinPlayersForMultiColumnLayout());
@ -434,35 +440,37 @@ void AppearanceSettingsPage::retranslateUi()
UserInterfaceSettingsPage::UserInterfaceSettingsPage() UserInterfaceSettingsPage::UserInterfaceSettingsPage()
{ {
notificationsEnabledCheckBox.setChecked(SettingsCache::instance().getNotificationsEnabled()); notificationsEnabledCheckBox.setChecked(SettingsCache::instance().getNotificationsEnabled());
connect(&notificationsEnabledCheckBox, SIGNAL(stateChanged(int)), &SettingsCache::instance(), connect(&notificationsEnabledCheckBox, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), &SettingsCache::instance(),
SLOT(setNotificationsEnabled(int))); SLOT(setNotificationsEnabled(QT_STATE_CHANGED_T)));
connect(&notificationsEnabledCheckBox, SIGNAL(stateChanged(int)), this, SLOT(setNotificationEnabled(int))); connect(&notificationsEnabledCheckBox, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), this,
SLOT(setNotificationEnabled(QT_STATE_CHANGED_T)));
specNotificationsEnabledCheckBox.setChecked(SettingsCache::instance().getSpectatorNotificationsEnabled()); specNotificationsEnabledCheckBox.setChecked(SettingsCache::instance().getSpectatorNotificationsEnabled());
specNotificationsEnabledCheckBox.setEnabled(SettingsCache::instance().getNotificationsEnabled()); specNotificationsEnabledCheckBox.setEnabled(SettingsCache::instance().getNotificationsEnabled());
connect(&specNotificationsEnabledCheckBox, SIGNAL(stateChanged(int)), &SettingsCache::instance(), connect(&specNotificationsEnabledCheckBox, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), &SettingsCache::instance(),
SLOT(setSpectatorNotificationsEnabled(int))); SLOT(setSpectatorNotificationsEnabled(QT_STATE_CHANGED_T)));
buddyConnectNotificationsEnabledCheckBox.setChecked( buddyConnectNotificationsEnabledCheckBox.setChecked(
SettingsCache::instance().getBuddyConnectNotificationsEnabled()); SettingsCache::instance().getBuddyConnectNotificationsEnabled());
buddyConnectNotificationsEnabledCheckBox.setEnabled(SettingsCache::instance().getNotificationsEnabled()); buddyConnectNotificationsEnabledCheckBox.setEnabled(SettingsCache::instance().getNotificationsEnabled());
connect(&buddyConnectNotificationsEnabledCheckBox, SIGNAL(stateChanged(int)), &SettingsCache::instance(), connect(&buddyConnectNotificationsEnabledCheckBox, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)),
SLOT(setBuddyConnectNotificationsEnabled(int))); &SettingsCache::instance(), SLOT(setBuddyConnectNotificationsEnabled(QT_STATE_CHANGED_T)));
doubleClickToPlayCheckBox.setChecked(SettingsCache::instance().getDoubleClickToPlay()); doubleClickToPlayCheckBox.setChecked(SettingsCache::instance().getDoubleClickToPlay());
connect(&doubleClickToPlayCheckBox, SIGNAL(stateChanged(int)), &SettingsCache::instance(), connect(&doubleClickToPlayCheckBox, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), &SettingsCache::instance(),
SLOT(setDoubleClickToPlay(int))); SLOT(setDoubleClickToPlay(QT_STATE_CHANGED_T)));
playToStackCheckBox.setChecked(SettingsCache::instance().getPlayToStack()); playToStackCheckBox.setChecked(SettingsCache::instance().getPlayToStack());
connect(&playToStackCheckBox, SIGNAL(stateChanged(int)), &SettingsCache::instance(), SLOT(setPlayToStack(int))); connect(&playToStackCheckBox, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), &SettingsCache::instance(),
SLOT(setPlayToStack(QT_STATE_CHANGED_T)));
annotateTokensCheckBox.setChecked(SettingsCache::instance().getAnnotateTokens()); annotateTokensCheckBox.setChecked(SettingsCache::instance().getAnnotateTokens());
connect(&annotateTokensCheckBox, SIGNAL(stateChanged(int)), &SettingsCache::instance(), connect(&annotateTokensCheckBox, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), &SettingsCache::instance(),
SLOT(setAnnotateTokens(int))); SLOT(setAnnotateTokens(QT_STATE_CHANGED_T)));
useTearOffMenusCheckBox.setChecked(SettingsCache::instance().getUseTearOffMenus()); useTearOffMenusCheckBox.setChecked(SettingsCache::instance().getUseTearOffMenus());
connect(&useTearOffMenusCheckBox, &QCheckBox::stateChanged, &SettingsCache::instance(), connect(&useTearOffMenusCheckBox, &QCheckBox::QT_STATE_CHANGED, &SettingsCache::instance(),
[](int state) { SettingsCache::instance().setUseTearOffMenus(state == Qt::Checked); }); [](QT_STATE_CHANGED_T state) { SettingsCache::instance().setUseTearOffMenus(state == Qt::Checked); });
auto *generalGrid = new QGridLayout; auto *generalGrid = new QGridLayout;
generalGrid->addWidget(&doubleClickToPlayCheckBox, 0, 0); generalGrid->addWidget(&doubleClickToPlayCheckBox, 0, 0);
@ -482,7 +490,8 @@ UserInterfaceSettingsPage::UserInterfaceSettingsPage()
notificationsGroupBox->setLayout(notificationsGrid); notificationsGroupBox->setLayout(notificationsGrid);
tapAnimationCheckBox.setChecked(SettingsCache::instance().getTapAnimation()); tapAnimationCheckBox.setChecked(SettingsCache::instance().getTapAnimation());
connect(&tapAnimationCheckBox, SIGNAL(stateChanged(int)), &SettingsCache::instance(), SLOT(setTapAnimation(int))); connect(&tapAnimationCheckBox, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), &SettingsCache::instance(),
SLOT(setTapAnimation(QT_STATE_CHANGED_T)));
auto *animationGrid = new QGridLayout; auto *animationGrid = new QGridLayout;
animationGrid->addWidget(&tapAnimationCheckBox, 0, 0); animationGrid->addWidget(&tapAnimationCheckBox, 0, 0);
@ -527,7 +536,8 @@ void UserInterfaceSettingsPage::retranslateUi()
DeckEditorSettingsPage::DeckEditorSettingsPage() DeckEditorSettingsPage::DeckEditorSettingsPage()
{ {
picDownloadCheckBox.setChecked(SettingsCache::instance().getPicDownload()); picDownloadCheckBox.setChecked(SettingsCache::instance().getPicDownload());
connect(&picDownloadCheckBox, SIGNAL(stateChanged(int)), &SettingsCache::instance(), SLOT(setPicDownload(int))); connect(&picDownloadCheckBox, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), &SettingsCache::instance(),
SLOT(setPicDownload(QT_STATE_CHANGED_T)));
urlLinkLabel.setTextInteractionFlags(Qt::LinksAccessibleByMouse); urlLinkLabel.setTextInteractionFlags(Qt::LinksAccessibleByMouse);
urlLinkLabel.setOpenExternalLinks(true); urlLinkLabel.setOpenExternalLinks(true);
@ -825,27 +835,30 @@ void DeckEditorSettingsPage::retranslateUi()
MessagesSettingsPage::MessagesSettingsPage() MessagesSettingsPage::MessagesSettingsPage()
{ {
chatMentionCheckBox.setChecked(SettingsCache::instance().getChatMention()); chatMentionCheckBox.setChecked(SettingsCache::instance().getChatMention());
connect(&chatMentionCheckBox, SIGNAL(stateChanged(int)), &SettingsCache::instance(), SLOT(setChatMention(int))); connect(&chatMentionCheckBox, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), &SettingsCache::instance(),
SLOT(setChatMention(QT_STATE_CHANGED_T)));
chatMentionCompleterCheckbox.setChecked(SettingsCache::instance().getChatMentionCompleter()); chatMentionCompleterCheckbox.setChecked(SettingsCache::instance().getChatMentionCompleter());
connect(&chatMentionCompleterCheckbox, SIGNAL(stateChanged(int)), &SettingsCache::instance(), connect(&chatMentionCompleterCheckbox, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), &SettingsCache::instance(),
SLOT(setChatMentionCompleter(int))); SLOT(setChatMentionCompleter(QT_STATE_CHANGED_T)));
explainMessagesLabel.setTextInteractionFlags(Qt::LinksAccessibleByMouse); explainMessagesLabel.setTextInteractionFlags(Qt::LinksAccessibleByMouse);
explainMessagesLabel.setOpenExternalLinks(true); explainMessagesLabel.setOpenExternalLinks(true);
ignoreUnregUsersMainChat.setChecked(SettingsCache::instance().getIgnoreUnregisteredUsers()); ignoreUnregUsersMainChat.setChecked(SettingsCache::instance().getIgnoreUnregisteredUsers());
ignoreUnregUserMessages.setChecked(SettingsCache::instance().getIgnoreUnregisteredUserMessages()); ignoreUnregUserMessages.setChecked(SettingsCache::instance().getIgnoreUnregisteredUserMessages());
connect(&ignoreUnregUsersMainChat, SIGNAL(stateChanged(int)), &SettingsCache::instance(), connect(&ignoreUnregUsersMainChat, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), &SettingsCache::instance(),
SLOT(setIgnoreUnregisteredUsers(int))); SLOT(setIgnoreUnregisteredUsers(QT_STATE_CHANGED_T)));
connect(&ignoreUnregUserMessages, SIGNAL(stateChanged(int)), &SettingsCache::instance(), connect(&ignoreUnregUserMessages, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), &SettingsCache::instance(),
SLOT(setIgnoreUnregisteredUserMessages(int))); SLOT(setIgnoreUnregisteredUserMessages(QT_STATE_CHANGED_T)));
invertMentionForeground.setChecked(SettingsCache::instance().getChatMentionForeground()); invertMentionForeground.setChecked(SettingsCache::instance().getChatMentionForeground());
connect(&invertMentionForeground, SIGNAL(stateChanged(int)), this, SLOT(updateTextColor(int))); connect(&invertMentionForeground, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), this,
SLOT(updateTextColor(QT_STATE_CHANGED_T)));
invertHighlightForeground.setChecked(SettingsCache::instance().getChatHighlightForeground()); invertHighlightForeground.setChecked(SettingsCache::instance().getChatHighlightForeground());
connect(&invertHighlightForeground, SIGNAL(stateChanged(int)), this, SLOT(updateTextHighlightColor(int))); connect(&invertHighlightForeground, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), this,
SLOT(updateTextHighlightColor(QT_STATE_CHANGED_T)));
mentionColor = new QLineEdit(); mentionColor = new QLineEdit();
mentionColor->setText(SettingsCache::instance().getChatMentionColor()); mentionColor->setText(SettingsCache::instance().getChatMentionColor());
@ -853,13 +866,16 @@ MessagesSettingsPage::MessagesSettingsPage()
connect(mentionColor, SIGNAL(textChanged(QString)), this, SLOT(updateColor(QString))); connect(mentionColor, SIGNAL(textChanged(QString)), this, SLOT(updateColor(QString)));
messagePopups.setChecked(SettingsCache::instance().getShowMessagePopup()); messagePopups.setChecked(SettingsCache::instance().getShowMessagePopup());
connect(&messagePopups, SIGNAL(stateChanged(int)), &SettingsCache::instance(), SLOT(setShowMessagePopups(int))); connect(&messagePopups, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), &SettingsCache::instance(),
SLOT(setShowMessagePopups(QT_STATE_CHANGED_T)));
mentionPopups.setChecked(SettingsCache::instance().getShowMentionPopup()); mentionPopups.setChecked(SettingsCache::instance().getShowMentionPopup());
connect(&mentionPopups, SIGNAL(stateChanged(int)), &SettingsCache::instance(), SLOT(setShowMentionPopups(int))); connect(&mentionPopups, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), &SettingsCache::instance(),
SLOT(setShowMentionPopups(QT_STATE_CHANGED_T)));
roomHistory.setChecked(SettingsCache::instance().getRoomHistory()); roomHistory.setChecked(SettingsCache::instance().getRoomHistory());
connect(&roomHistory, SIGNAL(stateChanged(int)), &SettingsCache::instance(), SLOT(setRoomHistory(int))); connect(&roomHistory, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), &SettingsCache::instance(),
SLOT(setRoomHistory(QT_STATE_CHANGED_T)));
customAlertString = new QLineEdit(); customAlertString = new QLineEdit();
customAlertString->setPlaceholderText(tr("Word1 Word2 Word3")); customAlertString->setPlaceholderText(tr("Word1 Word2 Word3"));
@ -970,13 +986,13 @@ void MessagesSettingsPage::updateHighlightColor(const QString &value)
} }
} }
void MessagesSettingsPage::updateTextColor(int value) void MessagesSettingsPage::updateTextColor(QT_STATE_CHANGED_T value)
{ {
SettingsCache::instance().setChatMentionForeground(value); SettingsCache::instance().setChatMentionForeground(value);
updateMentionPreview(); updateMentionPreview();
} }
void MessagesSettingsPage::updateTextHighlightColor(int value) void MessagesSettingsPage::updateTextHighlightColor(QT_STATE_CHANGED_T value)
{ {
SettingsCache::instance().setChatHighlightForeground(value); SettingsCache::instance().setChatHighlightForeground(value);
updateHighlightPreview(); updateHighlightPreview();
@ -1061,7 +1077,8 @@ void MessagesSettingsPage::retranslateUi()
SoundSettingsPage::SoundSettingsPage() SoundSettingsPage::SoundSettingsPage()
{ {
soundEnabledCheckBox.setChecked(SettingsCache::instance().getSoundEnabled()); soundEnabledCheckBox.setChecked(SettingsCache::instance().getSoundEnabled());
connect(&soundEnabledCheckBox, SIGNAL(stateChanged(int)), &SettingsCache::instance(), SLOT(setSoundEnabled(int))); connect(&soundEnabledCheckBox, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), &SettingsCache::instance(),
SLOT(setSoundEnabled(QT_STATE_CHANGED_T)));
QString themeName = SettingsCache::instance().getSoundThemeName(); QString themeName = SettingsCache::instance().getSoundThemeName();

View file

@ -1,6 +1,8 @@
#ifndef DLG_SETTINGS_H #ifndef DLG_SETTINGS_H
#define DLG_SETTINGS_H #define DLG_SETTINGS_H
#include "../utility/macros.h"
#include <QCheckBox> #include <QCheckBox>
#include <QComboBox> #include <QComboBox>
#include <QDialog> #include <QDialog>
@ -187,8 +189,8 @@ private slots:
void actRemove(); void actRemove();
void updateColor(const QString &value); void updateColor(const QString &value);
void updateHighlightColor(const QString &value); void updateHighlightColor(const QString &value);
void updateTextColor(int value); void updateTextColor(QT_STATE_CHANGED_T value);
void updateTextHighlightColor(int value); void updateTextHighlightColor(QT_STATE_CHANGED_T value);
private: private:
QListWidget *messageList; QListWidget *messageList;

View file

@ -11,6 +11,7 @@
#include <QIcon> #include <QIcon>
#include <QStringList> #include <QStringList>
#include <QTime> #include <QTime>
#include <QTimeZone>
enum GameListColumn enum GameListColumn
{ {
@ -93,7 +94,11 @@ QVariant GamesModel::data(const QModelIndex &index, int role) const
case CREATED: { case CREATED: {
switch (role) { switch (role) {
case Qt::DisplayRole: { case Qt::DisplayRole: {
QDateTime then = QDateTime::fromSecsSinceEpoch(gameentry.start_time(), Qt::UTC); #if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
auto then = QDateTime::fromSecsSinceEpoch(gameentry.start_time(), QTimeZone::UTC);
#else
auto then = QDateTime::fromSecsSinceEpoch(gameentry.start_time(), Qt::UTC);
#endif
int secs = then.secsTo(QDateTime::currentDateTimeUtc()); int secs = then.secsTo(QDateTime::currentDateTimeUtc());
return getGameCreatedString(secs); return getGameCreatedString(secs);
} }
@ -487,7 +492,9 @@ bool GamesProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex & /*sour
bool GamesProxyModel::filterAcceptsRow(int sourceRow) const bool GamesProxyModel::filterAcceptsRow(int sourceRow) const
{ {
#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)) #if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
static const QDate epochDate = QDateTime::fromSecsSinceEpoch(0, QTimeZone::UTC).date();
#elif (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
static const QDate epochDate = QDateTime::fromSecsSinceEpoch(0, Qt::UTC).date(); static const QDate epochDate = QDateTime::fromSecsSinceEpoch(0, Qt::UTC).date();
#else #else
static const QDate epochDate = QDateTime::fromTime_t(0, Qt::UTC).date(); static const QDate epochDate = QDateTime::fromTime_t(0, Qt::UTC).date();

View file

@ -96,9 +96,12 @@ ZoneViewWidget::ZoneViewWidget(Player *_player,
// numberCard is the num of cards we want to reveal from an area. Ex: scry the top 3 cards. // numberCard is the num of cards we want to reveal from an area. Ex: scry the top 3 cards.
// If the number is < 0 then it means that we can make the area sorted and we dont care about the order. // If the number is < 0 then it means that we can make the area sorted and we dont care about the order.
if (numberCards < 0) { if (numberCards < 0) {
connect(&sortByNameCheckBox, SIGNAL(stateChanged(int)), this, SLOT(processSortByName(int))); connect(&sortByNameCheckBox, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), this,
connect(&sortByTypeCheckBox, SIGNAL(stateChanged(int)), this, SLOT(processSortByType(int))); SLOT(processSortByName(QT_STATE_CHANGED_T)));
connect(&pileViewCheckBox, SIGNAL(stateChanged(int)), this, SLOT(processSetPileView(int))); connect(&sortByTypeCheckBox, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), this,
SLOT(processSortByType(QT_STATE_CHANGED_T)));
connect(&pileViewCheckBox, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), this,
SLOT(processSetPileView(QT_STATE_CHANGED_T)));
sortByNameCheckBox.setChecked(SettingsCache::instance().getZoneViewSortByName()); sortByNameCheckBox.setChecked(SettingsCache::instance().getZoneViewSortByName());
sortByTypeCheckBox.setChecked(SettingsCache::instance().getZoneViewSortByType()); sortByTypeCheckBox.setChecked(SettingsCache::instance().getZoneViewSortByType());
pileViewCheckBox.setChecked(SettingsCache::instance().getZoneViewPileView()); pileViewCheckBox.setChecked(SettingsCache::instance().getZoneViewPileView());
@ -114,7 +117,7 @@ ZoneViewWidget::ZoneViewWidget(Player *_player,
zone->initializeCards(cardList); zone->initializeCards(cardList);
} }
void ZoneViewWidget::processSortByType(int value) void ZoneViewWidget::processSortByType(QT_STATE_CHANGED_T value)
{ {
pileViewCheckBox.setEnabled(value); pileViewCheckBox.setEnabled(value);
SettingsCache::instance().setZoneViewSortByType(value); SettingsCache::instance().setZoneViewSortByType(value);
@ -122,13 +125,13 @@ void ZoneViewWidget::processSortByType(int value)
zone->setSortByType(value); zone->setSortByType(value);
} }
void ZoneViewWidget::processSortByName(int value) void ZoneViewWidget::processSortByName(QT_STATE_CHANGED_T value)
{ {
SettingsCache::instance().setZoneViewSortByName(value); SettingsCache::instance().setZoneViewSortByName(value);
zone->setSortByName(value); zone->setSortByName(value);
} }
void ZoneViewWidget::processSetPileView(int value) void ZoneViewWidget::processSetPileView(QT_STATE_CHANGED_T value)
{ {
SettingsCache::instance().setZoneViewPileView(value); SettingsCache::instance().setZoneViewPileView(value);
zone->setPileView(value); zone->setPileView(value);

View file

@ -1,6 +1,8 @@
#ifndef ZONEVIEWWIDGET_H #ifndef ZONEVIEWWIDGET_H
#define ZONEVIEWWIDGET_H #define ZONEVIEWWIDGET_H
#include "../../utility/macros.h"
#include <QCheckBox> #include <QCheckBox>
#include <QGraphicsProxyWidget> #include <QGraphicsProxyWidget>
#include <QGraphicsWidget> #include <QGraphicsWidget>
@ -50,9 +52,9 @@ private:
signals: signals:
void closePressed(ZoneViewWidget *zv); void closePressed(ZoneViewWidget *zv);
private slots: private slots:
void processSortByType(int value); void processSortByType(QT_STATE_CHANGED_T value);
void processSortByName(int value); void processSortByName(QT_STATE_CHANGED_T value);
void processSetPileView(int value); void processSetPileView(QT_STATE_CHANGED_T value);
void resizeToZoneContents(); void resizeToZoneContents();
void handleScrollBarChange(int value); void handleScrollBarChange(int value);
void zoneDeleted(); void zoneDeleted();

View file

@ -1,6 +1,8 @@
#ifndef MAIN_H #ifndef MAIN_H
#define MAIN_H #define MAIN_H
#include "utility/macros.h"
class CardDatabase; class CardDatabase;
class QString; class QString;
class QSystemTrayIcon; class QSystemTrayIcon;

View file

@ -321,14 +321,14 @@ void SettingsCache::setMasterVolume(int _masterVolume)
emit masterVolumeChanged(masterVolume); emit masterVolumeChanged(masterVolume);
} }
void SettingsCache::setLeftJustified(const int _leftJustified) void SettingsCache::setLeftJustified(const QT_STATE_CHANGED_T _leftJustified)
{ {
leftJustified = (bool)_leftJustified; leftJustified = (bool)_leftJustified;
settings->setValue("interface/leftjustified", leftJustified); settings->setValue("interface/leftjustified", leftJustified);
emit handJustificationChanged(); emit handJustificationChanged();
} }
void SettingsCache::setCardScaling(const int _scaleCards) void SettingsCache::setCardScaling(const QT_STATE_CHANGED_T _scaleCards)
{ {
scaleCards = (bool)_scaleCards; scaleCards = (bool)_scaleCards;
settings->setValue("cards/scaleCards", scaleCards); settings->setValue("cards/scaleCards", scaleCards);
@ -340,19 +340,19 @@ void SettingsCache::setStackCardOverlapPercent(const int _verticalCardOverlapPer
settings->setValue("cards/verticalCardOverlapPercent", verticalCardOverlapPercent); settings->setValue("cards/verticalCardOverlapPercent", verticalCardOverlapPercent);
} }
void SettingsCache::setShowMessagePopups(const int _showMessagePopups) void SettingsCache::setShowMessagePopups(const QT_STATE_CHANGED_T _showMessagePopups)
{ {
showMessagePopups = (bool)_showMessagePopups; showMessagePopups = (bool)_showMessagePopups;
settings->setValue("chat/showmessagepopups", showMessagePopups); settings->setValue("chat/showmessagepopups", showMessagePopups);
} }
void SettingsCache::setShowMentionPopups(const int _showMentionPopus) void SettingsCache::setShowMentionPopups(const QT_STATE_CHANGED_T _showMentionPopus)
{ {
showMentionPopups = (bool)_showMentionPopus; showMentionPopups = (bool)_showMentionPopus;
settings->setValue("chat/showmentionpopups", showMentionPopups); settings->setValue("chat/showmentionpopups", showMentionPopups);
} }
void SettingsCache::setRoomHistory(const int _roomHistory) void SettingsCache::setRoomHistory(const QT_STATE_CHANGED_T _roomHistory)
{ {
roomHistory = (bool)_roomHistory; roomHistory = (bool)_roomHistory;
settings->setValue("chat/roomhistory", roomHistory); settings->setValue("chat/roomhistory", roomHistory);
@ -448,38 +448,38 @@ void SettingsCache::setThemeName(const QString &_themeName)
emit themeChanged(); emit themeChanged();
} }
void SettingsCache::setPicDownload(int _picDownload) void SettingsCache::setPicDownload(QT_STATE_CHANGED_T _picDownload)
{ {
picDownload = static_cast<bool>(_picDownload); picDownload = static_cast<bool>(_picDownload);
settings->setValue("personal/picturedownload", picDownload); settings->setValue("personal/picturedownload", picDownload);
emit picDownloadChanged(); emit picDownloadChanged();
} }
void SettingsCache::setNotificationsEnabled(int _notificationsEnabled) void SettingsCache::setNotificationsEnabled(QT_STATE_CHANGED_T _notificationsEnabled)
{ {
notificationsEnabled = static_cast<bool>(_notificationsEnabled); notificationsEnabled = static_cast<bool>(_notificationsEnabled);
settings->setValue("interface/notificationsenabled", notificationsEnabled); settings->setValue("interface/notificationsenabled", notificationsEnabled);
} }
void SettingsCache::setSpectatorNotificationsEnabled(int _spectatorNotificationsEnabled) void SettingsCache::setSpectatorNotificationsEnabled(QT_STATE_CHANGED_T _spectatorNotificationsEnabled)
{ {
spectatorNotificationsEnabled = static_cast<bool>(_spectatorNotificationsEnabled); spectatorNotificationsEnabled = static_cast<bool>(_spectatorNotificationsEnabled);
settings->setValue("interface/specnotificationsenabled", spectatorNotificationsEnabled); settings->setValue("interface/specnotificationsenabled", spectatorNotificationsEnabled);
} }
void SettingsCache::setBuddyConnectNotificationsEnabled(int _buddyConnectNotificationsEnabled) void SettingsCache::setBuddyConnectNotificationsEnabled(QT_STATE_CHANGED_T _buddyConnectNotificationsEnabled)
{ {
buddyConnectNotificationsEnabled = static_cast<bool>(_buddyConnectNotificationsEnabled); buddyConnectNotificationsEnabled = static_cast<bool>(_buddyConnectNotificationsEnabled);
settings->setValue("interface/buddyconnectnotificationsenabled", buddyConnectNotificationsEnabled); settings->setValue("interface/buddyconnectnotificationsenabled", buddyConnectNotificationsEnabled);
} }
void SettingsCache::setDoubleClickToPlay(int _doubleClickToPlay) void SettingsCache::setDoubleClickToPlay(QT_STATE_CHANGED_T _doubleClickToPlay)
{ {
doubleClickToPlay = static_cast<bool>(_doubleClickToPlay); doubleClickToPlay = static_cast<bool>(_doubleClickToPlay);
settings->setValue("interface/doubleclicktoplay", doubleClickToPlay); settings->setValue("interface/doubleclicktoplay", doubleClickToPlay);
} }
void SettingsCache::setPlayToStack(int _playToStack) void SettingsCache::setPlayToStack(QT_STATE_CHANGED_T _playToStack)
{ {
playToStack = static_cast<bool>(_playToStack); playToStack = static_cast<bool>(_playToStack);
settings->setValue("interface/playtostack", playToStack); settings->setValue("interface/playtostack", playToStack);
@ -491,7 +491,7 @@ void SettingsCache::setStartingHandSize(int _startingHandSize)
settings->setValue("interface/startinghandsize", startingHandSize); settings->setValue("interface/startinghandsize", startingHandSize);
} }
void SettingsCache::setAnnotateTokens(int _annotateTokens) void SettingsCache::setAnnotateTokens(QT_STATE_CHANGED_T _annotateTokens)
{ {
annotateTokens = static_cast<bool>(_annotateTokens); annotateTokens = static_cast<bool>(_annotateTokens);
settings->setValue("interface/annotatetokens", annotateTokens); settings->setValue("interface/annotatetokens", annotateTokens);
@ -503,21 +503,21 @@ void SettingsCache::setTabGameSplitterSizes(const QByteArray &_tabGameSplitterSi
settings->setValue("interface/tabgame_splittersizes", tabGameSplitterSizes); settings->setValue("interface/tabgame_splittersizes", tabGameSplitterSizes);
} }
void SettingsCache::setDisplayCardNames(int _displayCardNames) void SettingsCache::setDisplayCardNames(QT_STATE_CHANGED_T _displayCardNames)
{ {
displayCardNames = static_cast<bool>(_displayCardNames); displayCardNames = static_cast<bool>(_displayCardNames);
settings->setValue("cards/displaycardnames", displayCardNames); settings->setValue("cards/displaycardnames", displayCardNames);
emit displayCardNamesChanged(); emit displayCardNamesChanged();
} }
void SettingsCache::setHorizontalHand(int _horizontalHand) void SettingsCache::setHorizontalHand(QT_STATE_CHANGED_T _horizontalHand)
{ {
horizontalHand = static_cast<bool>(_horizontalHand); horizontalHand = static_cast<bool>(_horizontalHand);
settings->setValue("hand/horizontal", horizontalHand); settings->setValue("hand/horizontal", horizontalHand);
emit horizontalHandChanged(); emit horizontalHandChanged();
} }
void SettingsCache::setInvertVerticalCoordinate(int _invertVerticalCoordinate) void SettingsCache::setInvertVerticalCoordinate(QT_STATE_CHANGED_T _invertVerticalCoordinate)
{ {
invertVerticalCoordinate = static_cast<bool>(_invertVerticalCoordinate); invertVerticalCoordinate = static_cast<bool>(_invertVerticalCoordinate);
settings->setValue("table/invert_vertical", invertVerticalCoordinate); settings->setValue("table/invert_vertical", invertVerticalCoordinate);
@ -531,32 +531,32 @@ void SettingsCache::setMinPlayersForMultiColumnLayout(int _minPlayersForMultiCol
emit minPlayersForMultiColumnLayoutChanged(); emit minPlayersForMultiColumnLayoutChanged();
} }
void SettingsCache::setTapAnimation(int _tapAnimation) void SettingsCache::setTapAnimation(QT_STATE_CHANGED_T _tapAnimation)
{ {
tapAnimation = static_cast<bool>(_tapAnimation); tapAnimation = static_cast<bool>(_tapAnimation);
settings->setValue("cards/tapanimation", tapAnimation); settings->setValue("cards/tapanimation", tapAnimation);
} }
void SettingsCache::setChatMention(int _chatMention) void SettingsCache::setChatMention(QT_STATE_CHANGED_T _chatMention)
{ {
chatMention = static_cast<bool>(_chatMention); chatMention = static_cast<bool>(_chatMention);
settings->setValue("chat/mention", chatMention); settings->setValue("chat/mention", chatMention);
} }
void SettingsCache::setChatMentionCompleter(const int _enableMentionCompleter) void SettingsCache::setChatMentionCompleter(const QT_STATE_CHANGED_T _enableMentionCompleter)
{ {
chatMentionCompleter = (bool)_enableMentionCompleter; chatMentionCompleter = (bool)_enableMentionCompleter;
settings->setValue("chat/mentioncompleter", chatMentionCompleter); settings->setValue("chat/mentioncompleter", chatMentionCompleter);
emit chatMentionCompleterChanged(); emit chatMentionCompleterChanged();
} }
void SettingsCache::setChatMentionForeground(int _chatMentionForeground) void SettingsCache::setChatMentionForeground(QT_STATE_CHANGED_T _chatMentionForeground)
{ {
chatMentionForeground = static_cast<bool>(_chatMentionForeground); chatMentionForeground = static_cast<bool>(_chatMentionForeground);
settings->setValue("chat/mentionforeground", chatMentionForeground); settings->setValue("chat/mentionforeground", chatMentionForeground);
} }
void SettingsCache::setChatHighlightForeground(int _chatHighlightForeground) void SettingsCache::setChatHighlightForeground(QT_STATE_CHANGED_T _chatHighlightForeground)
{ {
chatHighlightForeground = static_cast<bool>(_chatHighlightForeground); chatHighlightForeground = static_cast<bool>(_chatHighlightForeground);
settings->setValue("chat/highlightforeground", chatHighlightForeground); settings->setValue("chat/highlightforeground", chatHighlightForeground);
@ -574,25 +574,25 @@ void SettingsCache::setChatHighlightColor(const QString &_chatHighlightColor)
settings->setValue("chat/highlightcolor", chatHighlightColor); settings->setValue("chat/highlightcolor", chatHighlightColor);
} }
void SettingsCache::setZoneViewSortByName(int _zoneViewSortByName) void SettingsCache::setZoneViewSortByName(QT_STATE_CHANGED_T _zoneViewSortByName)
{ {
zoneViewSortByName = static_cast<bool>(_zoneViewSortByName); zoneViewSortByName = static_cast<bool>(_zoneViewSortByName);
settings->setValue("zoneview/sortbyname", zoneViewSortByName); settings->setValue("zoneview/sortbyname", zoneViewSortByName);
} }
void SettingsCache::setZoneViewSortByType(int _zoneViewSortByType) void SettingsCache::setZoneViewSortByType(QT_STATE_CHANGED_T _zoneViewSortByType)
{ {
zoneViewSortByType = static_cast<bool>(_zoneViewSortByType); zoneViewSortByType = static_cast<bool>(_zoneViewSortByType);
settings->setValue("zoneview/sortbytype", zoneViewSortByType); settings->setValue("zoneview/sortbytype", zoneViewSortByType);
} }
void SettingsCache::setZoneViewPileView(int _zoneViewPileView) void SettingsCache::setZoneViewPileView(QT_STATE_CHANGED_T _zoneViewPileView)
{ {
zoneViewPileView = static_cast<bool>(_zoneViewPileView); zoneViewPileView = static_cast<bool>(_zoneViewPileView);
settings->setValue("zoneview/pileview", zoneViewPileView); settings->setValue("zoneview/pileview", zoneViewPileView);
} }
void SettingsCache::setSoundEnabled(int _soundEnabled) void SettingsCache::setSoundEnabled(QT_STATE_CHANGED_T _soundEnabled)
{ {
soundEnabled = static_cast<bool>(_soundEnabled); soundEnabled = static_cast<bool>(_soundEnabled);
settings->setValue("sound/enabled", soundEnabled); settings->setValue("sound/enabled", soundEnabled);
@ -606,13 +606,13 @@ void SettingsCache::setSoundThemeName(const QString &_soundThemeName)
emit soundThemeChanged(); emit soundThemeChanged();
} }
void SettingsCache::setIgnoreUnregisteredUsers(int _ignoreUnregisteredUsers) void SettingsCache::setIgnoreUnregisteredUsers(QT_STATE_CHANGED_T _ignoreUnregisteredUsers)
{ {
ignoreUnregisteredUsers = static_cast<bool>(_ignoreUnregisteredUsers); ignoreUnregisteredUsers = static_cast<bool>(_ignoreUnregisteredUsers);
settings->setValue("chat/ignore_unregistered", ignoreUnregisteredUsers); settings->setValue("chat/ignore_unregistered", ignoreUnregisteredUsers);
} }
void SettingsCache::setIgnoreUnregisteredUserMessages(int _ignoreUnregisteredUserMessages) void SettingsCache::setIgnoreUnregisteredUserMessages(QT_STATE_CHANGED_T _ignoreUnregisteredUserMessages)
{ {
ignoreUnregisteredUserMessages = static_cast<bool>(_ignoreUnregisteredUserMessages); ignoreUnregisteredUserMessages = static_cast<bool>(_ignoreUnregisteredUserMessages);
settings->setValue("chat/ignore_unregistered_messages", ignoreUnregisteredUserMessages); settings->setValue("chat/ignore_unregistered_messages", ignoreUnregisteredUserMessages);
@ -985,13 +985,13 @@ void SettingsCache::setRememberGameSettings(const bool _rememberGameSettings)
settings->setValue("game/remembergamesettings", rememberGameSettings); settings->setValue("game/remembergamesettings", rememberGameSettings);
} }
void SettingsCache::setNotifyAboutUpdate(int _notifyaboutupdate) void SettingsCache::setNotifyAboutUpdate(QT_STATE_CHANGED_T _notifyaboutupdate)
{ {
notifyAboutUpdates = static_cast<bool>(_notifyaboutupdate); notifyAboutUpdates = static_cast<bool>(_notifyaboutupdate);
settings->setValue("personal/updatenotification", notifyAboutUpdates); settings->setValue("personal/updatenotification", notifyAboutUpdates);
} }
void SettingsCache::setNotifyAboutNewVersion(int _notifyaboutnewversion) void SettingsCache::setNotifyAboutNewVersion(QT_STATE_CHANGED_T _notifyaboutnewversion)
{ {
notifyAboutNewVersion = static_cast<bool>(_notifyaboutnewversion); notifyAboutNewVersion = static_cast<bool>(_notifyaboutnewversion);
settings->setValue("personal/newversionnotification", notifyAboutNewVersion); settings->setValue("personal/newversionnotification", notifyAboutNewVersion);

View file

@ -1,6 +1,7 @@
#ifndef SETTINGSCACHE_H #ifndef SETTINGSCACHE_H
#define SETTINGSCACHE_H #define SETTINGSCACHE_H
#include "../utility/macros.h"
#include "card_database_settings.h" #include "card_database_settings.h"
#include "download_settings.h" #include "download_settings.h"
#include "game_filters_settings.h" #include "game_filters_settings.h"
@ -523,39 +524,39 @@ public slots:
void setThemeName(const QString &_themeName); void setThemeName(const QString &_themeName);
void setChatMentionColor(const QString &_chatMentionColor); void setChatMentionColor(const QString &_chatMentionColor);
void setChatHighlightColor(const QString &_chatHighlightColor); void setChatHighlightColor(const QString &_chatHighlightColor);
void setPicDownload(int _picDownload); void setPicDownload(QT_STATE_CHANGED_T _picDownload);
void setNotificationsEnabled(int _notificationsEnabled); void setNotificationsEnabled(QT_STATE_CHANGED_T _notificationsEnabled);
void setSpectatorNotificationsEnabled(int _spectatorNotificationsEnabled); void setSpectatorNotificationsEnabled(QT_STATE_CHANGED_T _spectatorNotificationsEnabled);
void setBuddyConnectNotificationsEnabled(int _buddyConnectNotificationsEnabled); void setBuddyConnectNotificationsEnabled(QT_STATE_CHANGED_T _buddyConnectNotificationsEnabled);
void setDoubleClickToPlay(int _doubleClickToPlay); void setDoubleClickToPlay(QT_STATE_CHANGED_T _doubleClickToPlay);
void setPlayToStack(int _playToStack); void setPlayToStack(QT_STATE_CHANGED_T _playToStack);
void setStartingHandSize(int _startingHandSize); void setStartingHandSize(int _startingHandSize);
void setAnnotateTokens(int _annotateTokens); void setAnnotateTokens(QT_STATE_CHANGED_T _annotateTokens);
void setTabGameSplitterSizes(const QByteArray &_tabGameSplitterSizes); void setTabGameSplitterSizes(const QByteArray &_tabGameSplitterSizes);
void setDisplayCardNames(int _displayCardNames); void setDisplayCardNames(QT_STATE_CHANGED_T _displayCardNames);
void setHorizontalHand(int _horizontalHand); void setHorizontalHand(QT_STATE_CHANGED_T _horizontalHand);
void setInvertVerticalCoordinate(int _invertVerticalCoordinate); void setInvertVerticalCoordinate(QT_STATE_CHANGED_T _invertVerticalCoordinate);
void setMinPlayersForMultiColumnLayout(int _minPlayersForMultiColumnLayout); void setMinPlayersForMultiColumnLayout(int _minPlayersForMultiColumnLayout);
void setTapAnimation(int _tapAnimation); void setTapAnimation(QT_STATE_CHANGED_T _tapAnimation);
void setChatMention(int _chatMention); void setChatMention(QT_STATE_CHANGED_T _chatMention);
void setChatMentionCompleter(int _chatMentionCompleter); void setChatMentionCompleter(QT_STATE_CHANGED_T _chatMentionCompleter);
void setChatMentionForeground(int _chatMentionForeground); void setChatMentionForeground(QT_STATE_CHANGED_T _chatMentionForeground);
void setChatHighlightForeground(int _chatHighlightForeground); void setChatHighlightForeground(QT_STATE_CHANGED_T _chatHighlightForeground);
void setZoneViewSortByName(int _zoneViewSortByName); void setZoneViewSortByName(QT_STATE_CHANGED_T _zoneViewSortByName);
void setZoneViewSortByType(int _zoneViewSortByType); void setZoneViewSortByType(QT_STATE_CHANGED_T _zoneViewSortByType);
void setZoneViewPileView(int _zoneViewPileView); void setZoneViewPileView(QT_STATE_CHANGED_T _zoneViewPileView);
void setSoundEnabled(int _soundEnabled); void setSoundEnabled(QT_STATE_CHANGED_T _soundEnabled);
void setSoundThemeName(const QString &_soundThemeName); void setSoundThemeName(const QString &_soundThemeName);
void setIgnoreUnregisteredUsers(int _ignoreUnregisteredUsers); void setIgnoreUnregisteredUsers(QT_STATE_CHANGED_T _ignoreUnregisteredUsers);
void setIgnoreUnregisteredUserMessages(int _ignoreUnregisteredUserMessages); void setIgnoreUnregisteredUserMessages(QT_STATE_CHANGED_T _ignoreUnregisteredUserMessages);
void setPixmapCacheSize(const int _pixmapCacheSize); void setPixmapCacheSize(const int _pixmapCacheSize);
void setNetworkCacheSizeInMB(const int _networkCacheSize); void setNetworkCacheSizeInMB(const int _networkCacheSize);
void setCardScaling(const int _scaleCards); void setCardScaling(const QT_STATE_CHANGED_T _scaleCards);
void setStackCardOverlapPercent(const int _verticalCardOverlapPercent); void setStackCardOverlapPercent(const int _verticalCardOverlapPercent);
void setShowMessagePopups(const int _showMessagePopups); void setShowMessagePopups(const QT_STATE_CHANGED_T _showMessagePopups);
void setShowMentionPopups(const int _showMentionPopups); void setShowMentionPopups(const QT_STATE_CHANGED_T _showMentionPopups);
void setRoomHistory(const int _roomHistory); void setRoomHistory(const QT_STATE_CHANGED_T _roomHistory);
void setLeftJustified(const int _leftJustified); void setLeftJustified(const QT_STATE_CHANGED_T _leftJustified);
void setMasterVolume(const int _masterVolume); void setMasterVolume(const int _masterVolume);
void setCardInfoViewMode(const int _viewMode); void setCardInfoViewMode(const int _viewMode);
void setHighlightWords(const QString &_highlightWords); void setHighlightWords(const QString &_highlightWords);
@ -570,8 +571,8 @@ public slots:
void setSpectatorsCanSeeEverything(const bool _spectatorsCanSeeEverything); void setSpectatorsCanSeeEverything(const bool _spectatorsCanSeeEverything);
void setCreateGameAsSpectator(const bool _createGameAsSpectator); void setCreateGameAsSpectator(const bool _createGameAsSpectator);
void setRememberGameSettings(const bool _rememberGameSettings); void setRememberGameSettings(const bool _rememberGameSettings);
void setNotifyAboutUpdate(int _notifyaboutupdate); void setNotifyAboutUpdate(QT_STATE_CHANGED_T _notifyaboutupdate);
void setNotifyAboutNewVersion(int _notifyaboutnewversion); void setNotifyAboutNewVersion(QT_STATE_CHANGED_T _notifyaboutnewversion);
void setUpdateReleaseChannel(int _updateReleaseChannel); void setUpdateReleaseChannel(int _updateReleaseChannel);
void setMaxFontSize(int _max); void setMaxFontSize(int _max);
}; };

View file

@ -0,0 +1,17 @@
#ifndef COCKATRICE_MACROS_H
#define COCKATRICE_MACROS_H
#include <QtGlobal>
// Qt6.7 changed how stateChanged functionality
// of QCheckBoxes work.
// See https://doc.qt.io/qt-6/qcheckbox.html#checkStateChanged
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
#define QT_STATE_CHANGED checkStateChanged
#define QT_STATE_CHANGED_T Qt::CheckState
#else
#define QT_STATE_CHANGED stateChanged
#define QT_STATE_CHANGED_T int
#endif
#endif // COCKATRICE_MACROS_H

View file

@ -5,9 +5,15 @@ CardDatabaseSettings::CardDatabaseSettings(QString settingPath, QObject *parent)
: SettingsManager(settingPath + "cardDatabase.ini", parent) : SettingsManager(settingPath + "cardDatabase.ini", parent)
{ {
} }
void CardDatabaseSettings::setSortKey(QString /* shortName */, unsigned int /* sortKey */){}; void CardDatabaseSettings::setSortKey(QString /* shortName */, unsigned int /* sortKey */)
void CardDatabaseSettings::setEnabled(QString /* shortName */, bool /* enabled */){}; {
void CardDatabaseSettings::setIsKnown(QString /* shortName */, bool /* isknown */){}; }
void CardDatabaseSettings::setEnabled(QString /* shortName */, bool /* enabled */)
{
}
void CardDatabaseSettings::setIsKnown(QString /* shortName */, bool /* isknown */)
{
}
unsigned int CardDatabaseSettings::getSortKey(QString /* shortName */) unsigned int CardDatabaseSettings::getSortKey(QString /* shortName */)
{ {
return 0; return 0;
@ -61,22 +67,22 @@ void SettingsCache::setHighlightWords(const QString & /* _highlightWords */)
void SettingsCache::setMasterVolume(int /* _masterVolume */) void SettingsCache::setMasterVolume(int /* _masterVolume */)
{ {
} }
void SettingsCache::setLeftJustified(const int /* _leftJustified */) void SettingsCache::setLeftJustified(const QT_STATE_CHANGED_T /* _leftJustified */)
{ {
} }
void SettingsCache::setCardScaling(const int /* _scaleCards */) void SettingsCache::setCardScaling(const QT_STATE_CHANGED_T /* _scaleCards */)
{ {
} }
void SettingsCache::setStackCardOverlapPercent(const int /* _verticalCardOverlapPercent */) void SettingsCache::setStackCardOverlapPercent(const int /* _verticalCardOverlapPercent */)
{ {
} }
void SettingsCache::setShowMessagePopups(const int /* _showMessagePopups */) void SettingsCache::setShowMessagePopups(const QT_STATE_CHANGED_T /* _showMessagePopups */)
{ {
} }
void SettingsCache::setShowMentionPopups(const int /* _showMentionPopus */) void SettingsCache::setShowMentionPopups(const QT_STATE_CHANGED_T /* _showMentionPopus */)
{ {
} }
void SettingsCache::setRoomHistory(const int /* _roomHistory */) void SettingsCache::setRoomHistory(const QT_STATE_CHANGED_T /* _roomHistory */)
{ {
} }
void SettingsCache::setLang(const QString & /* _lang */) void SettingsCache::setLang(const QString & /* _lang */)
@ -115,58 +121,58 @@ void SettingsCache::setTokenDatabasePath(const QString & /* _tokenDatabasePath *
void SettingsCache::setThemeName(const QString & /* _themeName */) void SettingsCache::setThemeName(const QString & /* _themeName */)
{ {
} }
void SettingsCache::setPicDownload(int /* _picDownload */) void SettingsCache::setPicDownload(QT_STATE_CHANGED_T /* _picDownload */)
{ {
} }
void SettingsCache::setNotificationsEnabled(int /* _notificationsEnabled */) void SettingsCache::setNotificationsEnabled(QT_STATE_CHANGED_T /* _notificationsEnabled */)
{ {
} }
void SettingsCache::setSpectatorNotificationsEnabled(int /* _spectatorNotificationsEnabled */) void SettingsCache::setSpectatorNotificationsEnabled(QT_STATE_CHANGED_T /* _spectatorNotificationsEnabled */)
{ {
} }
void SettingsCache::setBuddyConnectNotificationsEnabled(int /* _buddyConnectNotificationsEnabled */) void SettingsCache::setBuddyConnectNotificationsEnabled(QT_STATE_CHANGED_T /* _buddyConnectNotificationsEnabled */)
{ {
} }
void SettingsCache::setDoubleClickToPlay(int /* _doubleClickToPlay */) void SettingsCache::setDoubleClickToPlay(QT_STATE_CHANGED_T /* _doubleClickToPlay */)
{ {
} }
void SettingsCache::setPlayToStack(int /* _playToStack */) void SettingsCache::setPlayToStack(QT_STATE_CHANGED_T /* _playToStack */)
{ {
} }
void SettingsCache::setStartingHandSize(int /* _startingHandSize */) void SettingsCache::setStartingHandSize(int /* _startingHandSize */)
{ {
} }
void SettingsCache::setAnnotateTokens(int /* _annotateTokens */) void SettingsCache::setAnnotateTokens(QT_STATE_CHANGED_T /* _annotateTokens */)
{ {
} }
void SettingsCache::setTabGameSplitterSizes(const QByteArray & /* _tabGameSplitterSizes */) void SettingsCache::setTabGameSplitterSizes(const QByteArray & /* _tabGameSplitterSizes */)
{ {
} }
void SettingsCache::setDisplayCardNames(int /* _displayCardNames */) void SettingsCache::setDisplayCardNames(QT_STATE_CHANGED_T /* _displayCardNames */)
{ {
} }
void SettingsCache::setHorizontalHand(int /* _horizontalHand */) void SettingsCache::setHorizontalHand(QT_STATE_CHANGED_T /* _horizontalHand */)
{ {
} }
void SettingsCache::setInvertVerticalCoordinate(int /* _invertVerticalCoordinate */) void SettingsCache::setInvertVerticalCoordinate(QT_STATE_CHANGED_T /* _invertVerticalCoordinate */)
{ {
} }
void SettingsCache::setMinPlayersForMultiColumnLayout(int /* _minPlayersForMultiColumnLayout */) void SettingsCache::setMinPlayersForMultiColumnLayout(int /* _minPlayersForMultiColumnLayout */)
{ {
} }
void SettingsCache::setTapAnimation(int /* _tapAnimation */) void SettingsCache::setTapAnimation(QT_STATE_CHANGED_T /* _tapAnimation */)
{ {
} }
void SettingsCache::setChatMention(int /* _chatMention */) void SettingsCache::setChatMention(QT_STATE_CHANGED_T /* _chatMention */)
{ {
} }
void SettingsCache::setChatMentionCompleter(const int /* _enableMentionCompleter */) void SettingsCache::setChatMentionCompleter(const QT_STATE_CHANGED_T /* _enableMentionCompleter */)
{ {
} }
void SettingsCache::setChatMentionForeground(int /* _chatMentionForeground */) void SettingsCache::setChatMentionForeground(QT_STATE_CHANGED_T /* _chatMentionForeground */)
{ {
} }
void SettingsCache::setChatHighlightForeground(int /* _chatHighlightForeground */) void SettingsCache::setChatHighlightForeground(QT_STATE_CHANGED_T /* _chatHighlightForeground */)
{ {
} }
void SettingsCache::setChatMentionColor(const QString & /* _chatMentionColor */) void SettingsCache::setChatMentionColor(const QString & /* _chatMentionColor */)
@ -175,25 +181,25 @@ void SettingsCache::setChatMentionColor(const QString & /* _chatMentionColor */)
void SettingsCache::setChatHighlightColor(const QString & /* _chatHighlightColor */) void SettingsCache::setChatHighlightColor(const QString & /* _chatHighlightColor */)
{ {
} }
void SettingsCache::setZoneViewSortByName(int /* _zoneViewSortByName */) void SettingsCache::setZoneViewSortByName(QT_STATE_CHANGED_T /* _zoneViewSortByName */)
{ {
} }
void SettingsCache::setZoneViewSortByType(int /* _zoneViewSortByType */) void SettingsCache::setZoneViewSortByType(QT_STATE_CHANGED_T /* _zoneViewSortByType */)
{ {
} }
void SettingsCache::setZoneViewPileView(int /* _zoneViewPileView */) void SettingsCache::setZoneViewPileView(QT_STATE_CHANGED_T /* _zoneViewPileView */)
{ {
} }
void SettingsCache::setSoundEnabled(int /* _soundEnabled */) void SettingsCache::setSoundEnabled(QT_STATE_CHANGED_T /* _soundEnabled */)
{ {
} }
void SettingsCache::setSoundThemeName(const QString & /* _soundThemeName */) void SettingsCache::setSoundThemeName(const QString & /* _soundThemeName */)
{ {
} }
void SettingsCache::setIgnoreUnregisteredUsers(int /* _ignoreUnregisteredUsers */) void SettingsCache::setIgnoreUnregisteredUsers(QT_STATE_CHANGED_T /* _ignoreUnregisteredUsers */)
{ {
} }
void SettingsCache::setIgnoreUnregisteredUserMessages(int /* _ignoreUnregisteredUserMessages */) void SettingsCache::setIgnoreUnregisteredUserMessages(QT_STATE_CHANGED_T /* _ignoreUnregisteredUserMessages */)
{ {
} }
void SettingsCache::setMainWindowGeometry(const QByteArray & /* _mainWindowGeometry */) void SettingsCache::setMainWindowGeometry(const QByteArray & /* _mainWindowGeometry */)
@ -255,10 +261,10 @@ void SettingsCache::setCreateGameAsSpectator(const bool /* _createGameAsSpectato
void SettingsCache::setRememberGameSettings(const bool /* _rememberGameSettings */) void SettingsCache::setRememberGameSettings(const bool /* _rememberGameSettings */)
{ {
} }
void SettingsCache::setNotifyAboutUpdate(int /* _notifyaboutupdate */) void SettingsCache::setNotifyAboutUpdate(QT_STATE_CHANGED_T /* _notifyaboutupdate */)
{ {
} }
void SettingsCache::setNotifyAboutNewVersion(int /* _notifyaboutnewversion */) void SettingsCache::setNotifyAboutNewVersion(QT_STATE_CHANGED_T /* _notifyaboutnewversion */)
{ {
} }
void SettingsCache::setDownloadSpoilerStatus(bool /* _spoilerStatus */) void SettingsCache::setDownloadSpoilerStatus(bool /* _spoilerStatus */)

View file

@ -12,6 +12,7 @@
#include "../cockatrice/src/game/cards/card_database.h" #include "../cockatrice/src/game/cards/card_database.h"
#include "../cockatrice/src/settings/cache_settings.h" #include "../cockatrice/src/settings/cache_settings.h"
#include "../cockatrice/src/utility/macros.h"
extern SettingsCache *settingsCache; extern SettingsCache *settingsCache;

View file

@ -5,9 +5,15 @@ CardDatabaseSettings::CardDatabaseSettings(QString settingPath, QObject *parent)
: SettingsManager(settingPath + "cardDatabase.ini", parent) : SettingsManager(settingPath + "cardDatabase.ini", parent)
{ {
} }
void CardDatabaseSettings::setSortKey(QString /* shortName */, unsigned int /* sortKey */){}; void CardDatabaseSettings::setSortKey(QString /* shortName */, unsigned int /* sortKey */)
void CardDatabaseSettings::setEnabled(QString /* shortName */, bool /* enabled */){}; {
void CardDatabaseSettings::setIsKnown(QString /* shortName */, bool /* isknown */){}; }
void CardDatabaseSettings::setEnabled(QString /* shortName */, bool /* enabled */)
{
}
void CardDatabaseSettings::setIsKnown(QString /* shortName */, bool /* isknown */)
{
}
unsigned int CardDatabaseSettings::getSortKey(QString /* shortName */) unsigned int CardDatabaseSettings::getSortKey(QString /* shortName */)
{ {
return 0; return 0;
@ -65,22 +71,22 @@ void SettingsCache::setHighlightWords(const QString & /* _highlightWords */)
void SettingsCache::setMasterVolume(int /* _masterVolume */) void SettingsCache::setMasterVolume(int /* _masterVolume */)
{ {
} }
void SettingsCache::setLeftJustified(const int /* _leftJustified */) void SettingsCache::setLeftJustified(const QT_STATE_CHANGED_T /* _leftJustified */)
{ {
} }
void SettingsCache::setCardScaling(const int /* _scaleCards */) void SettingsCache::setCardScaling(const QT_STATE_CHANGED_T /* _scaleCards */)
{ {
} }
void SettingsCache::setStackCardOverlapPercent(const int /* _verticalCardOverlapPercent */) void SettingsCache::setStackCardOverlapPercent(const int /* _verticalCardOverlapPercent */)
{ {
} }
void SettingsCache::setShowMessagePopups(const int /* _showMessagePopups */) void SettingsCache::setShowMessagePopups(const QT_STATE_CHANGED_T /* _showMessagePopups */)
{ {
} }
void SettingsCache::setShowMentionPopups(const int /* _showMentionPopus */) void SettingsCache::setShowMentionPopups(const QT_STATE_CHANGED_T /* _showMentionPopus */)
{ {
} }
void SettingsCache::setRoomHistory(const int /* _roomHistory */) void SettingsCache::setRoomHistory(const QT_STATE_CHANGED_T /* _roomHistory */)
{ {
} }
void SettingsCache::setLang(const QString & /* _lang */) void SettingsCache::setLang(const QString & /* _lang */)
@ -119,58 +125,58 @@ void SettingsCache::setTokenDatabasePath(const QString & /* _tokenDatabasePath *
void SettingsCache::setThemeName(const QString & /* _themeName */) void SettingsCache::setThemeName(const QString & /* _themeName */)
{ {
} }
void SettingsCache::setPicDownload(int /* _picDownload */) void SettingsCache::setPicDownload(QT_STATE_CHANGED_T /* _picDownload */)
{ {
} }
void SettingsCache::setNotificationsEnabled(int /* _notificationsEnabled */) void SettingsCache::setNotificationsEnabled(QT_STATE_CHANGED_T /* _notificationsEnabled */)
{ {
} }
void SettingsCache::setSpectatorNotificationsEnabled(int /* _spectatorNotificationsEnabled */) void SettingsCache::setSpectatorNotificationsEnabled(QT_STATE_CHANGED_T /* _spectatorNotificationsEnabled */)
{ {
} }
void SettingsCache::setBuddyConnectNotificationsEnabled(int /* _buddyConnectNotificationsEnabled */) void SettingsCache::setBuddyConnectNotificationsEnabled(QT_STATE_CHANGED_T /* _buddyConnectNotificationsEnabled */)
{ {
} }
void SettingsCache::setDoubleClickToPlay(int /* _doubleClickToPlay */) void SettingsCache::setDoubleClickToPlay(QT_STATE_CHANGED_T /* _doubleClickToPlay */)
{ {
} }
void SettingsCache::setPlayToStack(int /* _playToStack */) void SettingsCache::setPlayToStack(QT_STATE_CHANGED_T /* _playToStack */)
{ {
} }
void SettingsCache::setStartingHandSize(int /* _startingHandSize */) void SettingsCache::setStartingHandSize(int /* _startingHandSize */)
{ {
} }
void SettingsCache::setAnnotateTokens(int /* _annotateTokens */) void SettingsCache::setAnnotateTokens(QT_STATE_CHANGED_T /* _annotateTokens */)
{ {
} }
void SettingsCache::setTabGameSplitterSizes(const QByteArray & /* _tabGameSplitterSizes */) void SettingsCache::setTabGameSplitterSizes(const QByteArray & /* _tabGameSplitterSizes */)
{ {
} }
void SettingsCache::setDisplayCardNames(int /* _displayCardNames */) void SettingsCache::setDisplayCardNames(QT_STATE_CHANGED_T /* _displayCardNames */)
{ {
} }
void SettingsCache::setHorizontalHand(int /* _horizontalHand */) void SettingsCache::setHorizontalHand(QT_STATE_CHANGED_T /* _horizontalHand */)
{ {
} }
void SettingsCache::setInvertVerticalCoordinate(int /* _invertVerticalCoordinate */) void SettingsCache::setInvertVerticalCoordinate(QT_STATE_CHANGED_T /* _invertVerticalCoordinate */)
{ {
} }
void SettingsCache::setMinPlayersForMultiColumnLayout(int /* _minPlayersForMultiColumnLayout */) void SettingsCache::setMinPlayersForMultiColumnLayout(int /* _minPlayersForMultiColumnLayout */)
{ {
} }
void SettingsCache::setTapAnimation(int /* _tapAnimation */) void SettingsCache::setTapAnimation(QT_STATE_CHANGED_T /* _tapAnimation */)
{ {
} }
void SettingsCache::setChatMention(int /* _chatMention */) void SettingsCache::setChatMention(QT_STATE_CHANGED_T /* _chatMention */)
{ {
} }
void SettingsCache::setChatMentionCompleter(const int /* _enableMentionCompleter */) void SettingsCache::setChatMentionCompleter(const QT_STATE_CHANGED_T /* _enableMentionCompleter */)
{ {
} }
void SettingsCache::setChatMentionForeground(int /* _chatMentionForeground */) void SettingsCache::setChatMentionForeground(QT_STATE_CHANGED_T /* _chatMentionForeground */)
{ {
} }
void SettingsCache::setChatHighlightForeground(int /* _chatHighlightForeground */) void SettingsCache::setChatHighlightForeground(QT_STATE_CHANGED_T /* _chatHighlightForeground */)
{ {
} }
void SettingsCache::setChatMentionColor(const QString & /* _chatMentionColor */) void SettingsCache::setChatMentionColor(const QString & /* _chatMentionColor */)
@ -179,25 +185,25 @@ void SettingsCache::setChatMentionColor(const QString & /* _chatMentionColor */)
void SettingsCache::setChatHighlightColor(const QString & /* _chatHighlightColor */) void SettingsCache::setChatHighlightColor(const QString & /* _chatHighlightColor */)
{ {
} }
void SettingsCache::setZoneViewSortByName(int /* _zoneViewSortByName */) void SettingsCache::setZoneViewSortByName(QT_STATE_CHANGED_T /* _zoneViewSortByName */)
{ {
} }
void SettingsCache::setZoneViewSortByType(int /* _zoneViewSortByType */) void SettingsCache::setZoneViewSortByType(QT_STATE_CHANGED_T /* _zoneViewSortByType */)
{ {
} }
void SettingsCache::setZoneViewPileView(int /* _zoneViewPileView */) void SettingsCache::setZoneViewPileView(QT_STATE_CHANGED_T /* _zoneViewPileView */)
{ {
} }
void SettingsCache::setSoundEnabled(int /* _soundEnabled */) void SettingsCache::setSoundEnabled(QT_STATE_CHANGED_T /* _soundEnabled */)
{ {
} }
void SettingsCache::setSoundThemeName(const QString & /* _soundThemeName */) void SettingsCache::setSoundThemeName(const QString & /* _soundThemeName */)
{ {
} }
void SettingsCache::setIgnoreUnregisteredUsers(int /* _ignoreUnregisteredUsers */) void SettingsCache::setIgnoreUnregisteredUsers(QT_STATE_CHANGED_T /* _ignoreUnregisteredUsers */)
{ {
} }
void SettingsCache::setIgnoreUnregisteredUserMessages(int /* _ignoreUnregisteredUserMessages */) void SettingsCache::setIgnoreUnregisteredUserMessages(QT_STATE_CHANGED_T /* _ignoreUnregisteredUserMessages */)
{ {
} }
void SettingsCache::setMainWindowGeometry(const QByteArray & /* _mainWindowGeometry */) void SettingsCache::setMainWindowGeometry(const QByteArray & /* _mainWindowGeometry */)
@ -259,10 +265,10 @@ void SettingsCache::setCreateGameAsSpectator(const bool /* _createGameAsSpectato
void SettingsCache::setRememberGameSettings(const bool /* _rememberGameSettings */) void SettingsCache::setRememberGameSettings(const bool /* _rememberGameSettings */)
{ {
} }
void SettingsCache::setNotifyAboutUpdate(int /* _notifyaboutupdate */) void SettingsCache::setNotifyAboutUpdate(QT_STATE_CHANGED_T /* _notifyaboutupdate */)
{ {
} }
void SettingsCache::setNotifyAboutNewVersion(int /* _notifyaboutnewversion */) void SettingsCache::setNotifyAboutNewVersion(QT_STATE_CHANGED_T /* _notifyaboutnewversion */)
{ {
} }
void SettingsCache::setDownloadSpoilerStatus(bool /* _spoilerStatus */) void SettingsCache::setDownloadSpoilerStatus(bool /* _spoilerStatus */)

View file

@ -12,6 +12,7 @@
#include "../../cockatrice/src/game/cards/card_database.h" #include "../../cockatrice/src/game/cards/card_database.h"
#include "../../cockatrice/src/settings/cache_settings.h" #include "../../cockatrice/src/settings/cache_settings.h"
#include "../cockatrice/src/utility/macros.h"
extern SettingsCache *settingsCache; extern SettingsCache *settingsCache;