]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/applyviewpropsjob.cpp
Fix memory leak using K_GLOBAL_STATIC
[dolphin.git] / src / applyviewpropsjob.cpp
index fb48244e1cdd8d30d265abd32554bca92daedf6a..ad9a22645f90fef4a9d1670e4ce561fd19c29bed 100644 (file)
 
 ApplyViewPropsJob::ApplyViewPropsJob(const KUrl& dir,
                                      const ViewProperties& viewProps) :
-        KIO::Job(false),
-        m_viewProps(0),
-        m_progress(0),
-        m_dir(dir)
+    KIO::Job(),
+    m_viewProps(0),
+    m_progress(0),
+    m_dir(dir)
 {
     m_viewProps = new ViewProperties(dir);
     m_viewProps->setViewMode(viewProps.viewMode());
@@ -56,7 +56,7 @@ void ApplyViewPropsJob::processNextItem()
 
 void ApplyViewPropsJob::startNextJob(const KUrl& url)
 {
-    KIO::ListJob* listJob = KIO::listRecursive(url, false);
+    KIO::ListJob* listJob = KIO::listRecursive(url, KIO::HideProgressInfo);
     connect(listJob, SIGNAL(entries(KIO::Job*, const KIO::UDSEntryList&)),
             SLOT(slotEntries(KIO::Job*, const KIO::UDSEntryList&)));
     addSubjob(listJob);
@@ -68,7 +68,7 @@ void ApplyViewPropsJob::slotEntries(KIO::Job*, const KIO::UDSEntryList& list)
     const KIO::UDSEntryList::ConstIterator end = list.end();
     for (; it != end; ++it) {
         const KIO::UDSEntry& entry = *it;
-        const QString name = entry.stringValue(KIO::UDS_NAME);
+        const QString name = entry.stringValue(KIO::UDSEntry::UDS_NAME);
         if ((name != ".") && (name != "..") && entry.isDir()) {
             ++m_progress;