]> cloud.milkyroute.net Git - dolphin.git/blob - src/settings/dolphin_25.04_update_statusandlocationbarssettings.cpp
GIT_SILENT Sync po/docbooks with svn
[dolphin.git] / src / settings / dolphin_25.04_update_statusandlocationbarssettings.cpp
1 /*
2 SPDX-FileCopyrightText: 2025 Akseli Lahtinen <akselmo@akselmo.dev>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7 #include <KConfigGroup>
8 #include <KSharedConfig>
9
10 int main()
11 {
12 const auto showStatusBar = QStringLiteral("ShowStatusBar");
13 auto config = KSharedConfig::openConfig(QStringLiteral("dolphinrc"));
14
15 KConfigGroup general = config->group(QStringLiteral("General"));
16 if (!general.hasKey(showStatusBar)) {
17 return EXIT_SUCCESS;
18 }
19
20 const auto value = general.readEntry(showStatusBar);
21 if (value == QStringLiteral("true")) {
22 general.writeEntry(showStatusBar, QStringLiteral("Small"));
23 } else if (value == QStringLiteral("false")) {
24 general.writeEntry(showStatusBar, QStringLiteral("Disabled"));
25 }
26
27 return general.sync() ? EXIT_SUCCESS : EXIT_FAILURE;
28 }