Refactor files in src/game to new Qt Slot/Signal syntax (#5431)

* fix signals in CardDatabaseParser

* update remaining signals

* cleanup

* wait this was always just broken

* fix build failure

* fix build failure

* fix build failure
This commit is contained in:
RickyRister 2025-01-09 03:32:25 -08:00 committed by GitHub
parent 6e8adddc6d
commit c3421669d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 180 additions and 181 deletions

View file

@ -36,7 +36,7 @@ AbstractCounter::AbstractCounter(Player *_player,
QString displayName = TranslateCounterName::getDisplayName(_name);
menu = new TearOffMenu(displayName);
aSet = new QAction(this);
connect(aSet, SIGNAL(triggered()), this, SLOT(setCounter()));
connect(aSet, &QAction::triggered, this, &AbstractCounter::setCounter);
menu->addAction(aSet);
menu->addSeparator();
for (int i = 10; i >= -10; --i) {
@ -49,7 +49,7 @@ AbstractCounter::AbstractCounter(Player *_player,
else if (i == 1)
aInc = aIncrement;
aIncrement->setData(i);
connect(aIncrement, SIGNAL(triggered()), this, SLOT(incrementCounter()));
connect(aIncrement, &QAction::triggered, this, &AbstractCounter::incrementCounter);
menu->addAction(aIncrement);
}
}
@ -57,7 +57,8 @@ AbstractCounter::AbstractCounter(Player *_player,
menu = nullptr;
}
connect(&SettingsCache::instance().shortcuts(), SIGNAL(shortCutChanged()), this, SLOT(refreshShortcuts()));
connect(&SettingsCache::instance().shortcuts(), &ShortcutsSettings::shortCutChanged, this,
&AbstractCounter::refreshShortcuts);
refreshShortcuts();
retranslateUi();
}