[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/krita/core/builder
From:       Adrian Page <adrian () pagenet ! plus ! com>
Date:       2004-08-05 19:37:54
Message-ID: 20040805193754.1AED0997E () office ! kde ! org
[Download RAW message or body]

CVS commit by page: 

Allow non-local files to be loaded. We can't handle asynchronous loading at the \
moment so do it synchronously.


  M +18 -0     kis_image_magick_converter.cc   1.20


--- koffice/krita/core/builder/kis_image_magick_converter.cc  #1.19:1.20
@@ -274,4 +274,21 @@ KisImageBuilder_Result KisImageMagickCon
                 return KisImageBuilder_RESULT_NOT_EXIST;
 
+#if 1
+        // We're not set up to handle asynchronous loading at the moment.
+        KisImageBuilder_Result result = KisImageBuilder_RESULT_FAILURE;
+        QString tmpFile;
+
+#if KDE_IS_VERSION( 3, 1, 90 )
+        if (KIO::NetAccess::download(uri, tmpFile, qApp -> mainWidget()))
+#else
+        if (KIO::NetAccess::download(uri, tmpFile))
+#endif
+        {
+                result = decode(tmpFile, false);
+                KIO::NetAccess::removeTempFile(tmpFile);
+        }
+
+        return result;
+#else
         if (!uri.isLocalFile()) {
                 if (m_job)
@@ -287,4 +304,5 @@ KisImageBuilder_Result KisImageMagickCon
 
         return decode(uri, false);
+#endif
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic