forked from qt-creator/qt-creator
LSP: Fix building with Qt less than 6.4
Change-Id: I25f8be3a256328443dd42d72d05ce5b6b717bded Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -3,11 +3,21 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0)
|
||||
#include <QLatin1StringView>
|
||||
#else
|
||||
#include <QLatin1String>
|
||||
#endif
|
||||
|
||||
namespace LanguageServerProtocol {
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0)
|
||||
using Key = QLatin1StringView;
|
||||
#else
|
||||
using Key = QLatin1String;
|
||||
#endif
|
||||
|
||||
constexpr Key actionsKey{"actions"};
|
||||
constexpr Key activeParameterKey{"activeParameter"};
|
||||
|
@@ -43,7 +43,11 @@ public:
|
||||
const_iterator end() const { return m_jsonObject.end(); }
|
||||
|
||||
protected:
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0)
|
||||
using Key = QLatin1StringView;
|
||||
#else
|
||||
using Key = QLatin1String;
|
||||
#endif
|
||||
iterator insert(const Key key, const JsonObject &value);
|
||||
iterator insert(const Key key, const QJsonValue &value);
|
||||
|
||||
|
Reference in New Issue
Block a user