forked from qt-creator/qt-creator
QmlJS: Clean up ViewerContext
The special ctor wasn't used anywhere, the default ctor can be replaced by inline initialization, maybeAddPath is only meaningful in the model manager and the language compatibility check should definitely not pretend to be a general rule either. Change-Id: I11cf25fe1c696550d33b56ce57316100321d564b Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -32,9 +32,8 @@
|
||||
|
||||
namespace QmlJS {
|
||||
|
||||
class QMLJS_EXPORT ViewerContext
|
||||
struct QMLJS_EXPORT ViewerContext
|
||||
{
|
||||
public:
|
||||
enum Flags {
|
||||
Complete,
|
||||
AddAllPathsAndDefaultSelectors,
|
||||
@@ -43,18 +42,10 @@ public:
|
||||
AddDefaultPathsAndSelectors
|
||||
};
|
||||
|
||||
ViewerContext();
|
||||
ViewerContext(const QStringList &selectors, const QStringList &paths,
|
||||
Dialect language = Dialect::Qml,
|
||||
Flags flags = AddAllPaths);
|
||||
|
||||
bool languageIsCompatible(Dialect l) const;
|
||||
void maybeAddPath(const QString &path);
|
||||
|
||||
QStringList selectors;
|
||||
QStringList paths;
|
||||
Dialect language;
|
||||
Flags flags;
|
||||
Dialect language = Dialect::Qml;
|
||||
Flags flags = AddAllPaths;
|
||||
};
|
||||
|
||||
} // namespace QmlJS
|
||||
|
||||
Reference in New Issue
Block a user