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>
This commit is contained in:
Fawzi Mohamed
2014-04-11 23:07:52 +02:00
parent 7206c0b020
commit 58489e50a8
9 changed files with 226 additions and 83 deletions

View File

@@ -42,8 +42,10 @@ class QMLJS_EXPORT ViewerContext
public:
enum Flags {
Complete,
AddAllPathsAndDefaultSelectors,
AddAllPaths,
AddQtPath
AddDefaultPaths,
AddDefaultPathsAndSelectors
};
ViewerContext();
@@ -52,6 +54,7 @@ public:
Flags flags = AddAllPaths);
bool languageIsCompatible(Language::Enum l) const;
void maybeAddPath(const QString &path);
QStringList selectors;
QStringList paths;