aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/qmljs/qmljsmodelmanagerinterface.h
diff options
context:
space:
mode:
authorFawzi Mohamed <[email protected]>2014-04-11 23:07:52 +0200
committerFawzi Mohamed <[email protected]>2014-05-06 14:28:40 +0200
commit08163f3b9ae4692cc7f2b4b6fe6e7aa3b9f6c626 (patch)
tree4b1f52abdeec99b5ca3e43f6929df06c523371a8 /src/libs/qmljs/qmljsmodelmanagerinterface.h
parent0ee870493003b8f7ee12799049a9a0f8d7a4e094 (diff)
qmljs: better defaults, more uniform handling of paths
Uniform handling of the different qml dialects. Now paths for a given document prefer the project of that document. For Qt the following sequence is used: - Qt of the project of the document - Qt of the active target - Qt used to run creator Currently all paths of the open projects are still merged, but that can be changed. Change-Id: Iacf28d63184c05e2bcdfe0210ec472d2bf140d66 Reviewed-by: Thomas Hartmann <[email protected]>
Diffstat (limited to 'src/libs/qmljs/qmljsmodelmanagerinterface.h')
-rw-r--r--src/libs/qmljs/qmljsmodelmanagerinterface.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/libs/qmljs/qmljsmodelmanagerinterface.h b/src/libs/qmljs/qmljsmodelmanagerinterface.h
index 0dc2cb7142b..e8b4748932f 100644
--- a/src/libs/qmljs/qmljsmodelmanagerinterface.h
+++ b/src/libs/qmljs/qmljsmodelmanagerinterface.h
@@ -177,7 +177,7 @@ public:
void updateLibraryInfo(const QString &path, const QmlJS::LibraryInfo &info);
void emitDocumentChangedOnDisk(QmlJS::Document::Ptr doc);
void updateQrcFile(const QString &path);
- ProjectInfo projectInfoForPath(QString path);
+ ProjectInfo projectInfoForPath(QString path) const;
QStringList importPaths() const;
QmlJS::QmlLanguageBundles activeBundles() const;
@@ -188,17 +188,16 @@ public:
CppDataHash cppData() const;
LibraryInfo builtins(const Document::Ptr &doc) const;
- virtual ViewerContext completeVContext(const ViewerContext &vCtx,
- const Document::Ptr &doc = Document::Ptr(0)) const;
- virtual ViewerContext defaultVContext(bool autoComplete = true,
- const Document::Ptr &doc = Document::Ptr(0)) const;
- virtual void setDefaultVContext(const ViewerContext &vContext);
+ ViewerContext completeVContext(const ViewerContext &vCtx,
+ const Document::Ptr &doc = Document::Ptr(0)) const;
+ ViewerContext defaultVContext(Language::Enum language = Language::Qml,
+ const Document::Ptr &doc = Document::Ptr(0),
+ bool autoComplete = true) const;
+ void setDefaultVContext(const ViewerContext &vContext);
+ virtual ProjectInfo defaultProjectInfo() const;
// Blocks until all parsing threads are done. Used for testing.
void joinAllThreads();
-
- virtual ModelManagerInterface::ProjectInfo defaultProjectInfo() const;
-
public slots:
virtual void resetCodeModel();
void removeProjectInfo(ProjectExplorer::Project *project);
@@ -256,7 +255,7 @@ private:
QStringList m_defaultImportPaths;
QmlJS::QmlLanguageBundles m_activeBundles;
QmlJS::QmlLanguageBundles m_extendedBundles;
- QmlJS::ViewerContext m_vContext;
+ QHash<Language::Enum, QmlJS::ViewerContext> m_defaultVContexts;
bool m_shouldScanImports;
QSet<QString> m_scannedPaths;