# HG changeset patch # User Chris Cannam # Date 1232043640 0 # Node ID 3c5570e3d9c576636a3e499f5cc3df3536f37029 # Parent 8878efd21dbc96813ac9ccae1f60b4d0a35d4235 * Fix crash in SimpleSPARQLQuery * Fix failure to add images from local files diff -r 8878efd21dbc -r 3c5570e3d9c5 data/fileio/FileSource.cpp --- 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 #include -//#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 { diff -r 8878efd21dbc -r 3c5570e3d9c5 rdf/SimpleSPARQLQuery.cpp --- a/rdf/SimpleSPARQLQuery.cpp Fri Jan 09 14:55:12 2009 +0000 +++ b/rdf/SimpleSPARQLQuery.cpp Thu Jan 15 18:20:40 2009 +0000 @@ -583,6 +583,10 @@ QMutexLocker locker(&m_mutex); + if (!m_redland) { + m_redland = new WredlandWorldWrapper(); + } + if (!m_redland->isOK()) { std::cerr << "SimpleSPARQLQuery::addSourceToModel: Failed to initialise Redland datastore" << std::endl; return false;