forked from qt-creator/qt-creator
QmlJS: Move commonly used functions to qmlutils.h.
Change-Id: I22376d96fe575bc00a55094c06af80e32a5587e6 Reviewed-on: http://codereview.qt-project.org/6238 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
This commit is contained in:
@@ -151,27 +151,6 @@ private:
|
||||
QStack<StringSet> m_propertyStack;
|
||||
};
|
||||
|
||||
QMLJS_EXPORT QColor toQColor(const QString &qmlColorString);
|
||||
|
||||
QMLJS_EXPORT AST::SourceLocation locationFromRange(const AST::SourceLocation &start,
|
||||
const AST::SourceLocation &end);
|
||||
|
||||
QMLJS_EXPORT AST::SourceLocation fullLocationForQualifiedId(AST::UiQualifiedId *);
|
||||
|
||||
QMLJS_EXPORT DiagnosticMessage errorMessage(const AST::SourceLocation &loc,
|
||||
const QString &message);
|
||||
|
||||
QMLJS_EXPORT bool isValidBuiltinPropertyType(const QString &name);
|
||||
|
||||
template <class T>
|
||||
DiagnosticMessage errorMessage(const T *node, const QString &message)
|
||||
{
|
||||
return DiagnosticMessage(DiagnosticMessage::Error,
|
||||
locationFromRange(node->firstSourceLocation(),
|
||||
node->lastSourceLocation()),
|
||||
message);
|
||||
}
|
||||
|
||||
} // namespace QmlJS
|
||||
|
||||
#endif // QMLJSCHECK_H
|
||||
|
||||
Reference in New Issue
Block a user