diff data/fileio/FileSource.cpp @ 527:3c5570e3d9c5

* Fix crash in SimpleSPARQLQuery * Fix failure to add images from local files
author Chris Cannam
date Thu, 15 Jan 2009 18:20:40 +0000
parents 3f68eab92857
children 57857a57a03a
line wrap: on
line diff
--- a/data/fileio/FileSource.cpp	Fri Jan 09 14:55:12 2009 +0000
+++ b/data/fileio/FileSource.cpp	Thu Jan 15 18:20:40 2009 +0000
@@ -30,7 +30,7 @@
 #include <iostream>
 #include <cstdlib>
 
-//#define DEBUG_FILE_SOURCE 1
+#define DEBUG_FILE_SOURCE 1
 
 int
 FileSource::m_count = 0;
@@ -195,6 +195,10 @@
     m_done = true;
 
 #ifdef DEBUG_FILE_SOURCE
+    std::cerr << "FileSource::FileSource(" << m_url.toString().toStdString() << ") [copy ctor]: note: local filename is \"" << m_localFilename.toStdString() << "\"" << std::endl;
+#endif
+
+#ifdef DEBUG_FILE_SOURCE
     std::cerr << "FileSource::FileSource(copy ctor) exiting" << std::endl;
 #endif
 }
@@ -234,6 +238,9 @@
         m_lastStatus = 200;
 
         if (!QFileInfo(m_localFilename).exists()) {
+#ifdef DEBUG_FILE_SOURCE
+            std::cerr << "FileSource::init: Local file of this name does not exist, trying URL as a literal filename" << std::endl;
+#endif
             if (literal) {
                 m_lastStatus = 404;
             } else {