Commit b30e095f authored by Christoph Cullmann's avatar Christoph Cullmann 🍨
Browse files

use correct project info for the document we work on

BUG: 459579
parent 89111ee1
Pipeline #236758 passed with stage
in 7 minutes and 22 seconds
......@@ -11,6 +11,7 @@
#include "lspclientservermanager.h"
#include "hostprocess.h"
#include "ktexteditor_utils.h"
#include "lspclient_debug.h"
#include <KLocalizedString>
......@@ -559,11 +560,9 @@ private:
return nullptr;
}
// use mainwindow of specified view
QObject *projectView = projectPluginView(view->mainWindow());
// preserve raw QString value so it can be used and tested that way below
const auto projectBase = projectView ? projectView->property("projectBaseDir").toString() : QString();
const auto &projectMap = projectView ? projectView->property("projectMap").toMap() : QVariantMap();
// get project plugin infos if available
const auto projectBase = Utils::projectBaseDirForDocument(document);
const auto projectMap = Utils::projectMapForDocument(document);
// merge with project specific
auto projectConfig = QJsonDocument::fromVariant(projectMap).object().value(QStringLiteral("lspclient")).toObject();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment