LSP: Drop use of QVector

One unneeded #include, and a case where a plain array suffices and
is faster and smaller.

Change-Id: I49269f645b8239019baa817e137da27a767f640b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2024-07-31 12:31:18 +02:00
parent 05fb9b82b0
commit e78da3dfee
2 changed files with 1 additions and 3 deletions

View File

@@ -16,7 +16,6 @@
#include <QRegularExpression> #include <QRegularExpression>
#include <QTextBlock> #include <QTextBlock>
#include <QTextDocument> #include <QTextDocument>
#include <QVector>
namespace LanguageServerProtocol { namespace LanguageServerProtocol {
@@ -113,7 +112,7 @@ static QHash<Utils::MimeType, QString> mimeTypeLanguageIdMap()
static QHash<Utils::MimeType, QString> hash; static QHash<Utils::MimeType, QString> hash;
if (!hash.isEmpty()) if (!hash.isEmpty())
return hash; return hash;
const QVector<QPair<QString, QString>> languageIdsForMimeTypeNames{ const QPair<QString, QString> languageIdsForMimeTypeNames[] = {
{"text/x-python", "python"}, {"text/x-python", "python"},
{"text/x-bibtex", "bibtex"}, {"text/x-bibtex", "bibtex"},
{"application/vnd.coffeescript", "coffeescript"}, {"application/vnd.coffeescript", "coffeescript"},

View File

@@ -5,7 +5,6 @@
#include <QHash> #include <QHash>
#include <QLoggingCategory> #include <QLoggingCategory>
#include <QVector>
namespace LanguageServerProtocol { namespace LanguageServerProtocol {