diff --git a/tdeio/tdefile/kicondialog.cpp b/tdeio/tdefile/kicondialog.cpp index ecf804d6a..74ff72d11 100644 --- a/tdeio/tdefile/kicondialog.cpp +++ b/tdeio/tdefile/kicondialog.cpp @@ -16,6 +16,7 @@ #include #include +#include #include @@ -32,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -401,17 +401,16 @@ void TDEIconDialog::showIcons() else filelist=mFileList; - TQPtrList iconlist; - iconlist.setAutoDelete(true); + std::list iconlist; TQStringList::Iterator it; for( it = filelist.begin(); it != filelist.end(); ++it ) - iconlist.append(new IconPath(*it)); + iconlist.push_back(IconPath(*it)); iconlist.sort(); filelist.clear(); - for ( IconPath *ip=iconlist.first(); ip != 0; ip=iconlist.next() ) - filelist.append(*ip); + for (const IconPath &ip : iconlist) + filelist.append(ip); d->searchLine->clear(); mpCanvas->loadFiles(filelist);