QmlJS: Add semantic errors to task window.

Task-number: QTCREATORBUG-4103
Reviewed-by: Leandro Melo
This commit is contained in:
Christian Kamm
2011-04-21 11:09:29 +02:00
parent e21311132b
commit c504d28eb5
11 changed files with 203 additions and 51 deletions

View File

@@ -54,12 +54,16 @@ class QMLJS_EXPORT Link
Q_DECLARE_TR_FUNCTIONS(QmlJS::Link)
public:
// Link all documents in snapshot
Link(Interpreter::Context *context, const Document::Ptr &doc, const Snapshot &snapshot,
const QStringList &importPaths);
~Link();
// Link all documents in snapshot, collecting all diagnostic messages
Link(Interpreter::Context *context, const Snapshot &snapshot,
const QStringList &importPaths, QHash<QString, QList<DiagnosticMessage> > *messages = 0);
QList<DiagnosticMessage> diagnosticMessages() const;
// Link all documents in snapshot, appending the diagnostic messages
// for 'doc' in 'messages'
Link(Interpreter::Context *context, const Snapshot &snapshot,
const QStringList &importPaths, const Document::Ptr &doc, QList<DiagnosticMessage> *messages);
~Link();
private:
Interpreter::Engine *engine();
@@ -87,6 +91,7 @@ private:
void error(const Document::Ptr &doc, const AST::SourceLocation &loc, const QString &message);
void warning(const Document::Ptr &doc, const AST::SourceLocation &loc, const QString &message);
void appendDiagnostic(const Document::Ptr &doc, const DiagnosticMessage &message);
private:
QScopedPointer<LinkPrivate> d_ptr;