mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-14 19:18:55 -07:00
Dependency Injection for SettingsCache
* Turn SettingsCache into a QSharedPointer. * Implement interfaces for settings that need it Took 2 hours 38 minutes
This commit is contained in:
parent
b773909dfd
commit
35d18b5fa9
127 changed files with 1012 additions and 803 deletions
|
|
@ -57,7 +57,7 @@ AbstractCounter::AbstractCounter(Player *_player,
|
|||
menu = nullptr;
|
||||
}
|
||||
|
||||
connect(&SettingsCache::instance().shortcuts(), &ShortcutsSettings::shortCutChanged, this,
|
||||
connect(&SettingsCache::instance().get()->shortcuts(), &ShortcutsSettings::shortCutChanged, this,
|
||||
&AbstractCounter::refreshShortcuts);
|
||||
refreshShortcuts();
|
||||
retranslateUi();
|
||||
|
|
@ -88,7 +88,7 @@ void AbstractCounter::setShortcutsActive()
|
|||
if (!player->getPlayerInfo()->getLocal()) {
|
||||
return;
|
||||
}
|
||||
ShortcutsSettings &shortcuts = SettingsCache::instance().shortcuts();
|
||||
ShortcutsSettings &shortcuts = SettingsCache::instance()->shortcuts();
|
||||
if (name == "life") {
|
||||
shortcutActive = true;
|
||||
aSet->setShortcuts(shortcuts.getShortcut("Player/aSet"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue