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)
|
void KeySequence::loadSettings(QSettings& settings)
|
||||||
{
|
{
|
||||||
sequence().clear();
|
m_Sequence.clear();
|
||||||
int num = settings.beginReadArray("keys");
|
int num = settings.beginReadArray("keys");
|
||||||
for (int i = 0; i < num; i++)
|
for (int i = 0; i < num; i++)
|
||||||
{
|
{
|
||||||
settings.setArrayIndex(i);
|
settings.setArrayIndex(i);
|
||||||
sequence().append(settings.value("key", 0).toInt());
|
m_Sequence.append(settings.value("key", 0).toInt());
|
||||||
}
|
}
|
||||||
settings.endArray();
|
settings.endArray();
|
||||||
|
|
||||||
|
@ -168,10 +168,10 @@ void KeySequence::loadSettings(QSettings& settings)
|
||||||
void KeySequence::saveSettings(QSettings& settings) const
|
void KeySequence::saveSettings(QSettings& settings) const
|
||||||
{
|
{
|
||||||
settings.beginWriteArray("keys");
|
settings.beginWriteArray("keys");
|
||||||
for (int i = 0; i < sequence().size(); i++)
|
for (int i = 0; i < m_Sequence.size(); i++)
|
||||||
{
|
{
|
||||||
settings.setArrayIndex(i);
|
settings.setArrayIndex(i);
|
||||||
settings.setValue("key", sequence()[i]);
|
settings.setValue("key", m_Sequence[i]);
|
||||||
}
|
}
|
||||||
settings.endArray();
|
settings.endArray();
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,6 @@ class KeySequence
|
||||||
private:
|
private:
|
||||||
void setValid(bool b) { m_IsValid = b; }
|
void setValid(bool b) { m_IsValid = b; }
|
||||||
void setModifiers(int i) { m_Modifiers = i; }
|
void setModifiers(int i) { m_Modifiers = i; }
|
||||||
QList<int>& sequence() { return m_Sequence; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QList<int> m_Sequence;
|
QList<int> m_Sequence;
|
||||||
|
|
Loading…
Reference in New Issue