forked from qt-creator/qt-creator
qmljs: added qmljsconstants.h
Moved Document::Language, Import::Type and StaticAnalysis::Severity enums to qmljsconstants.h and renamed values removing the redundant part. Thus the effective length changed little or improved (Document::QmlLanguage => Language::Qml). The separate file allows better reuse of enum values without introducing circular dependencies. Change-Id: I5186d7c04f5d3f6c289068b919be5ff1ff118326 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
|
||||
#include <qmljs/qmljsdocument.h>
|
||||
#include <qmljs/qmljs_global.h>
|
||||
#include <qmljs/qmljsconstants.h>
|
||||
|
||||
#include <QFileInfoList>
|
||||
#include <QList>
|
||||
@@ -866,17 +867,6 @@ public:
|
||||
class QMLJS_EXPORT ImportInfo
|
||||
{
|
||||
public:
|
||||
enum Type {
|
||||
InvalidImport,
|
||||
ImplicitDirectoryImport,
|
||||
LibraryImport,
|
||||
FileImport,
|
||||
DirectoryImport,
|
||||
QrcFileImport,
|
||||
QrcDirectoryImport,
|
||||
UnknownFileImport // refers a file/directory that wasn't found
|
||||
};
|
||||
|
||||
ImportInfo();
|
||||
|
||||
static ImportInfo moduleImport(QString uri, LanguageUtils::ComponentVersion version,
|
||||
@@ -888,7 +878,7 @@ public:
|
||||
static ImportInfo implicitDirectoryImport(const QString &directory);
|
||||
|
||||
bool isValid() const;
|
||||
Type type() const;
|
||||
ImportType::Enum type() const;
|
||||
|
||||
// LibraryImport: uri with ',' separator
|
||||
// Other: non-absolute path
|
||||
@@ -905,7 +895,7 @@ public:
|
||||
AST::UiImport *ast() const;
|
||||
|
||||
private:
|
||||
Type _type;
|
||||
ImportType::Enum _type;
|
||||
LanguageUtils::ComponentVersion _version;
|
||||
QString _name;
|
||||
QString _path;
|
||||
|
||||
Reference in New Issue
Block a user