forked from qt-creator/qt-creator
FancyLineEdit: Make completers triggerable via Ctrl+Space
In particular, this allows to trigger the completer without providing a leading character, thus showing all history entries. Task-number: QTCREATORBUG-17891 Change-Id: I8ae900d196de2e5083a626faa757648637b325ae Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
#include <texteditor/icodestylepreferences.h>
|
||||
#include <texteditor/tabsettings.h>
|
||||
|
||||
#include <utils/fancylineedit.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/macroexpander.h>
|
||||
|
||||
@@ -125,6 +126,10 @@ bool TextEditorPlugin::initialize(const QStringList &arguments, QString *errorMe
|
||||
if (BaseTextEditor *editor = BaseTextEditor::currentTextEditor())
|
||||
editor->editorWidget()->invokeAssist(Completion);
|
||||
});
|
||||
connect(command, &Command::keySequenceChanged, [command] {
|
||||
Utils::FancyLineEdit::setCompletionShortcut(command->keySequence());
|
||||
});
|
||||
Utils::FancyLineEdit::setCompletionShortcut(command->keySequence());
|
||||
|
||||
// Add shortcut for invoking quick fix options
|
||||
QAction *quickFixAction = new QAction(tr("Trigger Refactoring Action"), this);
|
||||
|
||||
Reference in New Issue
Block a user