chore: remove Singleton & replace getIApp with getApp (#5514)

This commit is contained in:
pajlada
2024-07-21 15:09:59 +02:00
committed by GitHub
parent 21186df058
commit 5deec1f02f
145 changed files with 802 additions and 856 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ std::vector<QString> Hotkey::arguments() const
QString Hotkey::getCategory() const
{
return getIApp()->getHotkeys()->categoryDisplayName(this->category_);
return getApp()->getHotkeys()->categoryDisplayName(this->category_);
}
Qt::ShortcutContext Hotkey::getContext() const
+2 -3
View File
@@ -1,7 +1,6 @@
#pragma once
#include "common/SignalVector.hpp"
#include "common/Singleton.hpp"
#include "controllers/hotkeys/HotkeyCategory.hpp"
#include <pajlada/signals/signal.hpp>
@@ -18,7 +17,7 @@ class Hotkey;
class HotkeyModel;
class HotkeyController final : public Singleton
class HotkeyController final
{
public:
using HotkeyFunction = std::function<QString(std::vector<QString>)>;
@@ -31,7 +30,7 @@ public:
HotkeyMap actionMap,
QWidget *parent);
void save() override;
void save();
std::shared_ptr<Hotkey> getHotkeyByName(QString name);
/**
* @brief returns a QKeySequence that perfoms the actions requested.