forked from qt-creator/qt-creator
Fix build against Qt6 with GCC 7 / Linux
Add some missing includes for otherwise incomplete types. Make LanguageServerProtocol::JsonObject's iterators and end() methods public. Otherwise QMetaType fails for LanguageServerProtocol::ServerCapabilities which is used in a signal from LanguageClient. Task-number: QTCREATORBUG-24098 Change-Id: Id7f8a4146afb927a8589fadaefe42f7fbca45dd3 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -39,6 +39,9 @@ class LANGUAGESERVERPROTOCOL_EXPORT JsonObject
|
|||||||
Q_DECLARE_TR_FUNCTIONS(LanguageServerProtocol::JsonObject)
|
Q_DECLARE_TR_FUNCTIONS(LanguageServerProtocol::JsonObject)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
using iterator = QJsonObject::iterator;
|
||||||
|
using const_iterator = QJsonObject::const_iterator;
|
||||||
|
|
||||||
JsonObject() = default;
|
JsonObject() = default;
|
||||||
|
|
||||||
explicit JsonObject(const QJsonObject &object) : m_jsonObject(object) { }
|
explicit JsonObject(const QJsonObject &object) : m_jsonObject(object) { }
|
||||||
@@ -60,10 +63,10 @@ public:
|
|||||||
|
|
||||||
virtual bool isValid(ErrorHierarchy * /*errorHierarchy*/) const { return true; }
|
virtual bool isValid(ErrorHierarchy * /*errorHierarchy*/) const { return true; }
|
||||||
|
|
||||||
protected:
|
iterator end() { return m_jsonObject.end(); }
|
||||||
using iterator = QJsonObject::iterator;
|
const_iterator end() const { return m_jsonObject.end(); }
|
||||||
using const_iterator = QJsonObject::const_iterator;
|
|
||||||
|
|
||||||
|
protected:
|
||||||
iterator insert(const QString &key, const JsonObject &value);
|
iterator insert(const QString &key, const JsonObject &value);
|
||||||
iterator insert(const QString &key, const QJsonValue &value);
|
iterator insert(const QString &key, const QJsonValue &value);
|
||||||
|
|
||||||
@@ -72,8 +75,6 @@ protected:
|
|||||||
bool contains(const QString &key) const { return m_jsonObject.contains(key); }
|
bool contains(const QString &key) const { return m_jsonObject.contains(key); }
|
||||||
iterator find(const QString &key) { return m_jsonObject.find(key); }
|
iterator find(const QString &key) { return m_jsonObject.find(key); }
|
||||||
const_iterator find(const QString &key) const { return m_jsonObject.find(key); }
|
const_iterator find(const QString &key) const { return m_jsonObject.find(key); }
|
||||||
iterator end() { return m_jsonObject.end(); }
|
|
||||||
const_iterator end() const { return m_jsonObject.end(); }
|
|
||||||
void remove(const QString &key) { m_jsonObject.remove(key); }
|
void remove(const QString &key) { m_jsonObject.remove(key); }
|
||||||
QStringList keys() const { return m_jsonObject.keys(); }
|
QStringList keys() const { return m_jsonObject.keys(); }
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,8 @@
|
|||||||
#include "searchsymbols.h"
|
#include "searchsymbols.h"
|
||||||
|
|
||||||
#include <coreplugin/find/ifindfilter.h>
|
#include <coreplugin/find/ifindfilter.h>
|
||||||
|
#include <coreplugin/find/searchresultitem.h>
|
||||||
|
#include <coreplugin/find/searchresultwindow.h>
|
||||||
|
|
||||||
#include <QFutureWatcher>
|
#include <QFutureWatcher>
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
|
|||||||
Reference in New Issue
Block a user