@@ -128,12 +128,14 @@ bool lcKeyboardShortcuts::Load(QTextStream& Stream)
128
128
return true ;
129
129
}
130
130
131
- void lcMouseShortcuts::Clear () {
132
- for (int ToolIdx = 0 ; ToolIdx < static_cast <int >(lcTool::Count); ToolIdx++) {
133
- mShortcuts [ToolIdx].Modifiers1 = Qt::NoModifier;
134
- mShortcuts [ToolIdx].Button1 = Qt::NoButton;
135
- mShortcuts [ToolIdx].Modifiers2 = Qt::NoModifier;
136
- mShortcuts [ToolIdx].Button2 = Qt::NoButton;
131
+ void lcMouseShortcuts::Clear ()
132
+ {
133
+ for (int ShortcutIndex = 0 ; ShortcutIndex < static_cast <int >(lcTool::Count); ShortcutIndex++)
134
+ {
135
+ mShortcuts [ShortcutIndex].Modifiers1 = Qt::NoModifier;
136
+ mShortcuts [ShortcutIndex].Button1 = Qt::NoButton;
137
+ mShortcuts [ShortcutIndex].Modifiers2 = Qt::NoModifier;
138
+ mShortcuts [ShortcutIndex].Button2 = Qt::NoButton;
137
139
}
138
140
}
139
141
@@ -183,25 +185,25 @@ bool lcMouseShortcuts::Save(QStringList& Shortcuts)
183
185
{
184
186
Shortcuts.clear ();
185
187
186
- for (int ToolIdx = 0 ; ToolIdx < static_cast <int >(lcTool::Count); ToolIdx ++)
188
+ for (int ShortcutIndex = 0 ; ShortcutIndex < static_cast <int >(lcTool::Count); ShortcutIndex ++)
187
189
{
188
190
int ButtonIndex1 = 0 ;
189
- for (int Button1 = mShortcuts [ToolIdx ].Button1 ; Button1; Button1 >>= 1 )
191
+ for (int Button1 = mShortcuts [ShortcutIndex ].Button1 ; Button1; Button1 >>= 1 )
190
192
ButtonIndex1++;
191
193
192
194
if (!ButtonIndex1)
193
195
continue ;
194
196
195
- QString Shortcut = QKeySequence (mShortcuts [ToolIdx ].Modifiers1 | (Qt::Key_0 + ButtonIndex1)).toString (QKeySequence::PortableText);
197
+ QString Shortcut = QKeySequence (mShortcuts [ShortcutIndex ].Modifiers1 | (Qt::Key_0 + ButtonIndex1)).toString (QKeySequence::PortableText);
196
198
197
199
int ButtonIndex2 = 0 ;
198
- for (int Button2 = mShortcuts [ToolIdx ].Button2 ; Button2; Button2 >>= 1 )
200
+ for (int Button2 = mShortcuts [ShortcutIndex ].Button2 ; Button2; Button2 >>= 1 )
199
201
ButtonIndex2++;
200
202
201
203
if (ButtonIndex2)
202
- Shortcut += ' ,' + QKeySequence (mShortcuts [ToolIdx ].Modifiers2 | (Qt::Key_0 + ButtonIndex2)).toString (QKeySequence::PortableText);
204
+ Shortcut += ' ,' + QKeySequence (mShortcuts [ShortcutIndex ].Modifiers2 | (Qt::Key_0 + ButtonIndex2)).toString (QKeySequence::PortableText);
203
205
204
- Shortcuts << QString::fromLatin1 (gToolNames [ToolIdx ]) + QLatin1String (" =" ) + Shortcut;
206
+ Shortcuts << QString::fromLatin1 (gToolNames [ShortcutIndex ]) + QLatin1String (" =" ) + Shortcut;
205
207
}
206
208
207
209
return true ;
0 commit comments