mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-23 19:12:14 +03:00
gui: Remove unnecessary accessor to private member in KeySequence
This commit is contained in:
parent
3f387bdad0
commit
1c434df87a
@ -152,12 +152,12 @@ bool KeySequence::appendKey(int key, int modifiers)
|
||||
|
||||
void KeySequence::loadSettings(QSettings& settings)
|
||||
{
|
||||
sequence().clear();
|
||||
m_Sequence.clear();
|
||||
int num = settings.beginReadArray("keys");
|
||||
for (int i = 0; i < num; i++)
|
||||
{
|
||||
settings.setArrayIndex(i);
|
||||
sequence().append(settings.value("key", 0).toInt());
|
||||
m_Sequence.append(settings.value("key", 0).toInt());
|
||||
}
|
||||
settings.endArray();
|
||||
|
||||
@ -168,10 +168,10 @@ void KeySequence::loadSettings(QSettings& settings)
|
||||
void KeySequence::saveSettings(QSettings& settings) const
|
||||
{
|
||||
settings.beginWriteArray("keys");
|
||||
for (int i = 0; i < sequence().size(); i++)
|
||||
for (int i = 0; i < m_Sequence.size(); i++)
|
||||
{
|
||||
settings.setArrayIndex(i);
|
||||
settings.setValue("key", sequence()[i]);
|
||||
settings.setValue("key", m_Sequence[i]);
|
||||
}
|
||||
settings.endArray();
|
||||
}
|
||||
|
@ -44,7 +44,6 @@ class KeySequence
|
||||
private:
|
||||
void setValid(bool b) { m_IsValid = b; }
|
||||
void setModifiers(int i) { m_Modifiers = i; }
|
||||
QList<int>& sequence() { return m_Sequence; }
|
||||
|
||||
private:
|
||||
QList<int> m_Sequence;
|
||||
|
Loading…
Reference in New Issue
Block a user