comparison widgets/ImageDialog.cpp @ 318:e9fe3923bdf4

* 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 e251c3599ea8
children 07aa52466142
comparison
equal deleted inserted replaced
317:e251c3599ea8 318:e9fe3923bdf4
24 #include <QDesktopWidget> 24 #include <QDesktopWidget>
25 #include <QApplication> 25 #include <QApplication>
26 #include <QUrl> 26 #include <QUrl>
27 #include <QMessageBox> 27 #include <QMessageBox>
28 28
29 #include "data/fileio/RemoteFile.h" 29 #include "data/fileio/FileSource.h"
30 #include "data/fileio/FileFinder.h" 30 #include "data/fileio/FileFinder.h"
31 31
32 #include <iostream> 32 #include <iostream>
33 33
34 ImageDialog::ImageDialog(QString title, 34 ImageDialog::ImageDialog(QString title,
177 177
178 QString fileName = img; 178 QString fileName = img;
179 delete m_remoteFile; 179 delete m_remoteFile;
180 m_remoteFile = 0; 180 m_remoteFile = 0;
181 181
182 if (RemoteFile::isRemote(fileName)) { 182 if (FileSource::isRemote(fileName)) {
183 QUrl url(fileName); 183 QUrl url(fileName);
184 if (!RemoteFile::canHandleScheme(url)) { 184 if (!FileSource::canHandleScheme(url)) {
185 QMessageBox::critical(this, tr("Unsupported scheme in URL"), 185 QMessageBox::critical(this, tr("Unsupported scheme in URL"),
186 tr("The URL scheme \"%1\" is not supported") 186 tr("The URL scheme \"%1\" is not supported")
187 .arg(url.scheme())); 187 .arg(url.scheme()));
188 } else { 188 } else {
189 m_remoteFile = new RemoteFile(url); 189 m_remoteFile = new FileSource(url);
190 m_remoteFile->waitForData(); 190 m_remoteFile->waitForData();
191 if (!m_remoteFile->isOK()) { 191 if (!m_remoteFile->isOK()) {
192 QMessageBox::critical(this, tr("File download failed"), 192 QMessageBox::critical(this, tr("File download failed"),
193 tr("Failed to download URL \"%1\": %2") 193 tr("Failed to download URL \"%1\": %2")
194 .arg(url.toString()).arg(m_remoteFile->getErrorString())); 194 .arg(url.toString()).arg(m_remoteFile->getErrorString()));