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

List:       kde-commits
Subject:    branches/work/kde4/playground/base/plasmagik/src
From:       Aaron J. Seigo <aseigo () kde ! org>
Date:       2006-10-31 18:58:13
Message-ID: 1162321093.846621.3289.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 600780 by aseigo:

port to ktemporaryfile


 M  +4 -5      plasmagik.cpp  


--- branches/work/kde4/playground/base/plasmagik/src/plasmagik.cpp #600779:600780
@@ -35,7 +35,7 @@
 #include <kdirselectdialog.h>
 #include <kmessage.h>
 #include <kmessageboxmessagehandler.h>
-#include <ktempfile.h>
+#include <ktemporaryfile.h>
 #include <kmessagebox.h>
 #include <kicon.h>
 #include <kseparator.h>
@@ -340,8 +340,8 @@
     QString XMLMetadata;
     XMLMetadata = generateXML();
 
-    KTempFile *tmpXML = new KTempFile;
-    QFile data(tmpXML->name());
+    KTemporaryFile *tmpXML = new KTemporaryFile;
+    QFile data(tmpXML->fileName());
 
     //We just write the content of the QString containing the metadata in an
     //empty temporary file that we will package with the name metadata.xml
@@ -351,7 +351,6 @@
         out << XMLMetadata;
         data.close();
     }
-    tmpXML->setAutoDelete(true);
 
     //OK, we've got the temporary file with the metadata in it.
     //Now we just need to put everything into a zip archive.
@@ -361,7 +360,7 @@
     if (plasmoid.open(QIODevice::WriteOnly))
     {
     // put the metadata.xml file first to provide a faster unpacking.
-    plasmoid.addLocalFile(tmpXML->name(),
+    plasmoid.addLocalFile(tmpXML->fileName(),
                           "metadata.xml");
 
     // add the icon only if the user provided it.
[prev in list] [next in list] [prev in thread] [next in thread] 

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