]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Internal simplification: It is not necessary to keep the ViewModeController as member...
authorPeter Penz <peter.penz19@gmail.com>
Sun, 9 Jan 2011 12:28:43 +0000 (12:28 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Sun, 9 Jan 2011 12:28:43 +0000 (12:28 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=1213172

src/views/dolphincolumnview.cpp
src/views/dolphindetailsview.cpp
src/views/dolphindetailsview.h
src/views/dolphiniconsview.cpp
src/views/dolphiniconsview.h
src/views/dolphinviewcontroller.cpp
src/views/dolphinviewcontroller.h

index 41d281bac1aa5a7cc30bed6d41e5ff007fe7d8d2..52d86f121b52c167532104ef8bb03213fb2f761a 100644 (file)
@@ -300,7 +300,7 @@ void DolphinColumnView::dropEvent(QDropEvent* event)
     m_container->m_dolphinViewController->setItemView(this);
     const QModelIndex dolphinModelIndex = m_proxyModel->mapToSource(index);
     const KFileItem item = m_dolphinModel->itemForIndex(dolphinModelIndex);
     m_container->m_dolphinViewController->setItemView(this);
     const QModelIndex dolphinModelIndex = m_proxyModel->mapToSource(index);
     const KFileItem item = m_dolphinModel->itemForIndex(dolphinModelIndex);
-    m_container->m_dolphinViewController->indicateDroppedUrls(item, url(), event);
+    m_container->m_dolphinViewController->indicateDroppedUrls(item, event);
     DolphinTreeView::dropEvent(event);
 }
 
     DolphinTreeView::dropEvent(event);
 }
 
index 12a2ba348f512d3c107e434639ad61e30171bb5a..d825153f3215af921c6460096a2a3d94ff0050d9 100644 (file)
@@ -52,7 +52,6 @@ DolphinDetailsView::DolphinDetailsView(QWidget* parent,
     DolphinTreeView(parent),
     m_autoResize(true),
     m_dolphinViewController(dolphinViewController),
     DolphinTreeView(parent),
     m_autoResize(true),
     m_dolphinViewController(dolphinViewController),
-    m_viewModeController(viewModeController),
     m_extensionsFactory(0),
     m_expandableFoldersAction(0),
     m_expandedUrls(),
     m_extensionsFactory(0),
     m_expandableFoldersAction(0),
     m_expandedUrls(),
@@ -239,7 +238,7 @@ void DolphinDetailsView::dropEvent(QDropEvent* event)
     if (index.isValid() && (index.column() == DolphinModel::Name)) {
         item = m_dolphinViewController->itemForIndex(index);
     }
     if (index.isValid() && (index.column() == DolphinModel::Name)) {
         item = m_dolphinViewController->itemForIndex(index);
     }
-    m_dolphinViewController->indicateDroppedUrls(item, m_viewModeController->url(), event);
+    m_dolphinViewController->indicateDroppedUrls(item, event);
     DolphinTreeView::dropEvent(event);
 }
 
     DolphinTreeView::dropEvent(event);
 }
 
index fddbdc6c0db7559858c4da093c88d2991798f961..640181274f2bc75cfa08a169b5fdb885cf7afa30 100644 (file)
@@ -199,7 +199,6 @@ private:
     bool m_autoResize; // if true, the columns are resized automatically to the available width
 
     DolphinViewController* m_dolphinViewController;
     bool m_autoResize; // if true, the columns are resized automatically to the available width
 
     DolphinViewController* m_dolphinViewController;
-    const ViewModeController* m_viewModeController;
     ViewExtensionsFactory* m_extensionsFactory;
     QAction* m_expandableFoldersAction;
 
     ViewExtensionsFactory* m_extensionsFactory;
     QAction* m_expandableFoldersAction;
 
