diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2018-09-20 01:16:01 +0300 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2018-09-20 08:48:49 +0000 |
commit | 41dee83becb19aa5fadae8ef9469216bcab1440c (patch) | |
tree | 2fd37b0111d0e3b78976fa8f8fbaefff30f49003 /src/plugins/texteditor/codeassist/codeassistant.cpp | |
parent | 439bc225e1c0f3d964c8a3da6e9757a821a5944c (diff) | |
download | qt-creator-41dee83becb19aa5fadae8ef9469216bcab1440c.tar.gz |
TextEditor: Modernize
override, auto, nullptr, member initializers.
Change-Id: I04c6ebb683849568973bd7782fb5a3279267141e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/texteditor/codeassist/codeassistant.cpp')
-rw-r--r-- | src/plugins/texteditor/codeassist/codeassistant.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/texteditor/codeassist/codeassistant.cpp b/src/plugins/texteditor/codeassist/codeassistant.cpp index cede626ea3..2a01ada15c 100644 --- a/src/plugins/texteditor/codeassist/codeassistant.cpp +++ b/src/plugins/texteditor/codeassist/codeassistant.cpp @@ -516,7 +516,7 @@ bool CodeAssistantPrivate::isDestroyEvent(int key, const QString &keyText) { if (keyText.isEmpty()) return key != Qt::LeftArrow && key != Qt::RightArrow && key != Qt::Key_Shift; - if (auto *provider = qobject_cast<CompletionAssistProvider *>(m_requestProvider)) + if (auto provider = qobject_cast<CompletionAssistProvider *>(m_requestProvider)) return !provider->isContinuationChar(keyText.at(0)); return false; } @@ -530,7 +530,7 @@ bool CodeAssistantPrivate::eventFilter(QObject *o, QEvent *e) if (type == QEvent::FocusOut) { destroyContext(); } else if (type == QEvent::KeyPress) { - QKeyEvent *keyEvent = static_cast<QKeyEvent *>(e); + auto keyEvent = static_cast<QKeyEvent *>(e); const QString &keyText = keyEvent->text(); if (isDestroyEvent(keyEvent->key(), keyText)) |