]> cloud.milkyroute.net Git - dolphin.git/commitdiff
replace QList<KFileItem> by KFileItemList, as KFileItemList is not QList<KFileItem...
authorPeter Penz <peter.penz19@gmail.com>
Tue, 2 Oct 2007 19:03:03 +0000 (19:03 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Tue, 2 Oct 2007 19:03:03 +0000 (19:03 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=720234

15 files changed:
src/dolphincontextmenu.h
src/dolphinmainwindow.cpp
src/dolphinmainwindow.h
src/dolphinpart.cpp
src/dolphinview.cpp
src/dolphinview.h
src/dolphinviewcontainer.cpp
src/infosidebarpage.cpp
src/infosidebarpage.h
src/renamedialog.cpp
src/renamedialog.h
src/sidebarpage.cpp
src/sidebarpage.h
src/treeviewcontextmenu.cpp
src/treeviewsidebarpage.cpp

index e6bfb9c285869c77067e915d6ae74a5e8750ddea..f551bfcb3a518ceb0b0b403396d6b520fe780ad0 100644 (file)
@@ -128,7 +128,7 @@ private:
     DolphinMainWindow* m_mainWindow;
     KFileItem m_fileInfo;
     KUrl m_baseUrl;
     DolphinMainWindow* m_mainWindow;
     KFileItem m_fileInfo;
     KUrl m_baseUrl;
-    QList<KFileItem> m_selectedItems;
+    KFileItemList m_selectedItems;
     KUrl::List m_selectedUrls;
     int m_context;
 };
     KUrl::List m_selectedUrls;
     int m_context;
 };
index 696a016e96844f5b70e3f51710215782ffd75c36..38408d7bf341b31441f09b3d42204cf4a2e304c5 100644 (file)
@@ -240,7 +240,7 @@ void DolphinMainWindow::changeUrl(const KUrl& url)
     }
 }
 
     }
 }
 
-void DolphinMainWindow::changeSelection(const QList<KFileItem>& selection)
+void DolphinMainWindow::changeSelection(const KFileItemList& selection)
 {
     activeViewContainer()->view()->changeSelection(selection);
 }
 {
     activeViewContainer()->view()->changeSelection(selection);
 }
@@ -356,7 +356,7 @@ void DolphinMainWindow::slotAdditionalInfoChanged(KFileItemDelegate::Information
     }
 }
 
     }
 }
 
-void DolphinMainWindow::slotSelectionChanged(const QList<KFileItem>& selection)
+void DolphinMainWindow::slotSelectionChanged(const KFileItemList& selection)
 {
     updateEditActions();
 
 {
     updateEditActions();
 
@@ -1358,8 +1358,8 @@ void DolphinMainWindow::setupDockWidgets()
     addDockWidget(Qt::RightDockWidgetArea, infoDock);
     connect(this, SIGNAL(urlChanged(KUrl)),
             infoWidget, SLOT(setUrl(KUrl)));
     addDockWidget(Qt::RightDockWidgetArea, infoDock);
     connect(this, SIGNAL(urlChanged(KUrl)),
             infoWidget, SLOT(setUrl(KUrl)));
-    connect(this, SIGNAL(selectionChanged(QList<KFileItem>)),
-            infoWidget, SLOT(setSelection(QList<KFileItem>)));
+    connect(this, SIGNAL(selectionChanged(KFileItemList)),
+            infoWidget, SLOT(setSelection(KFileItemList)));
     connect(this, SIGNAL(requestItemInfo(KFileItem)),
             infoWidget, SLOT(requestDelayedItemInfo(KFileItem)));
 
     connect(this, SIGNAL(requestItemInfo(KFileItem)),
             infoWidget, SLOT(requestDelayedItemInfo(KFileItem)));
 
@@ -1379,8 +1379,8 @@ void DolphinMainWindow::setupDockWidgets()
             treeWidget, SLOT(setUrl(KUrl)));
     connect(treeWidget, SIGNAL(changeUrl(KUrl)),
             this, SLOT(changeUrl(KUrl)));
             treeWidget, SLOT(setUrl(KUrl)));
     connect(treeWidget, SIGNAL(changeUrl(KUrl)),
             this, SLOT(changeUrl(KUrl)));
