]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinpart.cpp
Fix issue, that the details-view has no size and date column in the following case:
[dolphin.git] / src / dolphinpart.cpp
index 3309f4b38dc339b7d3ac567358576fb29b71e26e..a01e072658a9fa7d05a38c3c56cbef418a9aa5a1 100644 (file)
@@ -26,7 +26,6 @@
 #include <kactioncollection.h>
 #include <kconfiggroup.h>
 #include <kdebug.h>
-#include <kdirlister.h>
 #include <kglobalsettings.h>
 #include <kiconloader.h>
 #include <klocale.h>
@@ -47,6 +46,7 @@
 #include "views/dolphinmodel.h"
 #include "views/dolphinnewfilemenuobserver.h"
 #include "views/dolphinremoteencoding.h"
+#include "views/dolphindirlister.h"
 
 #include <QActionGroup>
 #include <QApplication>
@@ -65,7 +65,7 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantL
     // make sure that other apps using this part find Dolphin's view-file-columns icons
     KIconLoader::global()->addAppDir("dolphin");
 
-    m_dirLister = new KDirLister;
+    m_dirLister = new DolphinDirLister;
     m_dirLister->setAutoUpdate(true);
     if (parentWidget) {
         m_dirLister->setMainWindow(parentWidget->window());
@@ -75,9 +75,10 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantL
     connect(m_dirLister, SIGNAL(completed(KUrl)), this, SLOT(slotCompleted(KUrl)));
     connect(m_dirLister, SIGNAL(canceled(KUrl)), this, SLOT(slotCanceled(KUrl)));
     connect(m_dirLister, SIGNAL(percent(int)), this, SLOT(updateProgress(int)));
+    connect(m_dirLister, SIGNAL(errorMessage(QString)), this, SLOT(slotErrorMessage(QString)));
 
     m_dolphinModel = new DolphinModel(this);
-    m_dolphinModel->setDirLister(m_dirLister);
+    m_dolphinModel->setDirLister(m_dirLister); // m_dolphinModel takes ownership of m_dirLister
 
     m_proxyModel = new DolphinSortFilterProxyModel(this);
     m_proxyModel->setSourceModel(m_dolphinModel);
@@ -147,7 +148,6 @@ DolphinPart::~DolphinPart()
 {
     DolphinSettings::instance().save();
     DolphinNewFileMenuObserver::instance().detach(m_newFileMenu);
-    delete m_dirLister;
 }
 
 void DolphinPart::createActions()
@@ -331,7 +331,9 @@ void DolphinPart::slotMessage(const QString& msg)
 
 void DolphinPart::slotErrorMessage(const QString& msg)
 {
-    KMessageBox::error(m_view, msg);
+    kDebug() << msg;
+    emit canceled(msg);
+    //KMessageBox::error(m_view, msg);
 }
 
 void DolphinPart::slotRequestItemInfo(const KFileItem& item)