[education/rkward] rkward: Set window icon

Balló György null at kde.org
Mon Mar 3 09:58:33 GMT 2025


Git commit e5ec35f340c9a95aead8ed4db23bb331e451c77c by Balló György.
Committed on 25/02/2025 at 09:28.
Pushed by tfry into branch 'master'.

Set window icon

This is commonly used by desktop environments on Xorg.

M  +4    -0    rkward/main.cpp
M  +0    -1    rkward/rkward.cpp

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

diff --git a/rkward/main.cpp b/rkward/main.cpp
index 71e716159..6986194af 100644
--- a/rkward/main.cpp
+++ b/rkward/main.cpp
@@ -74,6 +74,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
 #include "misc/rkcommonfunctions.h"
 #include "kdsingleapplication.h"
 #include "misc/rkcommandlineargs.h"
+#include "misc/rkstandardicons.h"
 
 #ifdef Q_OS_WIN
 	// these are needed for the exit hack.
@@ -195,6 +196,9 @@ int main (int argc, char *argv[]) {
 	aboutData.addCredit (i18n ("Many more people on rkward-devel at kde.org"), i18n ("Sorry, if we forgot to list you. Please contact us to get added"));
 	aboutData.setOtherText(QString("<p><b>%1</b></p><ul><li><a href=\"https://www.jstatsoft.org/article/view/v049i09\">%2</a></li><li>Friedrichsmeier, T. & the RKWard Team (%3). RKWard: %4. Version %5. %6</li></ul>").arg(i18n("How to cite:"), i18n("Peer-reviewed article in the Journal of Statistical Software"), aboutData.copyrightStatement().right(4), aboutData.shortDescription(), aboutData.version(), aboutData.homepage()));
 	KAboutData::setApplicationData (aboutData);
+
+	RKStandardIcons::initIcons ();
+	QApplication::setWindowIcon(RKStandardIcons::getIcon(RKStandardIcons::RKWardIcon));
 #ifdef WITH_KCRASH
 	KCrash::setDrKonqiEnabled(true);
 	KCrash::initialize();
diff --git a/rkward/rkward.cpp b/rkward/rkward.cpp
index 6a649e721..d6fea299b 100644
--- a/rkward/rkward.cpp
+++ b/rkward/rkward.cpp
@@ -130,7 +130,6 @@ RKWardMainWindow::RKWardMainWindow() : KParts::MainWindow() {
 
 	///////////////////////////////////////////////////////////////////
 	// call inits to invoke all other construction parts
-	RKStandardIcons::initIcons ();
 	initActions();
 
 	new RKWorkplace (this);



More information about the rkward-tracker mailing list