Skip to content

Commit

Permalink
Fix code indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Pac72 committed Jun 16, 2024
1 parent dcd746b commit 782aec4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
13 changes: 9 additions & 4 deletions ui/src/virtualconsole/vcscrollarea.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ VCScrollArea::VCScrollArea(QWidget *parent) : QScrollArea(parent) {
void VCScrollArea::keyPressEvent(QKeyEvent *ev) {
unsigned int keyCode = ev->key() | ev->modifiers();
QList<unsigned int>::const_iterator it = std::find(m_overriddenKeyCodes.constBegin(), m_overriddenKeyCodes.constEnd(), keyCode);
if (it != m_overriddenKeyCodes.constEnd()) {
if (it != m_overriddenKeyCodes.constEnd())
{
ev->ignore();
} else {
}
else
{
QScrollArea::keyPressEvent(ev);
}
}
Expand All @@ -29,8 +32,10 @@ bool VCScrollArea::needsOverride(const QKeySequence& ks) {
void VCScrollArea::setKeyOverrides(const QList<QKeySequence> &keyOverrides) {
m_overriddenKeyCodes.clear();
for (QList<QKeySequence>::const_iterator it = keyOverrides.constBegin();
it != keyOverrides.constEnd(); ++it) {
if (needsOverride(*it)) {
it != keyOverrides.constEnd(); ++it)
{
if (needsOverride(*it))
{
// all our key sequences have only one key
unsigned int keyCode = (*it)[0];
m_overriddenKeyCodes.append(keyCode);
Expand Down
7 changes: 4 additions & 3 deletions ui/src/virtualconsole/virtualconsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1776,10 +1776,11 @@ void VirtualConsole::enableKeyOverrides() {
QList<QKeySequence> keySequencesToOverride;

for (QHash<quint32, VCWidget *>::const_iterator it = m_widgetsMap.constBegin();
it != m_widgetsMap.constEnd();
++it) {
it != m_widgetsMap.constEnd(); ++it)
{
VCButton *btn = qobject_cast<VCButton*>(*it);
if (btn) {
if (btn)
{
keySequencesToOverride.append(btn->keySequence());
}
}
Expand Down

0 comments on commit 782aec4

Please sign in to comment.