summaryrefslogtreecommitdiff
path: root/gui/main.cpp
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2021-03-03 02:31:06 +0100
committerkali kaneko (leap communications) <kali@leap.se>2021-03-03 03:25:54 +0100
commit3e8193f109e3d10aa0c36ef9ae22382463a07403 (patch)
tree69a61815a980300d83538dcb4a35177b9e668960 /gui/main.cpp
parent93e0d71c10a2e6dde22c404f25cfb4f675a72780 (diff)
attempt workarounds for segfault at libQt5XcbQpa
Diffstat (limited to 'gui/main.cpp')
-rw-r--r--gui/main.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/gui/main.cpp b/gui/main.cpp
index 079caa5..7636810 100644
--- a/gui/main.cpp
+++ b/gui/main.cpp
@@ -161,6 +161,8 @@ int main(int argc, char **argv) {
QJsonModel *model = new QJsonModel;
+ QString desktop = QString::fromStdString(getEnv("XDG_CURRENT_DESKTOP"));
+
/* the backend handler has slots for calling back to Go when triggered by
signals in Qml. */
ctx->setContextProperty("backend", &backend);
@@ -168,6 +170,7 @@ int main(int argc, char **argv) {
/* set the json model, load providers.json */
ctx->setContextProperty("jsonModel", model);
ctx->setContextProperty("providers", providers);
+ ctx->setContextProperty("desktop", desktop);
/* set some useful flags */
ctx->setContextProperty("systrayVisible", !hideSystray);