]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/settings/applyviewpropsjob.cpp
[KStandardItemListWidget] Pass icon state to overlay painter
[dolphin.git] / src / settings / applyviewpropsjob.cpp
index d33d4430f36038c8b61545e2e9fa04e6b1b40a1d..b274bb8fbf52013697e73e83a843be161d320777 100644 (file)
  ***************************************************************************/
 
 #include "applyviewpropsjob.h"
-#include <views/viewproperties.h>
 
-ApplyViewPropsJob::ApplyViewPropsJob(const KUrl& dir,
+#include "views/viewproperties.h"
+
+ApplyViewPropsJob::ApplyViewPropsJob(const QUrl& dir,
                                      const ViewProperties& viewProps) :
     KIO::Job(),
-    m_viewProps(0),
+    m_viewProps(nullptr),
     m_progress(0),
     m_dir(dir)
 {
@@ -46,7 +47,7 @@ ApplyViewPropsJob::ApplyViewPropsJob(const KUrl& dir,
 ApplyViewPropsJob::~ApplyViewPropsJob()
 {
     delete m_viewProps;  // the properties are written by the destructor
-    m_viewProps = 0;
+    m_viewProps = nullptr;
 }
 
 void ApplyViewPropsJob::slotEntries(KIO::Job*, const KIO::UDSEntryList& list)
@@ -56,8 +57,9 @@ void ApplyViewPropsJob::slotEntries(KIO::Job*, const KIO::UDSEntryList& list)
         if (name != QLatin1String(".") && name != QLatin1String("..") && entry.isDir()) {
             ++m_progress;
 
-            KUrl url(m_dir);
-            url.addPath(name);
+            QUrl url(m_dir);
+            url = url.adjusted(QUrl::StripTrailingSlash);
+            url.setPath(url.path() + '/' + name);
 
             Q_ASSERT(m_viewProps);