┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Freyther <[email protected]>2006-12-10 21:01:38 +0000
committerHolger Freyther <[email protected]>2006-12-10 21:01:38 +0000
commit6cb02408e418ca864c9e02d55f3358a1a7c64a15 (patch)
treeeca595a4bdbf5204411a9af85b2b399a530a56cb
parent328de208710faebaa275e2ef8ddb28a78ea5a2f0 (diff)
Use a QLinkedList instead of Q3PtrList
svn path=/trunk/playground/utils/dolphin/; revision=612313
-rw-r--r--src/dolphincontextmenu.cpp9
-rw-r--r--src/dolphinmainwindow.cpp11
-rw-r--r--src/dolphinmainwindow.h12
3 files changed, 16 insertions, 16 deletions
diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp
index a2403a826..4c04170d6 100644
--- a/src/dolphincontextmenu.cpp
+++ b/src/dolphincontextmenu.cpp
@@ -91,12 +91,9 @@ void DolphinContextMenu::openViewportContextMenu()
createNewMenu->insertSeparator();
- QAction* action = 0;
-
- Q3PtrListIterator<KAction> fileGrouptIt(dolphin->fileGroupActions());
- while ((action = fileGrouptIt.current()) != 0) {
- createNewMenu->addAction(action);
- ++fileGrouptIt;
+ QLinkedListIterator<QAction*> fileGrouptIt(dolphin->fileGroupActions());
+ while (fileGrouptIt.hasNext()) {
+ createNewMenu->addAction(fileGrouptIt.next());
}
// TODO: not used yet. See documentation of Dolphin::linkGroupActions()
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index 61b7bb221..4fa3cef31 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -86,17 +86,20 @@ DolphinMainWindow::DolphinMainWindow() :
m_view[PrimaryIdx] = 0;
m_view[SecondaryIdx] = 0;
- m_fileGroupActions.setAutoDelete(true);
-
// TODO: the following members are not used yet. See documentation
// of DolphinMainWindow::linkGroupActions() and DolphinMainWindow::linkToDeviceActions()
// in the header file for details.
- //m_linkGroupActions.setAutoDelete(true);
- //m_linkToDeviceActions.setAutoDelete(true);
}
DolphinMainWindow::~DolphinMainWindow()
{
+ qDeleteAll(m_fileGroupActions);
+ //qDeleteAll(m_linkToDeviceActions);
+ //qDeleteAll(m_linkGroupActions);
+ m_fileGroupActions.clear();
+ //m_linkGroupActions.clear();
+ //m_linkToDeviceActions.clear();
+
/*
* bye, bye managed window
*/
diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h
index 064bf1867..62327b469 100644
--- a/src/dolphinmainwindow.h
+++ b/src/dolphinmainwindow.h
@@ -104,9 +104,9 @@ public:
* of the 'Create New...' sub menu. Usually the list contains actions
* for creating folders, text files, HTML files etc.
*/
- const Q3PtrList<KAction>& fileGroupActions() const { return m_fileGroupActions; }
- //const QPtrList<KAction>& linkGroupActions() const { return m_linkGroupActions; }
- //const QPtrList<KAction>& linkToDeviceActions() const { return m_linkToDeviceActions; }
+ QLinkedList<QAction*> fileGroupActions() const { return m_fileGroupActions; }
+ //QLinkedList<QAction*>& linkGroupActions() const { return m_linkGroupActions; }
+ //QLinkedList<QAction*>& linkToDeviceActions() const { return m_linkToDeviceActions; }
/**
* Refreshs the views of the main window by recreating them dependent from
@@ -440,13 +440,13 @@ private:
QString comment;
};
- Q3PtrList<KAction> m_fileGroupActions;
+ QLinkedList<QAction*> m_fileGroupActions;
KSortableList<CreateFileEntry,QString> m_createFileTemplates;
// TODO: not used yet. See documentation of DolphinMainWindow::linkGroupActions()
// and DolphinMainWindow::linkToDeviceActions() in for details.
- //QPtrList<KAction> m_linkGroupActions;
- //QPtrList<KAction> m_linkToDeviceActions;
+ //QLinkedList<QAction*> m_linkGroupActions;
+ //QLinkedList<QAction*> m_linkToDeviceActions;
};
#endif // _DOLPHIN_H_