┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2007-10-02 19:03:03 +0000
committerPeter Penz <[email protected]>2007-10-02 19:03:03 +0000
commitba150e5735bd336752f713df1e9f66b7ed90e6ae (patch)
treeba9a0cd18fd9b78e810af113f21b8061756f23a8
parent4a2416e4bd9b646772d0c1da52a7e57a4cf8ec04 (diff)
replace QList<KFileItem> by KFileItemList, as KFileItemList is not QList<KFileItem*> anymore since todays update of kfileitem.* in kdelibs
svn path=/trunk/KDE/kdebase/apps/; revision=720234
-rw-r--r--src/dolphincontextmenu.h2
-rw-r--r--src/dolphinmainwindow.cpp22
-rw-r--r--src/dolphinmainwindow.h6
-rw-r--r--src/dolphinpart.cpp4
-rw-r--r--src/dolphinview.cpp13
-rw-r--r--src/dolphinview.h6
-rw-r--r--src/dolphinviewcontainer.cpp12
-rw-r--r--src/infosidebarpage.cpp6
-rw-r--r--src/infosidebarpage.h2
-rw-r--r--src/renamedialog.cpp2
-rw-r--r--src/renamedialog.h3
-rw-r--r--src/sidebarpage.cpp4
-rw-r--r--src/sidebarpage.h8
-rw-r--r--src/treeviewcontextmenu.cpp2
-rw-r--r--src/treeviewsidebarpage.cpp2
15 files changed, 47 insertions, 47 deletions
diff --git a/src/dolphincontextmenu.h b/src/dolphincontextmenu.h
index e6bfb9c28..f551bfcb3 100644
--- a/src/dolphincontextmenu.h
+++ b/src/dolphincontextmenu.h
@@ -128,7 +128,7 @@ private:
DolphinMainWindow* m_mainWindow;
KFileItem m_fileInfo;
KUrl m_baseUrl;
- QList<KFileItem> m_selectedItems;
+ KFileItemList m_selectedItems;
KUrl::List m_selectedUrls;
int m_context;
};
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index 696a016e9..38408d7bf 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -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);
}
@@ -356,7 +356,7 @@ void DolphinMainWindow::slotAdditionalInfoChanged(KFileItemDelegate::Information
}
}
-void DolphinMainWindow::slotSelectionChanged(const QList<KFileItem>& selection)
+void DolphinMainWindow::slotSelectionChanged(const KFileItemList& selection)
{
updateEditActions();
@@ -1358,8 +1358,8 @@ void DolphinMainWindow::setupDockWidgets()
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)));
@@ -1379,8 +1379,8 @@ void DolphinMainWindow::setupDockWidgets()
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)));
@@ -1442,7 +1442,7 @@ void DolphinMainWindow::updateHistory()
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 {
@@ -1455,8 +1455,8 @@ void DolphinMainWindow::updateEditActions()
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
@@ -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)));
- 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()),
diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h
index 8970b89cb..806399b6d 100644
--- a/src/dolphinmainwindow.h
+++ b/src/dolphinmainwindow.h
@@ -122,7 +122,7 @@ public slots:
* 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();
@@ -138,7 +138,7 @@ signals:
* 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
@@ -404,7 +404,7 @@ private slots:
* 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&);
diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp
index 5bb59ec04..092d2e14a 100644
--- a/src/dolphinpart.cpp
+++ b/src/dolphinpart.cpp
@@ -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&)));
- 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)));
diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp
index d7cb2e333..30e3e7fe7 100644
--- a/src/dolphinview.cpp
+++ b/src/dolphinview.cpp
@@ -304,7 +304,7 @@ void DolphinView::clearSelection()
itemView()->selectionModel()->clear();
}
-QList<KFileItem> DolphinView::selectedItems() const
+KFileItemList DolphinView::selectedItems() const
{
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());
- QList<KFileItem> itemList;
+ KFileItemList itemList;
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;
- 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;
}
@@ -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()) {
diff --git a/src/dolphinview.h b/src/dolphinview.h
index c2173b9ff..96c649d97 100644
--- a/src/dolphinview.h
+++ b/src/dolphinview.h
@@ -224,7 +224,7 @@ public:
* selected.
* @see DolphinView::selectedUrls()
*/
- QList<KFileItem> selectedItems() const;
+ KFileItemList selectedItems() const;
/**
* 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.
*/
- void changeSelection(const QList<KFileItem>& selection);
+ void changeSelection(const KFileItemList& selection);
signals:
/**
@@ -372,7 +372,7 @@ signals:
/**
* 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,
diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp
index bd4acc2be..cb56f5c77 100644
--- a/src/dolphinviewcontainer.cpp
+++ b/src/dolphinviewcontainer.cpp
@@ -190,7 +190,7 @@ bool DolphinViewContainer::isActive() const
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.
@@ -213,8 +213,8 @@ void DolphinViewContainer::renameSelectedItems()
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;
@@ -374,7 +374,7 @@ QString DolphinViewContainer::defaultStatusBarText() const
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
@@ -384,8 +384,8 @@ QString DolphinViewContainer::selectionStatusBarText() const
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()) {
diff --git a/src/infosidebarpage.cpp b/src/infosidebarpage.cpp
index 8ef1d3525..b2705ec7f 100644
--- a/src/infosidebarpage.cpp
+++ b/src/infosidebarpage.cpp
@@ -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) {
@@ -173,7 +173,7 @@ void InfoSidebarPage::showItemInfo()
cancelRequest();
- const QList<KFileItem>& selectedItems = selection();
+ const KFileItemList& selectedItems = selection();
KUrl file;
if (selectedItems.isEmpty()) {
@@ -279,7 +279,7 @@ void InfoSidebarPage::showMetaInfo()
{
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();
diff --git a/src/infosidebarpage.h b/src/infosidebarpage.h
index 24e639dcd..ef014b316 100644
--- a/src/infosidebarpage.h
+++ b/src/infosidebarpage.h
@@ -59,7 +59,7 @@ public slots:
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.
diff --git a/src/renamedialog.cpp b/src/renamedialog.cpp
index 113318cd0..fc095c0f3 100644
--- a/src/renamedialog.cpp
+++ b/src/renamedialog.cpp
@@ -26,7 +26,7 @@
#include <QtGui/QLabel>
#include <QtGui/QBoxLayout>
-RenameDialog::RenameDialog(const QList<KFileItem>& items) :
+RenameDialog::RenameDialog(const KFileItemList& items) :
KDialog(),
m_renameOneItem(false)
{
diff --git a/src/renamedialog.h b/src/renamedialog.h
index 516411b3c..f996e56cb 100644
--- a/src/renamedialog.h
+++ b/src/renamedialog.h
@@ -26,6 +26,7 @@
class KFileItem;
+class KFileItemList;
class KLineEdit;
/**
@@ -52,7 +53,7 @@ class LIBDOLPHINPRIVATE_EXPORT RenameDialog : public KDialog
Q_OBJECT
public:
- explicit RenameDialog(const QList<KFileItem>& items);
+ explicit RenameDialog(const KFileItemList& items);
virtual ~RenameDialog();
/**
diff --git a/src/sidebarpage.cpp b/src/sidebarpage.cpp
index 1543c8c78..889dc48c4 100644
--- a/src/sidebarpage.cpp
+++ b/src/sidebarpage.cpp
@@ -39,7 +39,7 @@ const KUrl& SidebarPage::url() const
return m_url;
}
-const QList<KFileItem>& SidebarPage::selection() const
+const KFileItemList& SidebarPage::selection() const
{
return m_currentSelection;
}
@@ -49,7 +49,7 @@ void SidebarPage::setUrl(const KUrl& url)
m_url = url;
}
-void SidebarPage::setSelection(const QList<KFileItem>& selection)
+void SidebarPage::setSelection(const KFileItemList& selection)
{
m_currentSelection = selection;
}
diff --git a/src/sidebarpage.h b/src/sidebarpage.h
index 90f0194d3..697e8de58 100644
--- a/src/sidebarpage.h
+++ b/src/sidebarpage.h
@@ -39,7 +39,7 @@ public:
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:
/**
@@ -52,7 +52,7 @@ public slots:
* 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:
/**
@@ -70,7 +70,7 @@ signals:
* 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
@@ -80,7 +80,7 @@ signals:
private:
KUrl m_url;
- QList<KFileItem> m_currentSelection;
+ KFileItemList m_currentSelection;
};
#endif // _SIDEBARPAGE_H_
diff --git a/src/treeviewcontextmenu.cpp b/src/treeviewcontextmenu.cpp
index 834456e02..24bf7faa6 100644
--- a/src/treeviewcontextmenu.cpp
+++ b/src/treeviewcontextmenu.cpp
@@ -140,7 +140,7 @@ void TreeViewContextMenu::paste()
void TreeViewContextMenu::rename()
{
- QList<KFileItem> item;
+ KFileItemList item;
item.append(m_fileInfo);
RenameDialog dialog(item);
if (dialog.exec() == QDialog::Accepted) {
diff --git a/src/treeviewsidebarpage.cpp b/src/treeviewsidebarpage.cpp
index 680b2d379..27d8eddb8 100644
--- a/src/treeviewsidebarpage.cpp
+++ b/src/treeviewsidebarpage.cpp
@@ -140,7 +140,7 @@ void TreeViewSidebarPage::contextMenuEvent(QContextMenuEvent* event)
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();
}