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
|
#pragma once
|
||||||
|
|
||||||
|
#include <QtGlobal>
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0)
|
||||||
#include <QLatin1StringView>
|
#include <QLatin1StringView>
|
||||||
|
#else
|
||||||
|
#include <QLatin1String>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace LanguageServerProtocol {
|
namespace LanguageServerProtocol {
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0)
|
||||||
using Key = QLatin1StringView;
|
using Key = QLatin1StringView;
|
||||||
|
#else
|
||||||
|
using Key = QLatin1String;
|
||||||
|
#endif
|
||||||
|
|
||||||
constexpr Key actionsKey{"actions"};
|
constexpr Key actionsKey{"actions"};
|
||||||
constexpr Key activeParameterKey{"activeParameter"};
|
constexpr Key activeParameterKey{"activeParameter"};
|
||||||
|
@@ -43,7 +43,11 @@ public:
|
|||||||
const_iterator end() const { return m_jsonObject.end(); }
|
const_iterator end() const { return m_jsonObject.end(); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0)
|
||||||
using Key = QLatin1StringView;
|
using Key = QLatin1StringView;
|
||||||
|
#else
|
||||||
|
using Key = QLatin1String;
|
||||||
|
#endif
|
||||||
iterator insert(const Key key, const JsonObject &value);
|
iterator insert(const Key key, const JsonObject &value);
|
||||||
iterator insert(const Key key, const QJsonValue &value);
|
iterator insert(const Key key, const QJsonValue &value);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user