QmlJS: Clean up qmljslink.{h|cpp}

Fix linter warnings, apply coding style, avoid foreach, drop dead code.

Change-Id: Ib98488725262c1bd3a04de0db0397a9129e21901
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Ulf Hermann
2019-10-22 17:54:14 +02:00
parent 9760d02b77
commit 3b65c0a5d5
2 changed files with 142 additions and 118 deletions

View File

@@ -43,10 +43,13 @@ class QMLJS_EXPORT Link
Q_DECLARE_TR_FUNCTIONS(QmlJS::Link)
public:
Link(Link &&) = delete;
Link &operator=(Link &&) = delete;
Link(const Snapshot &snapshot, const ViewerContext &vContext, const LibraryInfo &builtins);
// Link all documents in snapshot, collecting all diagnostic messages (if messages != 0)
ContextPtr operator()(QHash<QString, QList<DiagnosticMessage> > *messages = nullptr);
ContextPtr operator()(QHash<QString, QList<DiagnosticMessage>> *messages = nullptr);
// Link all documents in snapshot, appending the diagnostic messages
// for 'doc' in 'messages'