From kde-commits Wed Apr 06 14:53:08 2016 From: Weng Xuetian Date: Wed, 06 Apr 2016 14:53:08 +0000 To: kde-commits Subject: [kwallet] src/runtime/kwalletd: disable seession restore for kwalletd5 Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=145995439711619 Git commit c3cd7b72b3b1c2a6f13225c0d9141992e1cc024d by Weng Xuetian. Committed on 06/04/2016 at 14:49. Pushed by xuetianweng into branch 'master'. disable seession restore for kwalletd5 kwalletd5 may be started by session manager before kwallet-pam starts its own kwalletd. REVIEW: 127271 M +6 -0 src/runtime/kwalletd/main.cpp http://commits.kde.org/kwallet-framework/c3cd7b72b3b1c2a6f13225c0d9141992e1= cc024d diff --git a/src/runtime/kwalletd/main.cpp b/src/runtime/kwalletd/main.cpp index 740e670..90c60d8 100644 --- a/src/runtime/kwalletd/main.cpp +++ b/src/runtime/kwalletd/main.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -200,6 +201,11 @@ int main(int argc, char **argv) aboutdata.setProgramIconName(QStringLiteral("kwalletmanager")); = app.setQuitOnLastWindowClosed(false); + auto disableSessionManagement =3D [](QSessionManager &sm) { + sm.setRestartHint(QSessionManager::RestartNever); + }; + QObject::connect(&app, &QGuiApplication::commitDataRequest, disableSes= sionManagement); + QObject::connect(&app, &QGuiApplication::saveStateRequest, disableSess= ionManagement); = // check if kwallet is disabled if (!isWalletEnabled()) {