forked from qt-creator/qt-creator
Completely rework currentNode/currentProject handling
Centralize the handling inside a new class ProjectTree. React to moving focus and remove most special handling. This properly fixes the linked task. Task-number: QTCREATORBUG-13357 Change-Id: I6b06aa32b1e4305ec8a6d432857b302585d8734b Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
#include <qmljs/qmljscompletioncontextfinder.h>
|
||||
#include <qmljs/qmljsbundle.h>
|
||||
#include <qmljs/qmljsscopebuilder.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/projecttree.h>
|
||||
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
@@ -652,7 +652,7 @@ IAssistProposal *QmlJSCompletionAssistProcessor::perform(const AssistInterface *
|
||||
// currently path-in-stringliteral is the only completion available in imports
|
||||
if (contextFinder.isInImport()) {
|
||||
QmlJS::ModelManagerInterface::ProjectInfo pInfo = QmlJS::ModelManagerInterface::instance()
|
||||
->projectInfo(ProjectExplorer::ProjectExplorerPlugin::currentProject());
|
||||
->projectInfo(ProjectExplorer::ProjectTree::currentProject());
|
||||
QmlBundle platform = pInfo.extendedBundle.bundleForLanguage(document->language());
|
||||
if (!platform.supportedImports().isEmpty()) {
|
||||
QTextCursor tc(qmlInterface->textDocument());
|
||||
|
||||
Reference in New Issue
Block a user