[education/rkward] rkward: Init (fallback) icon theme before QApplication

Thomas Friedrichsmeier null at kde.org
Tue Jun 18 21:30:08 BST 2024


Git commit a663f63f7b512a924cb54fb5f47ae37e902f3ee5 by Thomas Friedrichsmeier.
Committed on 18/06/2024 at 20:30.
Pushed by tfry into branch 'master'.

Init (fallback) icon theme before QApplication

M  +1    -1    rkward/CMakeLists.txt
M  +2    -0    rkward/main.cpp
M  +1    -1    rkward/misc/CMakeLists.txt
M  +0    -2    rkward/misc/rkstandardicons.cpp

https://invent.kde.org/education/rkward/-/commit/a663f63f7b512a924cb54fb5f47ae37e902f3ee5

diff --git a/rkward/CMakeLists.txt b/rkward/CMakeLists.txt
index 331e4e0b7..30d35e709 100644
--- a/rkward/CMakeLists.txt
+++ b/rkward/CMakeLists.txt
@@ -41,7 +41,7 @@ GET_DIRECTORY_PROPERTY(R_SHAREDLIBDIR DIRECTORY rbackend LINK_DIRECTORIES)
 LINK_DIRECTORIES(${R_SHAREDLIBDIR})
 
 ADD_LIBRARY(rkward_lib STATIC ${RKWard_Lib_Sources})
-TARGET_LINK_LIBRARIES(rkward_lib windows ${RKWARD_ADDLIBS} agents dialogs plugin settings dataeditor core scriptbackends rbackend misc KDAB::kdsingleapplication KF6::WindowSystem Qt6::Widgets KF6::XmlGui)
+TARGET_LINK_LIBRARIES(rkward_lib windows ${RKWARD_ADDLIBS} agents dialogs plugin settings dataeditor core scriptbackends rbackend misc KDAB::kdsingleapplication KF6::WindowSystem Qt6::Widgets KF6::XmlGui KF6::BreezeIcons)
 
 SET(RKWard_App_Sources
 	main.cpp
diff --git a/rkward/main.cpp b/rkward/main.cpp
index 1933b5e26..0bf8af8d8 100644
--- a/rkward/main.cpp
+++ b/rkward/main.cpp
@@ -52,6 +52,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
 #ifdef WITH_KCRASH
 #	include <KCrash>
 #endif
+#include <BreezeIcons>
 
 #include <QString>
 #include <QMutex>
@@ -145,6 +146,7 @@ int main (int argc, char *argv[]) {
 	scheme.setSyntax(QWebEngineUrlScheme::Syntax::Path);
 	scheme.setFlags(QWebEngineUrlScheme::LocalScheme|QWebEngineUrlScheme::LocalAccessAllowed);
 	QWebEngineUrlScheme::registerScheme(scheme);
+	BreezeIcons::initIcons(); // install as fallback theme. Too many issues with missing icons, otherwise
 	QApplication app(argc, argv);
 	KDSingleApplication app_singleton;
 #ifdef WITH_KCRASH
diff --git a/rkward/misc/CMakeLists.txt b/rkward/misc/CMakeLists.txt
index e87d6b6d3..a3913c188 100644
--- a/rkward/misc/CMakeLists.txt
+++ b/rkward/misc/CMakeLists.txt
@@ -37,4 +37,4 @@ SET(misc_STAT_SRCS
    )
 
 ADD_LIBRARY(misc STATIC ${misc_STAT_SRCS})
-TARGET_LINK_LIBRARIES(misc Qt6::Widgets KF6::WidgetsAddons KF6::KIOWidgets Qt6::Xml Qt6::DBus KF6::ConfigCore KF6::Parts KF6::WindowSystem KF6::TextEditor KF6::Archive KF6::I18n KF6::BreezeIcons)
+TARGET_LINK_LIBRARIES(misc Qt6::Widgets KF6::WidgetsAddons KF6::KIOWidgets Qt6::Xml Qt6::DBus KF6::ConfigCore KF6::Parts KF6::WindowSystem KF6::TextEditor KF6::Archive KF6::I18n)
diff --git a/rkward/misc/rkstandardicons.cpp b/rkward/misc/rkstandardicons.cpp
index 5037a5a71..a63fd3d23 100644
--- a/rkward/misc/rkstandardicons.cpp
+++ b/rkward/misc/rkstandardicons.cpp
@@ -8,7 +8,6 @@ SPDX-License-Identifier: GPL-2.0-or-later
 #include "rkstandardicons.h"
 
 #include <QFileInfo>
-#include <BreezeIcons>
 
 #include "../core/robject.h"
 #include "../core/robjectlist.h"
@@ -24,7 +23,6 @@ void RKStandardIcons::initIcons () {
 	RK_TRACE (APP);
 
 	RK_ASSERT (!instance);	// init only once
-	BreezeIcons::initIcons(); // install as fallback theme. Too many issues with missing icons, otherwise
 	instance = new RKStandardIcons ();
 	instance->doInitIcons ();
 }


More information about the rkward-tracker mailing list