summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@qt.io>2021-06-22 07:02:50 +0200
committerDavid Schulz <david.schulz@qt.io>2021-06-23 05:17:42 +0000
commitddf323b136019d2e2f3a8d418be68849425d5d30 (patch)
tree875311a85ee5b1658c1eea81caf6935af2bfbb4b /src
parenta72494182bb571346a86342a4631fd546d810576 (diff)
downloadqt-creator-ddf323b136019d2e2f3a8d418be68849425d5d30.tar.gz
LanguageClient: remove unused document check
Amends 439bb9c4ae0e5f20b8ba88dad2b1e570e8c07af9 Change-Id: I783b5f099ffdce2a714f1007e7cc50cda6e211a0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/languageclient/languageclientutils.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/plugins/languageclient/languageclientutils.cpp b/src/plugins/languageclient/languageclientutils.cpp
index d05c2b9ded..437c00fed2 100644
--- a/src/plugins/languageclient/languageclientutils.cpp
+++ b/src/plugins/languageclient/languageclientutils.cpp
@@ -85,11 +85,9 @@ bool applyTextDocumentEdit(const Client *client, const TextDocumentEdit &edit)
return true;
const DocumentUri &uri = edit.textDocument().uri();
const FilePath &filePath = uri.toFilePath();
- if (TextDocument* doc = TextDocument::textDocumentForFilePath(filePath)) {
- LanguageClientValue<int> version = edit.textDocument().version();
- if (!version.isNull() && version.value(0) < client->documentVersion(filePath))
- return false;
- }
+ LanguageClientValue<int> version = edit.textDocument().version();
+ if (!version.isNull() && version.value(0) < client->documentVersion(filePath))
+ return false;
return applyTextEdits(uri, edits);
}