summaryrefslogtreecommitdiff
path: root/src/plugins/qmljseditor
diff options
context:
space:
mode:
authorFawzi Mohamed <fawzi.mohamed@digia.com>2014-06-02 19:36:32 +0200
committerFawzi Mohamed <fawzi.mohamed@digia.com>2014-07-01 10:19:50 +0200
commitdef863eec671d06770db97d9b918a9426cdd2aae (patch)
tree2fe05b9fcd2ea471168b6eb8db9d8cf111a59f7a /src/plugins/qmljseditor
parent9cee5d3b226728267540b7d584dea1b155fe1c5c (diff)
downloadqt-creator-def863eec671d06770db97d9b918a9426cdd2aae.tar.gz
qmljs: split Unknown in NoLanguage and AnyLanguage
Change-Id: I31276084af5e2f0c5f4ca861f17e29430563bb13 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Diffstat (limited to 'src/plugins/qmljseditor')
-rw-r--r--src/plugins/qmljseditor/qmljsfindreferences.cpp4
-rw-r--r--src/plugins/qmljseditor/qmltaskmanager.cpp2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/qmljseditor/qmljsfindreferences.cpp b/src/plugins/qmljseditor/qmljsfindreferences.cpp
index 42c43f7918..0af1dbd349 100644
--- a/src/plugins/qmljseditor/qmljsfindreferences.cpp
+++ b/src/plugins/qmljseditor/qmljsfindreferences.cpp
@@ -817,6 +817,10 @@ static void find_helper(QFutureInterface<FindReferences::Usage> &future,
language = oldDoc->language();
else
language = ModelManagerInterface::guessLanguageOfFile(fileName);
+ if (language == Language::NoLanguage) {
+ qCDebug(qmljsLog) << "NoLanguage in qmljsfindreferences.cpp find_helper for " << fileName;
+ language = Language::AnyLanguage;
+ }
Document::MutablePtr newDoc = snapshot.documentFromSource(
it.value().first, fileName, language);
diff --git a/src/plugins/qmljseditor/qmltaskmanager.cpp b/src/plugins/qmljseditor/qmltaskmanager.cpp
index 8e21c52d0a..47bfe93760 100644
--- a/src/plugins/qmljseditor/qmltaskmanager.cpp
+++ b/src/plugins/qmljseditor/qmltaskmanager.cpp
@@ -161,7 +161,7 @@ void QmlTaskManager::updateMessagesNow(bool updateSemantic)
QFuture<FileErrorMessages> future =
QtConcurrent::run<FileErrorMessages>(
&collectMessages, modelManager->newestSnapshot(), modelManager->projectInfos(),
- modelManager->defaultVContext(Language::Unknown), updateSemantic);
+ modelManager->defaultVContext(Language::AnyLanguage), updateSemantic);
m_messageCollector.setFuture(future);
}