[rkward/frameworks] rkward/plugin: For plugin file selectors that allow local files, only, make sure not to prefix value with "file://" protocol specification.
Thomas Friedrichsmeier
thomas.friedrichsmeier at ruhr-uni-bochum.de
Fri Sep 2 18:38:44 UTC 2016
Git commit bc31aaa2cd57a53987b2a43dd75d172cce9c0f1a by Thomas Friedrichsmeier.
Committed on 02/09/2016 at 18:38.
Pushed by tfry into branch 'frameworks'.
For plugin file selectors that allow local files, only, make sure not to prefix value with "file://" protocol specification.
M +2 -1 rkward/plugin/rkpluginbrowser.cpp
http://commits.kde.org/rkward/bc31aaa2cd57a53987b2a43dd75d172cce9c0f1a
diff --git a/rkward/plugin/rkpluginbrowser.cpp b/rkward/plugin/rkpluginbrowser.cpp
index 8511f34..e4f57f0 100644
--- a/rkward/plugin/rkpluginbrowser.cpp
+++ b/rkward/plugin/rkpluginbrowser.cpp
@@ -89,9 +89,10 @@ void RKPluginBrowser::textChanged (RKComponentPropertyBase *) {
QUrl url = QUrl::fromUserInput (selection->value ().toString (), QDir::currentPath (), QUrl::AssumeLocalFile);
if (!url.isValid ()) url = QUrl (selector->getLocation ());
+ QString urlstring = only_local ? url.url (QUrl::PreferLocalFile) : url.url ();
if (url.url () != selection->value ().toString ()) {
// NOTE: We refuse to accept relative urls
- selection->setValue (url.url ());
+ selection->setValue (urlstring);
}
selector->setLocation (url.url ());
updateColor ();
More information about the rkward-tracker
mailing list