Mercurial > hg > svcore
diff data/fileio/FileFinder.cpp @ 317:c324d410b096
* RemoteFile -> FileSource
now it's used all over the place for local files as well.
author | Chris Cannam |
---|---|
date | Thu, 18 Oct 2007 16:20:26 +0000 |
parents | 3a6725f285d6 |
children | a9ccd644f3bf |
line wrap: on
line diff
--- a/data/fileio/FileFinder.cpp Thu Oct 18 15:31:20 2007 +0000 +++ b/data/fileio/FileFinder.cpp Thu Oct 18 16:20:26 2007 +0000 @@ -14,7 +14,7 @@ */ #include "FileFinder.h" -#include "RemoteFile.h" +#include "FileSource.h" #include "AudioFileReaderFactory.h" #include "DataFileReaderFactory.h" @@ -380,8 +380,8 @@ { if (QFileInfo(location).exists()) return location; - if (RemoteFile::isRemote(location)) { - if (RemoteFile(location).isAvailable()) { + if (FileSource::isRemote(location)) { + if (FileSource(location).isAvailable()) { std::cerr << "FileFinder::find: ok, it's available... returning" << std::endl; return location; } @@ -411,16 +411,16 @@ QString fileName; QString resolved; - if (RemoteFile::isRemote(location)) { + if (FileSource::isRemote(location)) { fileName = QUrl(location).path().section('/', -1, -1, QString::SectionSkipEmpty); } else { fileName = QFileInfo(location).fileName(); } - if (RemoteFile::isRemote(relativeTo)) { + if (FileSource::isRemote(relativeTo)) { resolved = QUrl(relativeTo).resolved(fileName).toString(); - if (!RemoteFile(resolved).isAvailable()) resolved = ""; + if (!FileSource(resolved).isAvailable()) resolved = ""; std::cerr << "resolved: " << resolved.toStdString() << std::endl; } else { resolved = QFileInfo(relativeTo).dir().filePath(fileName); @@ -479,7 +479,7 @@ QLineEdit::Normal, "", &ok); if (ok && path != "") { - if (RemoteFile(path).isAvailable()) { + if (FileSource(path).isAvailable()) { done = true; } else { QMessageBox::critical