diff --git a/src/plugins/coreplugin/actionmanager/command.cpp b/src/plugins/coreplugin/actionmanager/command.cpp index a9c22e2c11215f563c7f956bec7a962d06873b9d..6e84d29c554dfdf4cacb8f8617cd57f3b3e92629 100644 --- a/src/plugins/coreplugin/actionmanager/command.cpp +++ b/src/plugins/coreplugin/actionmanager/command.cpp @@ -425,11 +425,8 @@ QKeySequence Action::keySequence() const OverrideableAction::OverrideableAction(int id) : Action(id), m_currentAction(0), m_active(false), - m_contextInitialized(false), - m_dummyShortcutEater(this) + m_contextInitialized(false) { - Core::ICore::instance()->mainWindow()->addAction(&m_dummyShortcutEater); - m_dummyShortcutEater.setEnabled(false); } void OverrideableAction::setAction(QAction *action) @@ -473,7 +470,6 @@ bool OverrideableAction::setCurrentContext(const QList<int> &context) if (hasAttribute(CA_Hide)) m_action->setVisible(false); m_action->setEnabled(false); - m_dummyShortcutEater.setEnabled(false); m_active = false; return false; } @@ -527,9 +523,6 @@ void OverrideableAction::actionChanged() m_action->setEnabled(m_currentAction->isEnabled()); m_action->setVisible(m_currentAction->isVisible()); - - m_dummyShortcutEater.setShortcuts(m_action->shortcuts()); - m_dummyShortcutEater.setEnabled(m_action->isVisible() && !m_action->isEnabled()); } bool OverrideableAction::isActive() const diff --git a/src/plugins/coreplugin/actionmanager/command_p.h b/src/plugins/coreplugin/actionmanager/command_p.h index 1c89fd7b7fb0af5bcd0a9107c2918f58da4a7941..176866dfeeb7a3ffc48621f5c8188a591e661922 100644 --- a/src/plugins/coreplugin/actionmanager/command_p.h +++ b/src/plugins/coreplugin/actionmanager/command_p.h @@ -153,7 +153,6 @@ private: QMap<int, QPointer<QAction> > m_contextActionMap; bool m_active; bool m_contextInitialized; - QAction m_dummyShortcutEater; }; } // namespace Internal diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index 29f41aa4bb22e7a4a9f4d1076274abe81a633c19..531e25f7a7cd50d75cef3c5dfd30bea1b8247ca2 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -1176,7 +1176,7 @@ void BaseTextEditor::keyPressEvent(QKeyEvent *e) if (ro || e->text().isEmpty() || !e->text().at(0).isPrint()) { QPlainTextEdit::keyPressEvent(e); - } else { + } else if ((e->modifiers() & Qt::ControlModifier) != Qt::ControlModifier){ QTextCursor cursor = textCursor(); QString text = e->text(); QString autoText = autoComplete(cursor, text);