comparison widgets/ImageDialog.cpp @ 317:e251c3599ea8

* Make RemoteFile far more pervasive, and use it for local files as well so that we can handle both transparently. Make it shallow copy with reference counting, so it can be used by value without having to worry about the cache file lifetime. Use RemoteFile for MainWindow file-open functions, etc
author Chris Cannam
date Thu, 18 Oct 2007 15:31:20 +0000
parents 013a37723c0a
children e9fe3923bdf4
comparison
equal deleted inserted replaced
316:c0b9eec70639 317:e251c3599ea8
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 RemoteFile(url);
190 m_remoteFile->wait(); 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()));
195 delete m_remoteFile; 195 delete m_remoteFile;