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

List:       kde-commits
Subject:    branches/work/soc-parley/parley/practice
From:       David Capel <wot.narg () gmail ! com>
Date:       2008-06-16 6:09:56
Message-ID: 1213596596.713570.20452.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 821027 by capel:

I'm hoping kio solves my problems...



 M  +10 -2     prompt.cpp  


--- branches/work/soc-parley/parley/practice/prompt.cpp #821026:821027
@@ -19,6 +19,7 @@
 #include "prompt.h"
 
 #include <KDebug>
+#include <kio/netaccess.h>
 
 TextualPrompt::TextualPrompt(KSvgRenderer * renderer, const QString& elementId) :
          m_renderer(renderer)
@@ -83,8 +84,15 @@
     kDebug() << image;
     if (!image.isEmpty())
     {
-        m_pic.load(image.url());
-        setVisible(true);
+        QString tmpFile;
+        if( KIO::NetAccess::download(image, tmpFile, this)) {
+             m_pic.load(tmpFile);
+            KIO::NetAccess::removeTempFile(tmpFile);
+            setVisible(true);
+        } else {
+            //KMessageBox::error(this, KIO::NetAccess::lastErrorString());
+            kDebug() << KIO::NetAccess::lastErrorString();
+        }
     }
     else
     {
[prev in list] [next in list] [prev in thread] [next in thread] 

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