Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2021-11-17 13:17:58 +0300
committerHannah von Reth <vonreth@kde.org>2021-11-17 16:50:24 +0300
commit36311b00be41b1edbe46791f1c44d11f8584c4f8 (patch)
tree13093b82f6a3a83b07e8cbc52f6d8acbbb58f9e4 /src/gui/settingsdialog.cpp
parent551402079a6351e1777d78be79f409e7441990d2 (diff)
Create our own message loop to receive WM_ENDSESSION
This ensures we receive the message even if no window is shown
Diffstat (limited to 'src/gui/settingsdialog.cpp')
-rw-r--r--src/gui/settingsdialog.cpp17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp
index 1b72e2c18..01ebffc9b 100644
--- a/src/gui/settingsdialog.cpp
+++ b/src/gui/settingsdialog.cpp
@@ -326,23 +326,6 @@ void SettingsDialog::setVisible(bool visible)
QMainWindow::setVisible(visible);
}
-#if defined(Q_OS_WIN) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
-
-bool SettingsDialog::nativeEvent(const QByteArray &eventType, void *message, long *result)
-{
- auto msg = reinterpret_cast<MSG *>(message);
- // https://github.com/owncloud/client/issues/8979
- // Qt5 has a bug that Windows already get closed on WM_QUERYENDSESSION
- // so they never receive WM_ENDSESSION
- // Capture the event and go down in style
- if (msg->message == WM_QUERYENDSESSION || msg->message == WM_ENDSESSION) {
- qCInfo(lcApplication) << "Shutting down" << *msg;
- QTimer::singleShot(0, ocApp(), Application::quit);
- }
- return false;
-}
-#endif
-
void SettingsDialog::slotSwitchPage(QAction *action)
{
_ui->stack->setCurrentWidget(_actionGroupWidgets.value(action));