[education/rkward] rkward: Simplify
Thomas Friedrichsmeier
null at kde.org
Fri Jun 3 15:23:04 BST 2022
Git commit c7dbe80327403f893308caab31dfb814a3bdbd43 by Thomas Friedrichsmeier.
Committed on 03/06/2022 at 14:22.
Pushed by tfry into branch 'master'.
Simplify
M +0 -2 rkward/rkward.cpp
M +2 -0 rkward/windows/rkworkplace.cpp
M +1 -1 rkward/windows/rkworkplace.h
https://invent.kde.org/education/rkward/commit/c7dbe80327403f893308caab31dfb814a3bdbd43
diff --git a/rkward/rkward.cpp b/rkward/rkward.cpp
index df345ce8..050d75f4 100644
--- a/rkward/rkward.cpp
+++ b/rkward/rkward.cpp
@@ -19,7 +19,6 @@ SPDX-License-Identifier: GPL-2.0-or-later
#include <QHBoxLayout>
#include <QIcon>
#include <QComboBox>
-#include <QDesktopServices>
// include files for KDE
#include <kmessagebox.h>
@@ -129,7 +128,6 @@ RKWardMainWindow::RKWardMainWindow () : KParts::MainWindow ((QWidget *)0, (Qt::W
initActions();
new RKWorkplace (this);
- QDesktopServices::setUrlHandler("rkward", RKWorkplace::mainWorkplace(), "openRKWardUrl");
RKWorkplace::mainWorkplace ()->initActions (actionCollection ());
setCentralWidget (RKWorkplace::mainWorkplace ());
connect (RKWorkplace::mainWorkplace ()->view (), &RKWorkplaceView::captionChanged, this, static_cast<void (RKWardMainWindow::*)(const QString&)>(&RKWardMainWindow::setCaption));
diff --git a/rkward/windows/rkworkplace.cpp b/rkward/windows/rkworkplace.cpp
index 611fce1c..f9117906 100644
--- a/rkward/windows/rkworkplace.cpp
+++ b/rkward/windows/rkworkplace.cpp
@@ -24,6 +24,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QStatusBar>
+#include <QDesktopServices>
#include "detachedwindowcontainer.h"
#include "rkcommandeditorwindow.h"
@@ -60,6 +61,7 @@ RKWorkplace::RKWorkplace (QWidget *parent) : QWidget (parent) {
RK_ASSERT (main_workplace == 0);
main_workplace = this;
+ QDesktopServices::setUrlHandler("rkward", RKWorkplace::mainWorkplace(), "openRKWardUrl");
_workspace_config = 0;
window_placement_override = RKMDIWindow::AnyWindowState;
diff --git a/rkward/windows/rkworkplace.h b/rkward/windows/rkworkplace.h
index f901d7f7..1cee2574 100644
--- a/rkward/windows/rkworkplace.h
+++ b/rkward/windows/rkworkplace.h
@@ -224,7 +224,7 @@ public slots:
/** When windows are attached to the workplace, their QObject::destroyed () signal is connected to this slot. Thereby deleted objects are removed from the workplace automatically */
void removeWindow (QObject *window);
void saveSettings ();
-/** Proxy for QDesktopServices::setUrlHandler(), set from RKWardMainWindow(). Simply calls RKHTMLWindow::handleRKWardUrl(). */
+/** Proxy for QDesktopServices::setUrlHandler(), set in c'tor. Simply calls RKHTMLWindow::handleRKWardUrl(). */
void openRKWardUrl(const QUrl& url);
private slots:
void namedWindowDestroyed (QObject *);
More information about the rkward-tracker
mailing list