diff options
author | Fawzi Mohamed <fawzi.mohamed@digia.com> | 2014-04-11 23:07:52 +0200 |
---|---|---|
committer | Fawzi Mohamed <fawzi.mohamed@digia.com> | 2014-05-09 17:13:05 +0200 |
commit | 58489e50a87c839cdb3276b355780b9e7e8dcd08 (patch) | |
tree | a23a0d683a2f10ac314d7366e4e1ec79a11ee901 /src/libs/qmljs/qmljsviewercontext.cpp | |
parent | 7206c0b02087e19b2a3b312974de4eb6feae9409 (diff) | |
download | qt-creator-58489e50a87c839cdb3276b355780b9e7e8dcd08.tar.gz |
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: Id302c13c893b66fbfe24e301602fe69de152eed4
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Diffstat (limited to 'src/libs/qmljs/qmljsviewercontext.cpp')
-rw-r--r-- | src/libs/qmljs/qmljsviewercontext.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libs/qmljs/qmljsviewercontext.cpp b/src/libs/qmljs/qmljsviewercontext.cpp index 3a7e7c945e..4750c23f53 100644 --- a/src/libs/qmljs/qmljsviewercontext.cpp +++ b/src/libs/qmljs/qmljsviewercontext.cpp @@ -76,4 +76,10 @@ bool ViewerContext::languageIsCompatible(Language::Enum l) const return true; } +void ViewerContext::maybeAddPath(const QString &path) +{ + if (!path.isEmpty() && !paths.contains(path)) + paths.append(path); +} + } // namespace QmlJS |