[rkward] rkward/settings: Fixes to legacy libloc handling:

Thomas Friedrichsmeier null at kde.org
Tue May 8 09:27:40 UTC 2018


Git commit 530853c1a164d3b067a24b894a3f3011f198b2e5 by Thomas Friedrichsmeier.
Committed on 08/05/2018 at 09:26.
Pushed by tfry into branch 'master'.

Fixes to legacy libloc handling:
- Compilation fix for clang
- Use version suffix, instead of subdir, as file.rename() will fail, otherwise.

M  +3    -3    rkward/settings/rksettingsmoduler.cpp

https://commits.kde.org/rkward/530853c1a164d3b067a24b894a3f3011f198b2e5

diff --git a/rkward/settings/rksettingsmoduler.cpp b/rkward/settings/rksettingsmoduler.cpp
index cc9edfed..ac0ea884 100644
--- a/rkward/settings/rksettingsmoduler.cpp
+++ b/rkward/settings/rksettingsmoduler.cpp
@@ -673,14 +673,14 @@ void RKSettingsModuleRPackages::validateSettingsInteractive (QList<RKSettingsWiz
 			renamebutton->setChecked (true);
 			layout->addWidget (group);
 
-			page->setApplyCallback([keepbutton, renamebutton, legacy_libloc, &liblocs]() {
+			page->setApplyCallback([keepbutton, renamebutton, legacy_libloc]() {
 				if (keepbutton->isChecked ()) return;
 
 				liblocs.removeAll (legacy_libloc);
 				if (renamebutton->isChecked ()) {
-					QString new_loc = legacy_libloc + '/' + RKSessionVars::RVersion (true);
+					QString new_loc = legacy_libloc + '-' + RKSessionVars::RVersion (true);
 					RKGlobals::rInterface ()->issueCommand (QString ("file.rename(%1, %2)\n").arg (RObject::rQuote (legacy_libloc)).arg (RObject::rQuote (new_loc)), RCommand::App);
-					liblocs.prepend (legacy_libloc + QStringLiteral ("/%v"));
+					liblocs.prepend (legacy_libloc + QStringLiteral ("-%v"));
 				}
 
 				RKGlobals::rInterface ()->issueCommand (libLocsCommand(), RCommand::App);



More information about the rkward-tracker mailing list