]>
cloud.milkyroute.net Git - dolphin.git/blob - src/settings/dolphin_25.04_update_statusandlocationbarssettings.cpp
2 SPDX-FileCopyrightText: 2025 Akseli Lahtinen <akselmo@akselmo.dev>
4 SPDX-License-Identifier: GPL-2.0-or-later
7 #include <KConfigGroup>
8 #include <KSharedConfig>
12 const auto showStatusBar
= QStringLiteral("ShowStatusBar");
13 auto config
= KSharedConfig::openConfig(QStringLiteral("dolphinrc"));
15 KConfigGroup general
= config
->group(QStringLiteral("General"));
16 if (!general
.hasKey(showStatusBar
)) {
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"));
27 return general
.sync() ? EXIT_SUCCESS
: EXIT_FAILURE
;