diff --git a/src/gui/src/Hotkey.cpp b/src/gui/src/Hotkey.cpp index fc258204..43a8faa2 100644 --- a/src/gui/src/Hotkey.cpp +++ b/src/gui/src/Hotkey.cpp @@ -68,8 +68,8 @@ void Hotkey::saveSettings(QSettings& settings) const QTextStream& operator<<(QTextStream& outStream, const Hotkey& hotkey) { - for (int i = 0; i < hotkey.m_Actions.size(); i++) - outStream << "\t" << hotkey.text() << " = " << hotkey.m_Actions[i] << endl; + for (int i = 0; i < hotkey.actions().size(); i++) + outStream << "\t" << hotkey.text() << " = " << hotkey.actions()[i] << endl; return outStream; } diff --git a/src/gui/src/Hotkey.h b/src/gui/src/Hotkey.h index becf3739..1a26d089 100644 --- a/src/gui/src/Hotkey.h +++ b/src/gui/src/Hotkey.h @@ -33,17 +33,14 @@ class QSettings; class Hotkey { - friend class HotkeyDialog; - friend QTextStream& operator<<(QTextStream& outStream, const Hotkey& hotkey); - public: Hotkey(); - public: QString text() const; const KeySequence& keySequence() const { return m_KeySequence; } - const ActionList& actions() const { return m_Actions; } + void setKeySequence(const KeySequence& seq) { m_KeySequence = seq; } + const ActionList& actions() const { return m_Actions; } void appendAction(const Action& action) { m_Actions.append(action); } void setAction(int index, const Action& action) { m_Actions[index] = action; } void removeAction(int index) { m_Actions.removeAt(index); } @@ -51,8 +48,6 @@ class Hotkey void loadSettings(QSettings& settings); void saveSettings(QSettings& settings) const; - protected: - void setKeySequence(const KeySequence& seq) { m_KeySequence = seq; } private: KeySequence m_KeySequence;