forked from qt-creator/qt-creator
qmljs: improve handling of qml dialects
Language::Enum -> QmlDialect * class instead of enum * moved Language specific operations to it (from Document) * nicer handling QStringList -> PathsAndLanguages * store language along with path, to perform a correct scan and improve path handling Change-Id: If69d35c63cfeb48aa670b51870916cd0c40f1916 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
|
||||
#include "qmljs_global.h"
|
||||
#include "qmljsconstants.h"
|
||||
#include "qmljsdialect.h"
|
||||
|
||||
#include <QStringList>
|
||||
|
||||
@@ -50,15 +51,15 @@ public:
|
||||
|
||||
ViewerContext();
|
||||
ViewerContext(QStringList selectors, QStringList paths,
|
||||
Language::Enum language = Language::Qml,
|
||||
Dialect language = Dialect::Qml,
|
||||
Flags flags = AddAllPaths);
|
||||
|
||||
bool languageIsCompatible(Language::Enum l) const;
|
||||
bool languageIsCompatible(Dialect l) const;
|
||||
void maybeAddPath(const QString &path);
|
||||
|
||||
QStringList selectors;
|
||||
QStringList paths;
|
||||
Language::Enum language;
|
||||
Dialect language;
|
||||
Flags flags;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user