[education/rkward] rkward/misc: Fix initial dir for plugin file dialogs

Thomas Friedrichsmeier null at kde.org
Thu Apr 28 21:17:40 BST 2022


Git commit 3de1389ffd5ee23c77bea89bf19b38403e059ffb by Thomas Friedrichsmeier.
Committed on 28/04/2022 at 20:17.
Pushed by tfry into branch 'master'.

Fix initial dir for plugin file dialogs

M  +1    -1    rkward/misc/getfilenamewidget.cpp

https://invent.kde.org/education/rkward/commit/3de1389ffd5ee23c77bea89bf19b38403e059ffb

diff --git a/rkward/misc/getfilenamewidget.cpp b/rkward/misc/getfilenamewidget.cpp
index 838dcfad..c376574b 100644
--- a/rkward/misc/getfilenamewidget.cpp
+++ b/rkward/misc/getfilenamewidget.cpp
@@ -56,7 +56,7 @@ GetFileNameWidget::GetFileNameWidget (QWidget *parent, FileType mode, bool only_
 		storage_key = initial.section ('>', 0, 0).mid (1);
 		append = initial.section ('>', 1);
 	}
-	QUrl initial_url = RKRecentUrls::mostRecentUrl(storage_key);  // storage_key == QString () in the default case is intended
+	QUrl initial_url = RKRecentUrls::mostRecentUrl(storage_key).adjusted(QUrl::RemoveFilename);  // storage_key == QString () in the default case is intended
 	if (!append.isEmpty ()) {
 		if (initial_url.isLocalFile ()) {
 			initial_url = QUrl::fromUserInput (append, initial_url.toLocalFile (), QUrl::AssumeLocalFile);


More information about the rkward-tracker mailing list