aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/qmljs/qmljsstaticanalysismessage.h
diff options
context:
space:
mode:
authorFawzi Mohamed <[email protected]>2013-10-16 14:59:28 +0200
committerFawzi Mohamed <[email protected]>2013-10-23 00:35:16 +0200
commit0a4310d3148861062b9679e1415197b3a883164f (patch)
treebdc93dcc43e1ada315aca79883e1e890327d5faa /src/libs/qmljs/qmljsstaticanalysismessage.h
parentab71755326eeee537fb9eee157d7fffcd54cb723 (diff)
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 <[email protected]>
Diffstat (limited to 'src/libs/qmljs/qmljsstaticanalysismessage.h')
-rw-r--r--src/libs/qmljs/qmljsstaticanalysismessage.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/libs/qmljs/qmljsstaticanalysismessage.h b/src/libs/qmljs/qmljsstaticanalysismessage.h
index 3cf29d7bba0..4e1ca5afc60 100644
--- a/src/libs/qmljs/qmljsstaticanalysismessage.h
+++ b/src/libs/qmljs/qmljsstaticanalysismessage.h
@@ -31,6 +31,7 @@
#define QMLJS_STATICANALYSIS_QMLJSSTATICANALYSISMESSAGE_H
#include "qmljs_global.h"
+#include "qmljsconstants.h"
#include "parser/qmljsengine_p.h"
#include <QRegExp>
@@ -40,15 +41,6 @@
namespace QmlJS {
namespace StaticAnalysis {
-enum Severity
-{
- Hint, // cosmetic or convention
- MaybeWarning, // possibly a warning, insufficient information
- Warning, // could cause unintended behavior
- MaybeError, // possibly an error, insufficient information
- Error // definitely an error
-};
-
enum Type
{
// Changing the numbers can break user code.
@@ -134,7 +126,7 @@ enum Type
class QMLJS_EXPORT PrototypeMessageData {
public:
Type type;
- Severity severity;
+ Severity::Enum severity;
QString message;
int placeholders;
};
@@ -159,7 +151,7 @@ public:
AST::SourceLocation location;
QString message;
Type type;
- Severity severity;
+ Severity::Enum severity;
static const PrototypeMessageData prototypeForMessageType(Type type);
};