OSDN Git Service

fix <S-Ins> short cut in text editor
authorJoerg Bornemann <joerg.bornemann@nokia.com>
Tue, 18 Oct 2011 07:48:34 +0000 (09:48 +0200)
committerLeandro T. C. Melo <leandro.melo@nokia.com>
Tue, 18 Oct 2011 10:01:10 +0000 (12:01 +0200)
Only <Ins> should switch to overwrite mode.
<S-Ins> is supposed to paste text.

Change-Id: I66dd94d210488312a222a408cddb793451d14580
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
src/plugins/texteditor/basetexteditor.cpp

index fa41f71..fafb668 100644 (file)
@@ -1771,7 +1771,7 @@ void BaseTextEditorWidget::keyPressEvent(QKeyEvent *e)
         break;
     case Qt::Key_Insert:
         if (ro) break;
-        if ((e->modifiers() & (Qt::ControlModifier | Qt::AltModifier)) == 0) {
+        if (e->modifiers() == Qt::NoModifier) {
             if (inOverwriteMode) {
                 d->m_autoCompleter->setAutoParenthesesEnabled(d->autoParenthesisOverwriteBackup);
                 d->m_autoCompleter->setSurroundWithEnabled(d->surroundWithEnabledOverwriteBackup);