Commit 9be7dedb authored by David Edmundson's avatar David Edmundson

Use new simpler way to disable session management in services

Test Plan: Compiles

Reviewers: #plasma, apol

Reviewed By: apol

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D28341
parent 62a7e1c4
......@@ -4,7 +4,7 @@ project(plasma-workspace)
set(PROJECT_VERSION "5.18.80")
set(PROJECT_VERSION_MAJOR 5)
set(QT_MIN_VERSION "5.12.0")
set(QT_MIN_VERSION "5.14.0")
set(KF5_MIN_VERSION "5.66.0")
set(INSTALL_SDDM_THEME TRUE)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Widgets Quick QuickWidgets Concurrent Test Network)
......
......@@ -18,7 +18,6 @@
*/
#include <QGuiApplication>
#include <QSessionManager>
#include <KWindowSystem>
......@@ -29,6 +28,7 @@ int main(int argc, char ** argv)
qputenv("QT_QPA_PLATFORM", "xcb");
QGuiApplication::setDesktopSettingsAware(false);
QCoreApplication::setAttribute(Qt::AA_DisableSessionManager);
QGuiApplication app(argc, argv);
......@@ -36,12 +36,6 @@ int main(int argc, char ** argv)
qFatal("qdbusmenuproxy is only useful XCB. Aborting");
}
auto disableSessionManagement = [](QSessionManager &sm) {
sm.setRestartHint(QSessionManager::RestartNever);
};
QObject::connect(&app, &QGuiApplication::commitDataRequest, disableSessionManagement);
QObject::connect(&app, &QGuiApplication::saveStateRequest, disableSessionManagement);
app.setQuitOnLastWindowClosed(false);
MenuProxy proxy;
......
......@@ -24,7 +24,6 @@
#include <QUrl>
#include <QDebug>
#include <QQuickWindow>
#include <QSessionManager>
#include <QDBusMessage>
#include <QDBusConnection>
......@@ -44,6 +43,7 @@ int main(int argc, char **argv)
qunsetenv("QT_DEVICE_PIXEL_RATIO");
QCommandLineParser parser;
QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling);
QCoreApplication::setAttribute(Qt::AA_DisableSessionManager);
const bool qpaVariable = qEnvironmentVariableIsSet("QT_QPA_PLATFORM");
KWorkSpace::detectPlatform(argc, argv);
......@@ -91,14 +91,6 @@ int main(int argc, char **argv)
KDBusService service(KDBusService::Unique | KDBusService::StartupOption(parser.isSet(replaceOption) ? KDBusService::Replace : 0));
QGuiApplication::setFallbackSessionManagementEnabled(false);
auto disableSessionManagement = [](QSessionManager &sm) {
sm.setRestartHint(QSessionManager::RestartNever);
};
QObject::connect(&app, &QGuiApplication::commitDataRequest, disableSessionManagement);
QObject::connect(&app, &QGuiApplication::saveStateRequest, disableSessionManagement);
View view;
auto updateVisibility = [&]() {
......
......@@ -21,7 +21,6 @@
#include <QApplication>
#include <QCommandLineParser>
#include <QQuickWindow>
#include <QSessionManager>
#include <QDebug>
#include <QProcess>
#include <QMessageBox>
......@@ -63,6 +62,7 @@ int main(int argc, char *argv[])
} else {
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
}
QCoreApplication::setAttribute(Qt::AA_DisableSessionManager);
QQuickWindow::setDefaultAlphaBuffer(true);
......@@ -139,14 +139,6 @@ int main(int argc, char *argv[])
cliOptions.process(app);
aboutData.processCommandLine(&cliOptions);
QGuiApplication::setFallbackSessionManagementEnabled(false);
auto disableSessionManagement = [](QSessionManager &sm) {
sm.setRestartHint(QSessionManager::RestartNever);
};
QObject::connect(&app, &QGuiApplication::commitDataRequest, disableSessionManagement);
QObject::connect(&app, &QGuiApplication::saveStateRequest, disableSessionManagement);
ShellCorona* corona = new ShellCorona(&app);
corona->setShell(cliOptions.value(shellPluginOption));
......
......@@ -19,7 +19,6 @@
*/
#include <QGuiApplication>
#include <QSessionManager>
#include "fdoselectionmanager.h"
......@@ -42,6 +41,7 @@ int main(int argc, char ** argv)
qputenv("QT_QPA_PLATFORM", "xcb");
QGuiApplication::setDesktopSettingsAware(false);
QCoreApplication::setAttribute(Qt::AA_DisableSessionManager);
QGuiApplication app(argc, argv);
......@@ -49,12 +49,6 @@ int main(int argc, char ** argv)
qFatal("xembed-sni-proxy is only useful XCB. Aborting");
}
auto disableSessionManagement = [](QSessionManager &sm) {
sm.setRestartHint(QSessionManager::RestartNever);
};
QObject::connect(&app, &QGuiApplication::commitDataRequest, disableSessionManagement);
QObject::connect(&app, &QGuiApplication::saveStateRequest, disableSessionManagement);
app.setQuitOnLastWindowClosed(false);
qDBusRegisterMetaType<KDbusImageStruct>();
......
Markdown is supported
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