diff options
| author | Felix Ernst <[email protected]> | 2025-04-15 23:06:26 +0200 |
|---|---|---|
| committer | Felix Ernst <[email protected]> | 2025-04-16 13:27:41 +0000 |
| commit | c0bf226aa1cc02c9bffff1ec05e07a255d8d2f6e (patch) | |
| tree | 7b213acb67627e040e40ecc3c33128aa97fcfff5 /src/dolphinmainwindow.cpp | |
| parent | ee9ebf2b17724a161ccd4dccab0504f1082010b7 (diff) | |
Fix session restore
Since https://commits.kde.org/kxmlgui/8c9fb02a1d37672b26a03a9dd9e8675743deb269
KXmlGui only triggers a session restore for a window when the
session config contains a "NumberOfWindows" key with a value >= 1.
This commit adds such a key to the Dolphin session config, which
fixes the Dolphin main window restore for KXmlGui versions
containing that commit.
BUG: 502770
Diffstat (limited to 'src/dolphinmainwindow.cpp')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 106f0e44b..67db2c5e9 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -760,6 +760,8 @@ void DolphinMainWindow::slotSaveSession() KConfig *config = KConfigGui::sessionConfig(); saveGlobalProperties(config); savePropertiesInternal(config, 1); + KConfigGroup group = config->group(QStringLiteral("Number")); + group.writeEntry("NumberOfWindows", 1); // Makes session restore aware that there is a window to restore. auto future = QtConcurrent::run([config]() { config->sync(); |
