#include <assert.h>#include <cstdio>#include <ctype.h>#include <qlineedit.h>#include <qlistview.h>#include <stdlib.h>#include <qfiledialog.h>#include <stdio.h>#include <qradiobutton.h>#include <qmessagebox.h>#include "renamer.h"#include "selector.h"#include "scripts.h"#include "capacity.h"#include "song-iterator.h"#include "info.h"#include "qt-helpers.h"
Classes | |
| class | UpdateSongFilename |
| class | UpdateIndexedSong |
Defines | |
| #define | FOREACH(operation) |
Functions | |
| for (set< QTreeWidgetItem * >::iterator it2=todelete.begin();it2!=todelete.end();it2++) delete(*it2) | |
| renamer | start_dialog () |
| #define FOREACH | ( | operation | ) |
{ \
map<QTreeWidgetItem*,QString> newtexts; \
QTreeWidgetItemIterator it(NameList); \
for(;*it;++it) { \
QTreeWidgetItem * item = *it; \
if (item->isSelected()) \
newtexts[item]=operation(item->text(0)); \
} \
for(map<QTreeWidgetItem*,QString>::iterator it=newtexts.begin(); \
it!=newtexts.end(); it++) \
it->first->setText(0,it->second); \
}
Since Qt4 a modification to a text item directly resorts the surrounding item list, the interator looses completely track. This double iteration deals with that.
Referenced by RenamerLogic::removeSpaces(), and RenamerLogic::removeSpecials().
| for | ( | set< QTreeWidgetItem * >::iterator | it2 = todelete.begin();it2!=todelete.end();it2++ |
) |
Delete this part of the selection
| renamer start_dialog | ( | ) |
1.6.2