changeset 615:521438145bd7

More changes related to strict/tolerant URL parsing: * when selecting an output file name for a given input filename: - parse the url in StrictMode; - also, use completeBaseName() rather than baseName() * when writing out a file:/// URL to the audio: - parse the url in StrictMode.
author Christophe Rhodes
date Wed, 07 Oct 2009 16:45:45 +0000
parents 87b81f959706
children 3a61a4df6d53
files rdf/RDFFeatureWriter.cpp transform/FileFeatureWriter.cpp
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/rdf/RDFFeatureWriter.cpp	Wed Oct 07 13:10:49 2009 +0000
+++ b/rdf/RDFFeatureWriter.cpp	Wed Oct 07 16:45:45 2009 +0000
@@ -300,7 +300,7 @@
      * Describe signal we're analysing (AudioFile, Signal, TimeLine, etc.)
      */
     
-    QUrl url(trackId);
+    QUrl url(trackId, QUrl::StrictMode);
     QString scheme = url.scheme().toLower();
     bool local = (scheme == "" || scheme == "file" || scheme.length() == 1);
 
--- a/transform/FileFeatureWriter.cpp	Wed Oct 07 13:10:49 2009 +0000
+++ b/transform/FileFeatureWriter.cpp	Wed Oct 07 16:45:45 2009 +0000
@@ -167,7 +167,7 @@
 
     if (m_stdout) return "";
     
-    QUrl url(trackId);
+    QUrl url(trackId, QUrl::StrictMode);
     QString scheme = url.scheme().toLower();
     bool local = (scheme == "" || scheme == "file" || scheme.length() == 1);
 
@@ -176,7 +176,7 @@
     if (infilename == "") {
         infilename = url.path();
     }
-    basename = QFileInfo(infilename).baseName();
+    basename = QFileInfo(infilename).completeBaseName();
     if (scheme.length() == 1) {
         infilename = scheme + ":" + infilename; // DOS drive!
     }