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()
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
*/
* 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
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_