From ee200a7be0f783c2886cf0c92546540b0eec16b4 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen <erik.verbruggen@digia.com> Date: Mon, 19 May 2014 11:33:27 +0200 Subject: [PATCH] C++: fix follow-symbol-under-cursor for #import <xyz> Task-number: QTCREATORBUG-12254 Change-Id: I4179c78f3ce6bf2236f8375da1765122a974118c Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com> --- src/libs/cplusplus/SimpleLexer.cpp | 2 ++ src/plugins/cppeditor/cppfollowsymbolundercursor.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/libs/cplusplus/SimpleLexer.cpp b/src/libs/cplusplus/SimpleLexer.cpp index 26030ae09f7..8e539acb84a 100644 --- a/src/libs/cplusplus/SimpleLexer.cpp +++ b/src/libs/cplusplus/SimpleLexer.cpp @@ -133,6 +133,8 @@ Token SimpleLexer::tokenAt(const QString &text, features.qtMocRunEnabled = qtMocRunEnabled; features.qtEnabled = qtMocRunEnabled; features.qtKeywordsEnabled = qtMocRunEnabled; + features.objCEnabled = qtMocRunEnabled; + features.cxx11Enabled = qtMocRunEnabled; SimpleLexer tokenize; tokenize.setLanguageFeatures(features); const QList<Token> tokens = tokenize(text, state); diff --git a/src/plugins/cppeditor/cppfollowsymbolundercursor.cpp b/src/plugins/cppeditor/cppfollowsymbolundercursor.cpp index 0d7b40560ec..90af2bf06cd 100644 --- a/src/plugins/cppeditor/cppfollowsymbolundercursor.cpp +++ b/src/plugins/cppeditor/cppfollowsymbolundercursor.cpp @@ -467,6 +467,8 @@ BaseTextEditorWidget::Link FollowSymbolUnderCursor::findLink(const QTextCursor & features.qtEnabled = true; features.qtKeywordsEnabled = true; features.qtMocRunEnabled = true; + features.objCEnabled = true; + features.cxx11Enabled = true; SimpleLexer tokenize; tokenize.setLanguageFeatures(features); -- GitLab