[education/rkward] rkward: Fix linkage in craft appimage build

Thomas Friedrichsmeier null at kde.org
Mon Jun 24 22:13:02 BST 2024


Git commit ccd6c808c37867b229836ae0ea2e6d359546cb92 by Thomas Friedrichsmeier.
Committed on 22/06/2024 at 19:41.
Pushed by tfry into branch 'master'.

Fix linkage in craft appimage build

M  +2    -2    rkward/rbackend/rkwarddevice/rkgraphicsdevice.cpp
M  +2    -2    rkward/rbackend/rkwarddevice/rkgraphicsdevice.h
M  +0    -1    rkward/rkward.cpp
M  +1    -1    rkward/windows/rkwindowcatcher.cpp
M  +0    -14   rkward/windows/rkworkplace.cpp
M  +10   -2    rkward/windows/rkworkplace.h

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

diff --git a/rkward/rbackend/rkwarddevice/rkgraphicsdevice.cpp b/rkward/rbackend/rkwarddevice/rkgraphicsdevice.cpp
index 20b61bffb..f77c8a005 100644
--- a/rkward/rbackend/rkwarddevice/rkgraphicsdevice.cpp
+++ b/rkward/rbackend/rkwarddevice/rkgraphicsdevice.cpp
@@ -1,6 +1,6 @@
 /*
-rkgraphicsdevice_backendtransmitter - This file is part of RKWard (https://rkward.kde.org). Created: Mon Mar 18 2013
-SPDX-FileCopyrightText: 2013-2021 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
+rkgraphicsdevice - This file is part of RKWard (https://rkward.kde.org). Created: Mon Mar 18 2013
+SPDX-FileCopyrightText: 2013-2024 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
 SPDX-FileContributor: The RKWard Team <rkward-devel at kde.org>
 SPDX-License-Identifier: GPL-2.0-or-later
 */
diff --git a/rkward/rbackend/rkwarddevice/rkgraphicsdevice.h b/rkward/rbackend/rkwarddevice/rkgraphicsdevice.h
index 220b38d9e..86572544e 100644
--- a/rkward/rbackend/rkwarddevice/rkgraphicsdevice.h
+++ b/rkward/rbackend/rkwarddevice/rkgraphicsdevice.h
@@ -1,6 +1,6 @@
 /*
-rkgraphicsdevice_backendtransmitter - This file is part of the RKWard project. Created: Mon Mar 18 2013
-SPDX-FileCopyrightText: 2013-2014 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
+rkgraphicsdevice - This file is part of the RKWard project. Created: Mon Mar 18 2013
+SPDX-FileCopyrightText: 2013-2024 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
 SPDX-FileContributor: The RKWard Team <rkward-devel at kde.org>
 SPDX-License-Identifier: GPL-2.0-or-later
 */
diff --git a/rkward/rkward.cpp b/rkward/rkward.cpp
index 9c06acae5..d6f911a20 100644
--- a/rkward/rkward.cpp
+++ b/rkward/rkward.cpp
@@ -103,7 +103,6 @@ void bogusCalls () {
 	new RKWorkplaceView(nullptr);
 	new RKEditObjectAgent(QStringList(), nullptr);
 	RKPrintAgent::printPostscript(QString(), false);
-	RKWorkplace::mainWorkplace()->getNamedWindow<RKMDIWindow>(QString());
 #endif
 }
 
diff --git a/rkward/windows/rkwindowcatcher.cpp b/rkward/windows/rkwindowcatcher.cpp
index 001e70592..301c671b8 100644
--- a/rkward/windows/rkwindowcatcher.cpp
+++ b/rkward/windows/rkwindowcatcher.cpp
@@ -1,6 +1,6 @@
 /*
 rwindowcatcher.cpp - This file is part of RKWard (https://rkward.kde.org). Created: Wed May 4 2005
-SPDX-FileCopyrightText: 2005-2020 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
+SPDX-FileCopyrightText: 2005-2024 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
 SPDX-FileContributor: The RKWard Team <rkward-devel at kde.org>
 SPDX-License-Identifier: GPL-2.0-or-later
 */
diff --git a/rkward/windows/rkworkplace.cpp b/rkward/windows/rkworkplace.cpp
index 6edfe2895..2add815f1 100644
--- a/rkward/windows/rkworkplace.cpp
+++ b/rkward/windows/rkworkplace.cpp
@@ -369,20 +369,6 @@ void RKWorkplace::registerNamedWindow (const QString& id, QObject* owner, QWidge
 	if (window) connect (window, &QObject::destroyed, this, &RKWorkplace::namedWindowOwnerDestroyed);
 }
 
-template<typename T> T* RKWorkplace::getNamedWindow(const QString& id) {
-	RK_TRACE (APP);
-
-	if (id.isEmpty()) return nullptr;
-
-	for (int i = 0; i < named_windows.size (); ++i) {
-		if (named_windows[i].id == id) {
-			return dynamic_cast<T*>(named_windows[i].window);
-		}
-	}
-
-	return nullptr;
-}
-
 void RKWorkplace::namedWindowDestroyed (QObject* window) {
 	RK_TRACE (APP);
 
diff --git a/rkward/windows/rkworkplace.h b/rkward/windows/rkworkplace.h
index 77e9c019b..ae043188d 100644
--- a/rkward/windows/rkworkplace.h
+++ b/rkward/windows/rkworkplace.h
@@ -1,6 +1,6 @@
 /*
 rkworkplace - This file is part of the RKWard project. Created: Thu Sep 21 2006
-SPDX-FileCopyrightText: 2006-2022 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
+SPDX-FileCopyrightText: 2006-2024 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
 SPDX-FileContributor: The RKWard Team <rkward-devel at kde.org>
 SPDX-License-Identifier: GPL-2.0-or-later
 */
@@ -204,7 +204,15 @@ Has no effect, if RKSettingsModuleGeneral::workplaceSaveMode () != RKSettingsMod
 /** Register a named area where to place MDI windows. For directing preview windows to a specific location. */
 	void registerNamedWindow (const QString& id, QObject *owner, QWidget* parent, RKMDIWindow *window=nullptr);
 /** Return the window in the specified named area (can be 0). */
-	template<typename T=RKMDIWindow> T* getNamedWindow (const QString& id);
+	template<typename T=RKMDIWindow> T* getNamedWindow (const QString& id) {
+		if (id.isEmpty()) return nullptr;
+		for (int i = 0; i < named_windows.size (); ++i) {
+			if (named_windows[i].id == id) {
+				return dynamic_cast<T*>(named_windows[i].window);
+			}
+		}
+		return nullptr;
+	}
 /** Make the next window to be created appear in a specific location (can be a named window). 
  *  @note It is the caller's responsibility to clear the override (by calling setWindowPlacementOverride ()) after the window in question has been created. */
 	void setWindowPlacementOverrides (const QString& placement=QString (), const QString& name=QString (), const QString& style=QString ());



More information about the rkward-tracker mailing list