forked from qt-creator/qt-creator
LanguageClient: Improve use of Client::m_documentsToUpdate
In particular, calling keys() and then take() for all the keys is wasteful (and obscures what's going on). Change-Id: Ic66803cf3579a39c23c32f1fc65e2c9399dcc583 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -62,6 +62,8 @@
|
||||
#include <QJsonDocument>
|
||||
#include <QTextCursor>
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
namespace Core { class IDocument; }
|
||||
namespace ProjectExplorer { class Project; }
|
||||
namespace TextEditor
|
||||
@@ -252,7 +254,7 @@ private:
|
||||
QMap<TextEditor::TextDocument *, QString> m_openedDocument;
|
||||
QSet<TextEditor::TextDocument *> m_postponedDocuments;
|
||||
QMap<Utils::FilePath, int> m_documentVersions;
|
||||
QMap<TextEditor::TextDocument *,
|
||||
std::unordered_map<TextEditor::TextDocument *,
|
||||
QList<LanguageServerProtocol::DidChangeTextDocumentParams::TextDocumentContentChangeEvent>>
|
||||
m_documentsToUpdate;
|
||||
QMap<TextEditor::TextEditorWidget *, QTimer *> m_documentHighlightsTimer;
|
||||
|
||||
Reference in New Issue
Block a user