[rkward/frameworks] rkward: Fix build after merge commit (d5eeba62ddda02c2d78ddff8b4e3e497d184566c).
Thomas Friedrichsmeier
thomas.friedrichsmeier at ruhr-uni-bochum.de
Thu Dec 31 07:55:20 UTC 2015
Git commit fa905e124b0cc6bad4efd006b4312d105b6ddbe4 by Thomas Friedrichsmeier.
Committed on 31/12/2015 at 07:54.
Pushed by tfry into branch 'frameworks'.
Fix build after merge commit (d5eeba62ddda02c2d78ddff8b4e3e497d184566c).
M +2 -2 rkward/main.cpp
M +6 -5 rkward/rkward.cpp
http://commits.kde.org/rkward/fa905e124b0cc6bad4efd006b4312d105b6ddbe4
diff --git a/rkward/main.cpp b/rkward/main.cpp
index ad54a3f..de8ad0a 100644
--- a/rkward/main.cpp
+++ b/rkward/main.cpp
@@ -185,8 +185,8 @@ int main (int argc, char *argv[]) {
QStringList url_args = parser.positionalArguments ();
if (!url_args.isEmpty ()) {
- RKGlobals::startup_options["initial_urls"] = urls_args;
- RKGlobals::startup_options["warn_external"] = args->isSet ("warn-external");
+ RKGlobals::startup_options["initial_urls"] = url_args;
+ RKGlobals::startup_options["warn_external"] = parser.isSet ("warn-external");
}
RKGlobals::startup_options["evaluate"] = decodeArgument (parser.value ("evaluate"));
RKGlobals::startup_options["backend-debugger"] = decodeArgument (parser.value ("backend-debugger"));
diff --git a/rkward/rkward.cpp b/rkward/rkward.cpp
index 30283e5..9cc2616 100644
--- a/rkward/rkward.cpp
+++ b/rkward/rkward.cpp
@@ -231,7 +231,7 @@ void RKWardMainWindow::doPostInit () {
for (int i = 0; i < open_urls.size (); ++i) {
// make sure local urls are absolute, as we may be changing wd before loading
- QUrl url (open_urls[i]), QDir::currentPath(), QUrl::AssumeLocalFile));
+ QUrl url = QUrl::fromUserInput (open_urls[i], QDir::currentPath(), QUrl::AssumeLocalFile);
RK_ASSERT (!url.isRelative ());
open_urls[i] = url.url ();
}
@@ -279,16 +279,17 @@ void RKWardMainWindow::doPostInit () {
setCaption (QString ()); // our version of setCaption takes care of creating a correct caption, so we do not need to provide it here
}
-void RKWardMainWindow::openUrlsFromCommandLineOrDBus (bool warn_external, QStringList urls) {
+void RKWardMainWindow::openUrlsFromCommandLineOrDBus (bool warn_external, QStringList _urls) {
RK_TRACE (APP);
bool any_dangerous_urls = false;
- for (int i = 0; i < urls.size (); ++i) {
- QUrl url = QUrl::fromUserInput (urls[i], QString (), QUrl::AssumeLocalFile);
+ QList<QUrl> urls;
+ for (int i = 0; i < _urls.size (); ++i) {
+ QUrl url = QUrl::fromUserInput (_urls[i], QString (), QUrl::AssumeLocalFile);
if (url.scheme () == "rkward" && url.host () == "runplugin") {
any_dangerous_urls = true;
- break;
}
+ urls.append (url);
}
if (warn_external && any_dangerous_urls) {
More information about the rkward-tracker
mailing list