diff data/fileio/FileSource.cpp @ 663:badbbf0921fa

Merge
author Chris Cannam
date Mon, 25 Oct 2010 11:09:02 +0200
parents a4faa1840384
children 948271d124ac
line wrap: on
line diff
--- a/data/fileio/FileSource.cpp	Sun Oct 24 22:10:44 2010 +0200
+++ b/data/fileio/FileSource.cpp	Mon Oct 25 11:09:02 2010 +0200
@@ -83,8 +83,12 @@
     m_reporter(reporter),
     m_refCounted(false)
 {
+    if (m_url.toString() == "") {
+        m_url = QUrl(fileOrUrl, QUrl::TolerantMode);
+    }
+ 
 #ifdef DEBUG_FILE_SOURCE
-    std::cerr << "FileSource::FileSource(" << fileOrUrl.toStdString() << ")" << std::endl;
+    std::cerr << "FileSource::FileSource(" << fileOrUrl.toStdString() << "): url <" << m_url.toString().toStdString() << ">" << std::endl;
     incCount(m_url.toString());
 #endif
 
@@ -266,7 +270,7 @@
 
 #ifdef DEBUG_FILE_SOURCE
         std::cerr << "FileSource::init: URL translates to local filename \""
-                  << m_localFilename.toStdString() << "\"" << std::endl;
+                  << m_localFilename.toStdString() << "\" (with literal=" << literal << ")" << std::endl;
 #endif
         m_ok = true;
         m_lastStatus = 200;