[utilities/kalm] src: Use KirigamiAppDefaults
Plata Hill <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 6bfe8f2da1caa6151a48e54306898f4e53fe8b1d by Plata Hill.
Committed on 26/07/2026 at 11:07.
Pushed by plata into branch 'master'.
Use KirigamiAppDefaults
M +1 -1 src/CMakeLists.txt
M +3 -4 src/main.cpp
https://invent.kde.org/utilities/kalm/-/commit/6bfe8f2da1caa6151a48e54306898f4e53fe8b1d
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 765f05f..9eb9e02 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -28,7 +28,7 @@ ecm_add_qml_module(kalm URI org.kde.kalm
kconfig_add_kcfg_files(kalm KalmSettings.kcfgc GENERATE_MOC)
target_include_directories(kalm PRIVATE ${CMAKE_BINARY_DIR})
-target_link_libraries(kalm PUBLIC Qt::Core Qt::Qml Qt::Quick Qt::QuickControls2 KF${QT_MAJOR_VERSION}::CoreAddons KF${QT_MAJOR_VERSION}::ConfigGui KF${QT_MAJOR_VERSION}::I18n KF${QT_MAJOR_VERSION}::I18nQml)
+target_link_libraries(kalm PUBLIC Qt::Core Qt::Qml Qt::Quick Qt::QuickControls2 KF${QT_MAJOR_VERSION}::CoreAddons KF${QT_MAJOR_VERSION}::ConfigGui KF${QT_MAJOR_VERSION}::I18n KF${QT_MAJOR_VERSION}::I18nQml KirigamiApp)
if(ANDROID)
target_link_libraries(kalm PUBLIC KF${QT_MAJOR_VERSION}::Kirigami2)
diff --git a/src/main.cpp b/src/main.cpp
index 4b55f35..7c4460f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -12,6 +12,7 @@
#endif
#include <KLocalizedQmlContext>
#include <KLocalizedString>
+#include <KirigamiAddons/App/KirigamiAppDefaults>
#include <QCommandLineParser>
#include <QIcon>
@@ -35,12 +36,8 @@ int main(int argc, char *argv[])
{
#ifdef Q_OS_ANDROID
QGuiApplication app(argc, argv);
- QQuickStyle::setStyle(QStringLiteral("org.kde.breeze"));
#else
QApplication app(argc, argv);
- if (qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE")) {
- QQuickStyle::setStyle(QStringLiteral("org.kde.desktop"));
- }
#endif
#if HAVE_KCRASH
@@ -73,6 +70,8 @@ int main(int argc, char *argv[])
parser.process(app);
about.processCommandLine(&parser);
+ KirigamiAppDefaults::apply(&app);
+
// setup engine
QQmlApplicationEngine engine;
KLocalization::setupLocalizedContext(&engine);