[education/rkward] rkward/windows: Fix compilation

Thomas Friedrichsmeier null at kde.org
Mon May 23 21:38:23 BST 2022


Git commit bf3f1767cae2333396d17a0b3d73fa4ff221c9b6 by Thomas Friedrichsmeier.
Committed on 23/05/2022 at 20:38.
Pushed by tfry into branch 'master'.

Fix compilation

M  +3    -3    rkward/windows/rkhtmlwindow.cpp

https://invent.kde.org/education/rkward/commit/bf3f1767cae2333396d17a0b3d73fa4ff221c9b6

diff --git a/rkward/windows/rkhtmlwindow.cpp b/rkward/windows/rkhtmlwindow.cpp
index 8bd6b755..59a5a17b 100644
--- a/rkward/windows/rkhtmlwindow.cpp
+++ b/rkward/windows/rkhtmlwindow.cpp
@@ -364,7 +364,7 @@ RKHTMLWindow::RKHTMLWindow (QWidget *parent, WindowMode mode) : RKMDIWindow (par
 	connect (page->profile (), &QWebEngineProfile::downloadRequested, this, [this](QWebEngineDownloadItem* item) {
 		QString defpath;
 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
-		QString defpath = QDir(item->downloadDirectory()).absoluteFilePath(downloadFileName());
+		defpath = QDir(item->downloadDirectory()).absoluteFilePath(item->downloadFileName());
 #else
 		defpath = item->path();
 #endif
@@ -372,8 +372,8 @@ RKHTMLWindow::RKHTMLWindow (QWidget *parent, WindowMode mode) : RKMDIWindow (par
 		if (path.isEmpty()) return;
 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
 		QFileInfo fi(path);
-		item->setDownloadDirectory(fi.absoluteDir());
-		item->setDownloadFileName(fi.filename());
+		item->setDownloadDirectory(fi.absolutePath());
+		item->setDownloadFileName(fi.fileName());
 #else
 		item->setPath(path);
 #endif


More information about the rkward-tracker mailing list