forked from qt-creator/qt-creator
QmlJS: Handle inner ids in 'Wrap in Loader' quick fix.
Change-Id: I7385f49928db78abd2deb7783ca0a38288ae7446 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
@@ -29,12 +29,17 @@ QMLJS_EXPORT bool isValidBuiltinPropertyType(const QString &name);
|
||||
QMLJS_EXPORT DiagnosticMessage errorMessage(const AST::SourceLocation &loc,
|
||||
const QString &message);
|
||||
|
||||
template <class T>
|
||||
AST::SourceLocation locationFromRange(const T *node)
|
||||
{
|
||||
return locationFromRange(node->firstSourceLocation(), node->lastSourceLocation());
|
||||
}
|
||||
|
||||
template <class T>
|
||||
DiagnosticMessage errorMessage(const T *node, const QString &message)
|
||||
{
|
||||
return DiagnosticMessage(DiagnosticMessage::Error,
|
||||
locationFromRange(node->firstSourceLocation(),
|
||||
node->lastSourceLocation()),
|
||||
locationFromRange(node),
|
||||
message);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user