Mercurial > hg > svcore
diff rdf/RDFImporter.cpp @ 581:2e0c987a12bd
* Pull out the widgetry part of FileFinder into widgets/InteractiveFileFinder
  (essentially this is just to avoid a dependency from data/fileio to widgets/
  which is problematic for non-gui programs)
| author | Chris Cannam | 
|---|---|
| date | Fri, 27 Mar 2009 16:25:52 +0000 | 
| parents | 1d7ebc05157e | 
| children | d04b8674b710 | 
line wrap: on
 line diff
--- a/rdf/RDFImporter.cpp Fri Mar 27 13:10:01 2009 +0000 +++ b/rdf/RDFImporter.cpp Fri Mar 27 16:25:52 2009 +0000 @@ -36,10 +36,7 @@ #include "data/fileio/FileSource.h" #include "data/fileio/CachedFile.h" - -#ifndef NO_SV_GUI -#include "widgets/FileFinder.h" -#endif +#include "data/fileio/FileFinder.h" using std::cerr; using std::endl; @@ -212,16 +209,18 @@ #else if (!fs->isAvailable()) { FileFinder *ff = FileFinder::getInstance(); - QString path = ff->find(FileFinder::AudioFile, - fs->getLocation(), - m_uristring); - if (path != "") { - delete fs; - fs = new FileSource(path, reporter); - if (!fs->isAvailable()) { + if (ff) { + QString path = ff->find(FileFinder::AudioFile, + fs->getLocation(), + m_uristring); + if (path != "") { delete fs; - m_errorString = QString("Signal source \"%1\" is not available").arg(source); - continue; + fs = new FileSource(path, reporter); + if (!fs->isAvailable()) { + delete fs; + m_errorString = QString("Signal source \"%1\" is not available").arg(source); + continue; + } } } }
