[education/rkward/kf5] rkward/windows: Port away from kio/jobclasses
Thomas Friedrichsmeier
null at kde.org
Wed Apr 10 16:12:08 BST 2024
Git commit 52345cbbc9e4cdc4e1da342c60d24f0806baa5f6 by Thomas Friedrichsmeier, on behalf of Carl Schwan.
Committed on 01/04/2024 at 11:45.
Pushed by tfry into branch 'kf5'.
Port away from kio/jobclasses
M +1 -5 rkward/windows/rkhtmlwindow.cpp
M +5 -2 rkward/windows/rkhtmlwindow.h
M +1 -0 rkward/windows/rkworkplaceview.cpp
https://invent.kde.org/education/rkward/-/commit/52345cbbc9e4cdc4e1da342c60d24f0806baa5f6
diff --git a/rkward/windows/rkhtmlwindow.cpp b/rkward/windows/rkhtmlwindow.cpp
index 677e036de..4124c509c 100644
--- a/rkward/windows/rkhtmlwindow.cpp
+++ b/rkward/windows/rkhtmlwindow.cpp
@@ -10,7 +10,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
#include <KMessageBox>
#include <kactioncollection.h>
#include <kdirwatch.h>
-#include <kio/job.h>
+#include <KIO/StoredTransferJob>
#include <kservice.h>
#include <kcodecaction.h>
#include <KColorScheme>
@@ -616,11 +616,7 @@ bool RKHTMLWindow::openURL (const QUrl &url) {
QString host = url.host ();
if ((host == "127.0.0.1") || (host == "localhost") || host == QHostInfo::localHostName ()) {
KIO::TransferJob *job = KIO::get (url, KIO::Reload);
-#if KIO_VERSION < QT_VERSION_CHECK(5,78,0)
- connect (job, static_cast<void (KIO::TransferJob::*)(KIO::Job*, const QString&)>(&KIO::TransferJob::mimetype), this, &RKHTMLWindow::mimeTypeDetermined);
-#else
connect (job, &KIO::TransferJob::mimeTypeFound, this, &RKHTMLWindow::mimeTypeDetermined);
-#endif
// WORKAROUND. See slot.
connect (job, &KIO::TransferJob::result, this, &RKHTMLWindow::mimeTypeJobFail);
return true;
diff --git a/rkward/windows/rkhtmlwindow.h b/rkward/windows/rkhtmlwindow.h
index 6c310fd03..2512ee66d 100644
--- a/rkward/windows/rkhtmlwindow.h
+++ b/rkward/windows/rkhtmlwindow.h
@@ -9,15 +9,18 @@ SPDX-License-Identifier: GPL-2.0-or-later
#define RKHTMLWINDOW_H
#include <QUrl>
-#include <kparts/part.h>
-#include <kio/jobclasses.h>
+#include <KParts/Part>
#include <QDomElement>
#include <QNetworkRequest>
#include "../windows/rkmdiwindow.h"
+namespace KIO {
+class Job;
+}
class KActionCollection;
+class KJob;
class KRecentFilesAction;
class QAction;
class RKComponentHandle;
diff --git a/rkward/windows/rkworkplaceview.cpp b/rkward/windows/rkworkplaceview.cpp
index 0989cd9ea..3960d7462 100644
--- a/rkward/windows/rkworkplaceview.cpp
+++ b/rkward/windows/rkworkplaceview.cpp
@@ -30,6 +30,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
RKWorkplaceViewPane::RKWorkplaceViewPane (RKWorkplaceView* parent) : QTabWidget () {
RK_TRACE (APP);
+ setDocumentMode(true);
workplace_view = parent;
setTabsClosable (true);
More information about the rkward-tracker
mailing list