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

List:       kde-commits
Subject:    kdeaddons/konq-plugins/kimgalleryplugin
From:       Lukáš Tinkl <lukas () kde ! org>
Date:       2003-11-05 12:08:43
[Download RAW message or body]

CVS commit by lukas: 

bugifx: copy original files when told so

CCMAIL: 67136-done@bugs.kde.org


  M +7 -6      imgalleryplugin.cpp   1.51


--- kdeaddons/konq-plugins/kimgalleryplugin/imgalleryplugin.cpp  #1.50:1.51
@@ -39,6 +39,7 @@ Boston, MA 02111-1307, USA.
 #include <kdebug.h>
 #include <kgenericfactory.h>
-#include "imgallerydialog.h"
+#include <kio/netaccess.h>
 
+#include "imgallerydialog.h"
 #include "imgalleryplugin.h"
 
@@ -424,9 +425,9 @@ bool KImGalleryPlugin::createThumb( cons
 
     if (m_copyFiles) {
-        KURL srcURL(pixPath);
-        KURL destURL(imgGalleryDir + QString::fromLatin1("/images/") + imgName);
-        KIO::FileCopyJob *file_copy = new KIO::FileCopyJob(srcURL,destURL,420,false,true,false,false);
-
-        delete file_copy;
+        KURL srcURL = KURL::fromPathOrURL(pixPath);
+        //kdDebug() << "srcURL: " << srcURL << endl;
+        KURL destURL = KURL::fromPathOrURL(imgGalleryDir + QString::fromLatin1("/images/") + imgName);
+        //kdDebug() << "destURL: " << destURL << endl;
+        KIO::NetAccess::copy(srcURL, destURL, static_cast<KParts::Part *>(parent())->widget());
     }
 


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

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