[rkward/frameworks] rkward: On startup, change working directory in both frontend and backend, explicitly (if applicable).

Thomas Friedrichsmeier null at kde.org
Fri Jun 16 10:59:47 UTC 2017


Git commit 056a3a9f0ee82d4063343f83bb51c4b7a74878a8 by Thomas Friedrichsmeier.
Committed on 16/06/2017 at 10:59.
Pushed by tfry into branch 'frameworks'.

On startup, change working directory in both frontend and backend, explicitly (if applicable).

Otherwise, the frontend would not change directory until the - possibly length - backend startup is complete.

M  +2    -0    rkward/rkward.cpp

https://commits.kde.org/rkward/056a3a9f0ee82d4063343f83bb51c4b7a74878a8

diff --git a/rkward/rkward.cpp b/rkward/rkward.cpp
index 6e510412..d13d09a3 100644
--- a/rkward/rkward.cpp
+++ b/rkward/rkward.cpp
@@ -229,6 +229,7 @@ void RKWardMainWindow::doPostInit () {
 	QString cd_to = RKSettingsModuleGeneral::initialWorkingDirectory ();
 	if (!cd_to.isEmpty ()) {
 		RKGlobals::rInterface ()->issueCommand ("setwd (" + RObject::rQuote (cd_to) + ")\n", RCommand::App);
+		QDir::setCurrent (cd_to);
 	}
 
 	if (!open_urls.isEmpty()) {
@@ -266,6 +267,7 @@ void RKWardMainWindow::doPostInit () {
 	connect (this, &RKWardMainWindow::aboutToQuitRKWard, dbus, &RKDBusAPI::deleteLater);
 	// around on the bus in this case.
 
+	updateCWD ();
 	setCaption (QString ());	// our version of setCaption takes care of creating a correct caption, so we do not need to provide it here
 }
 



More information about the rkward-tracker mailing list