Replace potentially unterminated std::string::data() for pre-c++11

This commit is contained in:
Beta
2014-06-22 23:33:45 +02:00
commit 8c73ce7e81
752 changed files with 69350 additions and 0 deletions

View File

@ -0,0 +1,29 @@
#include "comics_remover.h"
#include <QFile>
ComicsRemover::ComicsRemover(QModelIndexList & il, QList<QString> & ps, QObject *parent) :
QThread(parent),indexList(il), paths(ps)
{
}
void ComicsRemover::run()
{
QString currentComicPath;
QListIterator<QModelIndex> i(indexList);
QListIterator<QString> i2(paths);
i.toBack();
i2.toBack();
while (i.hasPrevious() && i2.hasPrevious())
{
QModelIndex mi = i.previous();
currentComicPath = i2.previous();
if(QFile::remove(currentComicPath))
emit remove(mi.row());
else
emit removeError();
}
emit finished();
}