Mercurial > hg > svcore
comparison 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 |
comparison
equal
deleted
inserted
replaced
580:ebb6ac65bccc | 581:2e0c987a12bd |
---|---|
34 #include "data/model/RegionModel.h" | 34 #include "data/model/RegionModel.h" |
35 #include "data/model/WaveFileModel.h" | 35 #include "data/model/WaveFileModel.h" |
36 | 36 |
37 #include "data/fileio/FileSource.h" | 37 #include "data/fileio/FileSource.h" |
38 #include "data/fileio/CachedFile.h" | 38 #include "data/fileio/CachedFile.h" |
39 | 39 #include "data/fileio/FileFinder.h" |
40 #ifndef NO_SV_GUI | |
41 #include "widgets/FileFinder.h" | |
42 #endif | |
43 | 40 |
44 using std::cerr; | 41 using std::cerr; |
45 using std::endl; | 42 using std::endl; |
46 | 43 |
47 class RDFImporterImpl | 44 class RDFImporterImpl |
210 continue; | 207 continue; |
211 } | 208 } |
212 #else | 209 #else |
213 if (!fs->isAvailable()) { | 210 if (!fs->isAvailable()) { |
214 FileFinder *ff = FileFinder::getInstance(); | 211 FileFinder *ff = FileFinder::getInstance(); |
215 QString path = ff->find(FileFinder::AudioFile, | 212 if (ff) { |
216 fs->getLocation(), | 213 QString path = ff->find(FileFinder::AudioFile, |
217 m_uristring); | 214 fs->getLocation(), |
218 if (path != "") { | 215 m_uristring); |
219 delete fs; | 216 if (path != "") { |
220 fs = new FileSource(path, reporter); | |
221 if (!fs->isAvailable()) { | |
222 delete fs; | 217 delete fs; |
223 m_errorString = QString("Signal source \"%1\" is not available").arg(source); | 218 fs = new FileSource(path, reporter); |
224 continue; | 219 if (!fs->isAvailable()) { |
220 delete fs; | |
221 m_errorString = QString("Signal source \"%1\" is not available").arg(source); | |
222 continue; | |
223 } | |
225 } | 224 } |
226 } | 225 } |
227 } | 226 } |
228 #endif | 227 #endif |
229 | 228 |