diff layer/ImageLayer.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 c0b9eec70639
children e9fe3923bdf4
line wrap: on
line diff
--- a/layer/ImageLayer.cpp	Thu Oct 18 10:15:07 2007 +0000
+++ b/layer/ImageLayer.cpp	Thu Oct 18 15:31:20 2007 +0000
@@ -892,16 +892,13 @@
             return;
         }
 
-        QUrl url(img);
-        if (RemoteFile::canHandleScheme(url)) {
-            RemoteFile *rf = new RemoteFile(url);
-            if (rf->isOK()) {
-                std::cerr << "ok, adding it (local filename = " << rf->getLocalFilename().toStdString() << ")" << std::endl;
-                m_remoteFiles[img] = rf;
-                connect(rf, SIGNAL(ready()), this, SLOT(remoteFileReady()));
-            } else {
-                delete rf;
-            }
+        RemoteFile *rf = new RemoteFile(img);
+        if (rf->isOK()) {
+            std::cerr << "ok, adding it (local filename = " << rf->getLocalFilename().toStdString() << ")" << std::endl;
+            m_remoteFiles[img] = rf;
+            connect(rf, SIGNAL(ready()), this, SLOT(remoteFileReady()));
+        } else {
+            delete rf;
         }
     }
 }