index 4abcad3db675b3de30a38667f7d14cdb4b87f1ee..f04769762872d2d36f6c6cc7ac93199cc2add95f 100644 (file)
@@ -45,7 +45,6 @@ DolphinIconsView::DolphinIconsView(QWidget* parent,
                                    DolphinSortFilterProxyModel* proxyModel) :
     KCategorizedView(parent),
     m_dolphinViewController(dolphinViewController),
                                    DolphinSortFilterProxyModel* proxyModel) :
     KCategorizedView(parent),
     m_dolphinViewController(dolphinViewController),
-    m_viewModeController(viewModeController),
     m_categoryDrawer(new DolphinCategoryDrawer(this)),
     m_extensionsFactory(0),
     m_font(),
     m_categoryDrawer(new DolphinCategoryDrawer(this)),
     m_extensionsFactory(0),
     m_font(),
@@ -224,7 +223,7 @@ void DolphinIconsView::dropEvent(QDropEvent* event)
 {
     const QModelIndex index = indexAt(event->pos());
     const KFileItem item = m_dolphinViewController->itemForIndex(index);
 {
     const QModelIndex index = indexAt(event->pos());
     const KFileItem item = m_dolphinViewController->itemForIndex(index);
-    m_dolphinViewController->indicateDroppedUrls(item, m_viewModeController->url(), event);
+    m_dolphinViewController->indicateDroppedUrls(item, event);
     // don't call KCategorizedView::dropEvent(event), as it moves
     // the items which is not wanted
 }
     // don't call KCategorizedView::dropEvent(event), as it moves
     // the items which is not wanted
 }
index 21e37ba02c5933eb49c81ada3027993edda3ecb1..0f6f716c3fba4a8d9f5d2950571a439130801fdd 100644 (file)
@@ -106,7 +106,6 @@ private:
 
 private:
     DolphinViewController* m_dolphinViewController;
 
 private:
     DolphinViewController* m_dolphinViewController;
-    const ViewModeController* m_viewModeController;
     DolphinCategoryDrawer* m_categoryDrawer;
     ViewExtensionsFactory* m_extensionsFactory;
 
     DolphinCategoryDrawer* m_categoryDrawer;
     ViewExtensionsFactory* m_extensionsFactory;
 
index 6e2570007e5ec065a81fd4a7d64f124b50f0492e..6749eaa41bd706c38ed9a5e005bb08d683119901 100644 (file)
@@ -84,11 +84,9 @@ void DolphinViewController::requestActivation()
     emit activated();
 }
 
     emit activated();
 }
 
-void DolphinViewController::indicateDroppedUrls(const KFileItem& destItem,
-                                            const KUrl& destPath,
-                                            QDropEvent* event)
+void DolphinViewController::indicateDroppedUrls(const KFileItem& destItem, QDropEvent* event)
 {
 {
-    emit urlsDropped(destItem, destPath, event);
+    emit urlsDropped(destItem, m_dolphinView->url(), event);
 }
 
 
 }
 
 
index ea002792891bcccd9ac25a486553319ba4804df5..07bc5693668c7470dfe75456692c43d1e360ba61 100644 (file)
@@ -87,12 +87,9 @@ public:
      * Indicates that URLs are dropped above a destination. The DolphinView
      * will start the corresponding action (copy, move, link).
      * @param destItem  Item of the destination (can be null, see KFileItem::isNull()).
      * Indicates that URLs are dropped above a destination. The DolphinView
      * will start the corresponding action (copy, move, link).
      * @param destItem  Item of the destination (can be null, see KFileItem::isNull()).
-     * @param destPath  Path of the destination.
      * @param event     Drop event
      */
      * @param event     Drop event
      */
-    void indicateDroppedUrls(const KFileItem& destItem,
-                             const KUrl& destPath,
-                             QDropEvent* event);
+    void indicateDroppedUrls(const KFileItem& destItem, QDropEvent* event);
 
     /**
      * Informs the DolphinView about a sorting change done inside
 
     /**
      * Informs the DolphinView about a sorting change done inside