-    connect(treeWidget, SIGNAL(changeSelection(QList<KFileItem>)),
-            this, SLOT(changeSelection(QList<KFileItem>)));
+    connect(treeWidget, SIGNAL(changeSelection(KFileItemList)),
+            this, SLOT(changeSelection(KFileItemList)));
     connect(treeWidget, SIGNAL(urlsDropped(KUrl::List, KUrl)),
             this, SLOT(dropUrls(KUrl::List, KUrl)));
 
     connect(treeWidget, SIGNAL(urlsDropped(KUrl::List, KUrl)),
             this, SLOT(dropUrls(KUrl::List, KUrl)));
 
@@ -1442,7 +1442,7 @@ void DolphinMainWindow::updateHistory()
 
 void DolphinMainWindow::updateEditActions()
 {
 
 void DolphinMainWindow::updateEditActions()
 {
-    const QList<KFileItem> list = m_activeViewContainer->view()->selectedItems();
+    const KFileItemList list = m_activeViewContainer->view()->selectedItems();
     if (list.isEmpty()) {
         stateChanged("has_no_selection");
     } else {
     if (list.isEmpty()) {
         stateChanged("has_no_selection");
     } else {
@@ -1455,8 +1455,8 @@ void DolphinMainWindow::updateEditActions()
 
         bool enableMoveToTrash = true;
 
 
         bool enableMoveToTrash = true;
 
-        QList<KFileItem>::const_iterator it = list.begin();
-        const QList<KFileItem>::const_iterator end = list.end();
+        KFileItemList::const_iterator it = list.begin();
+        const KFileItemList::const_iterator end = list.end();
         while (it != end) {
             const KUrl& url = (*it).url();
             // only enable the 'Move to Trash' action for local files
         while (it != end) {
             const KUrl& url = (*it).url();
             // only enable the 'Move to Trash' action for local files
@@ -1581,8 +1581,8 @@ void DolphinMainWindow::connectViewSignals(int viewIndex)
             this, SLOT(slotSortOrderChanged(Qt::SortOrder)));
     connect(view, SIGNAL(additionalInfoChanged(KFileItemDelegate::InformationList)),
             this, SLOT(slotAdditionalInfoChanged(KFileItemDelegate::InformationList)));
             this, SLOT(slotSortOrderChanged(Qt::SortOrder)));
     connect(view, SIGNAL(additionalInfoChanged(KFileItemDelegate::InformationList)),
             this, SLOT(slotAdditionalInfoChanged(KFileItemDelegate::InformationList)));
-    connect(view, SIGNAL(selectionChanged(QList<KFileItem>)),
-            this, SLOT(slotSelectionChanged(QList<KFileItem>)));
+    connect(view, SIGNAL(selectionChanged(KFileItemList)),
+            this, SLOT(slotSelectionChanged(KFileItemList)));
     connect(view, SIGNAL(requestItemInfo(KFileItem)),
             this, SLOT(slotRequestItemInfo(KFileItem)));
     connect(view, SIGNAL(activated()),
     connect(view, SIGNAL(requestItemInfo(KFileItem)),
             this, SLOT(slotRequestItemInfo(KFileItem)));
     connect(view, SIGNAL(activated()),
index 8970b89cb92e66e4918d08d46f736f0166d94de1..806399b6de56f4ec94b96c20507e03fa12bc3dc4 100644 (file)
@@ -122,7 +122,7 @@ public slots:
      * Inform all affected dolphin components that a selection change is
      * requested.
      */
      * Inform all affected dolphin components that a selection change is
      * requested.
      */
-    void changeSelection(const QList<KFileItem>& selection);
+    void changeSelection(const KFileItemList& selection);
 
     /** Stores all settings and quits Dolphin. */
     void quit();
 
     /** Stores all settings and quits Dolphin. */
     void quit();
@@ -138,7 +138,7 @@ signals:
      * Is sent if the selection of the currently active view has
      * been changed.
      */
      * Is sent if the selection of the currently active view has
      * been changed.
      */
-    void selectionChanged(const QList<KFileItem>& selection);
+    void selectionChanged(const KFileItemList& selection);
 
     /**
      * Is sent if the url of the currently active view has
 
     /**
      * Is sent if the url of the currently active view has
@@ -404,7 +404,7 @@ private slots:
      * Updates the state of the 'Edit' menu actions and emits
      * the signal selectionChanged().
      */
      * Updates the state of the 'Edit' menu actions and emits
      * the signal selectionChanged().
      */
-    void slotSelectionChanged(const QList<KFileItem>& selection);
+    void slotSelectionChanged(const KFileItemList& selection);
 
     /** Emits the signal requestItemInfo(). */
     void slotRequestItemInfo(const KFileItem&);
 
     /** Emits the signal requestItemInfo(). */
     void slotRequestItemInfo(const KFileItem&);
index 5bb59ec045113fc4124e33af0f6d61682601e7bc..092d2e14a68f39e9b44066a054c32cc9a6b234e5 100644 (file)
@@ -75,8 +75,8 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QStringLi
             this, SLOT(slotItemTriggered(KFileItem)));
     connect(m_view, SIGNAL(requestContextMenu(KFileItem, const KUrl&)),
             this, SLOT(slotOpenContextMenu(KFileItem, const KUrl&)));
             this, SLOT(slotItemTriggered(KFileItem)));
     connect(m_view, SIGNAL(requestContextMenu(KFileItem, const KUrl&)),
             this, SLOT(slotOpenContextMenu(KFileItem, const KUrl&)));
-    connect(m_view, SIGNAL(selectionChanged(QList<KFileItem>)),
-            m_extension, SIGNAL(selectionInfo(QList<KFileItem>)));
+    connect(m_view, SIGNAL(selectionChanged(KFileItemList)),
+            m_extension, SIGNAL(selectionInfo(KFileItemList)));
 
     connect(m_view, SIGNAL(requestItemInfo(KFileItem)),
             this, SLOT(slotRequestItemInfo(KFileItem)));
 
     connect(m_view, SIGNAL(requestItemInfo(KFileItem)),
             this, SLOT(slotRequestItemInfo(KFileItem)));
index d7cb2e333dbbcadbd28a1f2355f457656ce86504..30e3e7fe773b91376a6d9208c5fb9b9679947fe5 100644 (file)
@@ -304,7 +304,7 @@ void DolphinView::clearSelection()
     itemView()->selectionModel()->clear();
 }
 
     itemView()->selectionModel()->clear();
 }
 
-QList<KFileItem> DolphinView::selectedItems() const
+KFileItemList DolphinView::selectedItems() const
 {
     const QAbstractItemView* view = itemView();
 
 {
     const QAbstractItemView* view = itemView();
 
@@ -313,7 +313,7 @@ QList<KFileItem> DolphinView::selectedItems() const
     Q_ASSERT((view != 0) && (view->selectionModel() != 0));
 
     const QItemSelection selection = m_proxyModel->mapSelectionToSource(view->selectionModel()->selection());
     Q_ASSERT((view != 0) && (view->selectionModel() != 0));
 
     const QItemSelection selection = m_proxyModel->mapSelectionToSource(view->selectionModel()->selection());
-    QList<KFileItem> itemList;
+    KFileItemList itemList;
 
     const QModelIndexList indexList = selection.indexes();
     foreach (QModelIndex index, indexList) {
 
     const QModelIndexList indexList = selection.indexes();
     foreach (QModelIndex index, indexList) {
@@ -329,10 +329,9 @@ QList<KFileItem> DolphinView::selectedItems() const
 KUrl::List DolphinView::selectedUrls() const
 {
     KUrl::List urls;
 KUrl::List DolphinView::selectedUrls() const
 {
     KUrl::List urls;
-    const QList<KFileItem> list = selectedItems();
-    for ( QList<KFileItem>::const_iterator it = list.begin(), end = list.end();
-          it != end; ++it ) {
-        urls.append((*it).url());
+    const KFileItemList list = selectedItems();
+    foreach (KFileItem item, list) {
+        urls.append(item.url());
     }
     return urls;
 }
     }
     return urls;
 }
@@ -671,7 +670,7 @@ void DolphinView::applyViewProperties(const KUrl& url)
     }
 }
 
     }
 }
 
-void DolphinView::changeSelection(const QList<KFileItem>& selection)
+void DolphinView::changeSelection(const KFileItemList& selection)
 {
     clearSelection();
     if (selection.isEmpty()) {
 {
     clearSelection();
     if (selection.isEmpty()) {
index c2173b9ffde1314c47027cd502ed088b11197e28..96c649d97b58ce3cda2fc7c989a593fc5d89ade2 100644 (file)
@@ -224,7 +224,7 @@ public:
      * selected.
      * @see DolphinView::selectedUrls()
      */
      * selected.
      * @see DolphinView::selectedUrls()
      */
-    QList<KFileItem> selectedItems() const;
+    KFileItemList selectedItems() const;
 
     /**
      * Returns a list of URLs for all selected items. An empty list
 
     /**
      * Returns a list of URLs for all selected items. An empty list
@@ -320,7 +320,7 @@ public slots:
      * will actually get selected. The view will e.g. not select items which
      * are not in the currently displayed folder.
      */
      * will actually get selected. The view will e.g. not select items which
      * are not in the currently displayed folder.
      */
-    void changeSelection(const QList<KFileItem>& selection);
+    void changeSelection(const KFileItemList& selection);
 
 signals:
     /**
 
 signals:
     /**
@@ -372,7 +372,7 @@ signals:
     /**
      * Is emitted whenever the selection has been changed.
      */
     /**
      * Is emitted whenever the selection has been changed.
      */
-    void selectionChanged(const QList<KFileItem>& selection);
+    void selectionChanged(const KFileItemList& selection);
 
     /**
      * Is emitted if a context menu is requested for the item \a item,
 
     /**
      * Is emitted if a context menu is requested for the item \a item,
index bd4acc2be131a4ead94a600585dfc5f86b11dbd3..cb56f5c77c41392fed8b1ffe7a272ee3c7f70192 100644 (file)
@@ -190,7 +190,7 @@ bool DolphinViewContainer::isActive() const
 void DolphinViewContainer::renameSelectedItems()
 {
     DolphinViewContainer* view = m_mainWindow->activeViewContainer();
 void DolphinViewContainer::renameSelectedItems()
 {
     DolphinViewContainer* view = m_mainWindow->activeViewContainer();
-    const QList<KFileItem> items = m_view->selectedItems();
+    const KFileItemList items = m_view->selectedItems();
     if (items.count() > 1) {
         // More than one item has been selected for renaming. Open
         // a rename dialog and rename all items afterwards.
     if (items.count() > 1) {
         // More than one item has been selected for renaming. Open
         // a rename dialog and rename all items afterwards.
@@ -213,8 +213,8 @@ void DolphinViewContainer::renameSelectedItems()
             Q_ASSERT(replaceIndex >= 0);
             int index = 1;
 
             Q_ASSERT(replaceIndex >= 0);
             int index = 1;
 
-            QList<KFileItem>::const_iterator it = items.begin();
-            QList<KFileItem>::const_iterator end = items.end();
+            KFileItemList::const_iterator it = items.begin();
+            KFileItemList::const_iterator end = items.end();
             while (it != end) {
                 const KUrl& oldUrl = (*it).url();
                 QString number;
             while (it != end) {
                 const KUrl& oldUrl = (*it).url();
                 QString number;
@@ -374,7 +374,7 @@ QString DolphinViewContainer::defaultStatusBarText() const
 QString DolphinViewContainer::selectionStatusBarText() const
 {
     QString text;
 QString DolphinViewContainer::selectionStatusBarText() const
 {
     QString text;
-    const QList<KFileItem> list = m_view->selectedItems();
+    const KFileItemList list = m_view->selectedItems();
     if (list.isEmpty()) {
         // when an item is triggered, it is temporary selected but selectedItems()
         // will return an empty list
     if (list.isEmpty()) {
         // when an item is triggered, it is temporary selected but selectedItems()
         // will return an empty list
@@ -384,8 +384,8 @@ QString DolphinViewContainer::selectionStatusBarText() const
     int fileCount = 0;
     int folderCount = 0;
     KIO::filesize_t byteSize = 0;
     int fileCount = 0;
     int folderCount = 0;
     KIO::filesize_t byteSize = 0;
-    QList<KFileItem>::const_iterator it = list.begin();
-    const QList<KFileItem>::const_iterator end = list.end();
+    KFileItemList::const_iterator it = list.begin();
+    const KFileItemList::const_iterator end = list.end();
     while (it != end) {
         const KFileItem& item = *it;
         if (item.isDir()) {
     while (it != end) {
         const KFileItem& item = *it;
         if (item.isDir()) {
index 8ef1d3525f55434cbacf9c53cb80a41357c9be5a..b2705ec7f12dcb20c087c6820dd1c539a3f3260a 100644 (file)
@@ -118,7 +118,7 @@ void InfoSidebarPage::setUrl(const KUrl& url)
     }
 }
 
     }
 }
 
-void InfoSidebarPage::setSelection(const QList<KFileItem>& selection)
+void InfoSidebarPage::setSelection(const KFileItemList& selection)
 {
     SidebarPage::setSelection(selection);
     if (selection.size() == 1) {
 {
     SidebarPage::setSelection(selection);
     if (selection.size() == 1) {
@@ -173,7 +173,7 @@ void InfoSidebarPage::showItemInfo()
 
     cancelRequest();
 
 
     cancelRequest();
 
-    const QList<KFileItem>& selectedItems = selection();
+    const KFileItemList& selectedItems = selection();
 
     KUrl file;
     if (selectedItems.isEmpty()) {
 
     KUrl file;
     if (selectedItems.isEmpty()) {
@@ -279,7 +279,7 @@ void InfoSidebarPage::showMetaInfo()
 {
     QString text;
 
 {
     QString text;
 
-    const QList<KFileItem>& selectedItems = selection();
+    const KFileItemList& selectedItems = selection();
     if (selectedItems.size() <= 1) {
         KFileItem fileItem(S_IFDIR, KFileItem::Unknown, m_shownUrl);
         fileItem.refresh();
     if (selectedItems.size() <= 1) {
         KFileItem fileItem(S_IFDIR, KFileItem::Unknown, m_shownUrl);
         fileItem.refresh();
index 24e639dcd21d832d146c10dcf7d67d65d3b98234..ef014b3163d696146a8b83546ca394b1a3de536a 100644 (file)
@@ -59,7 +59,7 @@ public slots:
     virtual void setUrl(const KUrl& url);
 
     /** @see SidebarPage::setSelection() */
     virtual void setUrl(const KUrl& url);
 
     /** @see SidebarPage::setSelection() */
-    virtual void setSelection(const QList<KFileItem>& selection);
+    virtual void setSelection(const KFileItemList& selection);
 
     /**
      * Does a delayed request of information for the item \a item.
 
     /**
      * Does a delayed request of information for the item \a item.
index 113318cd00030bc79ffb6b4ffe745bf239a59c12..fc095c0f36a8a7fdc1a6f5067929899611c0f342 100644 (file)
@@ -26,7 +26,7 @@
 #include <QtGui/QLabel>
 #include <QtGui/QBoxLayout>
 
 #include <QtGui/QLabel>
 #include <QtGui/QBoxLayout>
 
-RenameDialog::RenameDialog(const QList<KFileItem>& items) :
+RenameDialog::RenameDialog(const KFileItemList& items) :
     KDialog(),
     m_renameOneItem(false)
 {
     KDialog(),
     m_renameOneItem(false)
 {
index 516411b3c0c8e5594093d4f7b754b2dcaf29bb29..f996e56cb65d3c8fc373c023e9399458a10c9cd8 100644 (file)
@@ -26,6 +26,7 @@
 
 
 class KFileItem;
 
 
 class KFileItem;
+class KFileItemList;
 class KLineEdit;
 
 /**
 class KLineEdit;
 
 /**
@@ -52,7 +53,7 @@ class LIBDOLPHINPRIVATE_EXPORT RenameDialog : public KDialog
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    explicit RenameDialog(const QList<KFileItem>& items);
+    explicit RenameDialog(const KFileItemList& items);
     virtual ~RenameDialog();
 
     /**
     virtual ~RenameDialog();
 
     /**
index 1543c8c78f64c9b335a009db723a74f3b6f2e676..889dc48c450389c9885296955d766abd787c8374 100644 (file)
@@ -39,7 +39,7 @@ const KUrl& SidebarPage::url() const
     return m_url;
 }
 
     return m_url;
 }
 
-const QList<KFileItem>& SidebarPage::selection() const
+const KFileItemList& SidebarPage::selection() const
 {
     return m_currentSelection;
 }
 {
     return m_currentSelection;
 }
@@ -49,7 +49,7 @@ void SidebarPage::setUrl(const KUrl& url)
     m_url = url;
 }
 
     m_url = url;
 }
 
-void SidebarPage::setSelection(const QList<KFileItem>& selection)
+void SidebarPage::setSelection(const KFileItemList& selection)
 {
     m_currentSelection = selection;
 }
 {
     m_currentSelection = selection;
 }
index 90f0194d3a6a2ad70fd1b469153f341ff254ac03..697e8de58d30688fec43271663ccc41b0014047f 100644 (file)
@@ -39,7 +39,7 @@ public:
     const KUrl& url() const;
 
     /** Returns the current selected items of the active Dolphin view. */
     const KUrl& url() const;
 
     /** Returns the current selected items of the active Dolphin view. */
-    const QList<KFileItem>& selection() const;
+    const KFileItemList& selection() const;
 
 public slots:
     /**
 
 public slots:
     /**
@@ -52,7 +52,7 @@ public slots:
      * This is invoked to inform the sidebar that the user has selected a new
      * set of items.
      */
      * This is invoked to inform the sidebar that the user has selected a new
      * set of items.
      */
-    virtual void setSelection(const QList<KFileItem>& selection);
+    virtual void setSelection(const KFileItemList& selection);
 
 signals:
     /**
 
 signals:
     /**
@@ -70,7 +70,7 @@ signals:
      * e.g. the current folder. The new selection will be reported via the
      * setSelection slot.
      */
      * e.g. the current folder. The new selection will be reported via the
      * setSelection slot.
      */
-    void changeSelection(const QList<KFileItem>& selection);
+    void changeSelection(const KFileItemList& selection);
 
     /**
      * This signal is emitted whenever a drop action on this widget needs the
 
     /**
      * This signal is emitted whenever a drop action on this widget needs the
@@ -80,7 +80,7 @@ signals:
 
 private:
     KUrl m_url;
 
 private:
     KUrl m_url;
-    QList<KFileItem> m_currentSelection;
+    KFileItemList m_currentSelection;
 };
 
 #endif // _SIDEBARPAGE_H_
 };
 
 #endif // _SIDEBARPAGE_H_
index 834456e02c09e0dbe7c4bbc081565882821a30f7..24bf7faa6812be2ba35aa10593e1eff484112e2f 100644 (file)
@@ -140,7 +140,7 @@ void TreeViewContextMenu::paste()
 
 void TreeViewContextMenu::rename()
 {
 
 void TreeViewContextMenu::rename()
 {
-    QList<KFileItem> item;
+    KFileItemList item;
     item.append(m_fileInfo);
     RenameDialog dialog(item);
     if (dialog.exec() == QDialog::Accepted) {
     item.append(m_fileInfo);
     RenameDialog dialog(item);
     if (dialog.exec() == QDialog::Accepted) {
index 680b2d3791c8853eb9e4deb6d77d83ebd3e6d5ec..27d8eddb85e1db89d4501a58235c470b9590678b 100644 (file)
@@ -140,7 +140,7 @@ void TreeViewSidebarPage::contextMenuEvent(QContextMenuEvent* event)
     const QModelIndex dolphinModelIndex = m_proxyModel->mapToSource(index);
     KFileItem item = m_dolphinModel->itemForIndex(dolphinModelIndex);
 
     const QModelIndex dolphinModelIndex = m_proxyModel->mapToSource(index);
     KFileItem item = m_dolphinModel->itemForIndex(dolphinModelIndex);
 
-    emit changeSelection(QList<KFileItem>());
+    emit changeSelection(KFileItemList());
     TreeViewContextMenu contextMenu(this, item);
     contextMenu.open();
 }
     TreeViewContextMenu contextMenu(this, item);
     contextMenu.open();
 }