aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlls/qlanguageserver.cpp3
-rw-r--r--tools/qmlls/qlanguageserver.h3
2 files changed, 2 insertions, 4 deletions
diff --git a/tools/qmlls/qlanguageserver.cpp b/tools/qmlls/qlanguageserver.cpp
index e6408f6ad1..7ebc4faad1 100644
--- a/tools/qmlls/qlanguageserver.cpp
+++ b/tools/qmlls/qlanguageserver.cpp
@@ -65,8 +65,6 @@ QLanguageServer::QLanguageServer(const QJsonRpcTransport::DataHandler &h, QObjec
d->notifySignals.registerHandlers(&d->protocol);
}
-QLanguageServer::~QLanguageServer() { }
-
QLanguageServerProtocol *QLanguageServer::protocol()
{
Q_D(QLanguageServer);
@@ -167,6 +165,7 @@ void QLanguageServer::registerMethods(QJsonRpc::TypedRpc &typedRpc)
QJsonValue id = doc.object()[u"id"];
{
QMutexLocker l(&d->mutex);
+ // the normal case is d->runStatus == RunStatus::DidInitialize
if (d->runStatus != RunStatus::DidInitialize) {
if (d->runStatus == RunStatus::DidSetup && !doc.isNull()
&& doc.object()[u"method"].toString()
diff --git a/tools/qmlls/qlanguageserver.h b/tools/qmlls/qlanguageserver.h
index cf4babba00..721eb5478f 100644
--- a/tools/qmlls/qlanguageserver.h
+++ b/tools/qmlls/qlanguageserver.h
@@ -68,7 +68,6 @@ class QLanguageServer : public QObject
Q_PROPERTY(bool isInitialized READ isInitialized)
public:
QLanguageServer(const QJsonRpcTransport::DataHandler &h, QObject *parent = nullptr);
- ~QLanguageServer();
enum class RunStatus {
NotSetup,
SettingUp,
@@ -79,6 +78,7 @@ public:
Stopping,
Stopped
};
+ Q_ENUM(RunStatus)
QLanguageServerProtocol *protocol();
void finishSetup();
@@ -108,7 +108,6 @@ signals:
private:
void registerMethods(QJsonRpc::TypedRpc &typedRpc);
void executeShutdown();
- Q_DISABLE_COPY(QLanguageServer)
Q_DECLARE_PRIVATE(QLanguageServer)
};