1
0
mirror of https://invent.kde.org/system/dolphin synced 2024-07-04 17:30:55 +00:00

Use a QLinkedList instead of Q3PtrList

svn path=/trunk/playground/utils/dolphin/; revision=612313
This commit is contained in:
Holger Freyther 2006-12-10 21:01:38 +00:00
parent 328de20871
commit 6cb02408e4
3 changed files with 16 additions and 16 deletions

View File

@ -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()

View File

@ -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
*/

View File

@ -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_