Format code using clang-format

This commit is contained in:
Luis Ángel San Martín
2019-05-30 19:46:37 +02:00
parent e0eb94e3ae
commit e3ec56aa43
356 changed files with 19824 additions and 21874 deletions

View File

@ -5,38 +5,35 @@
#include "QsLog.h"
ComicsRemover::ComicsRemover(QModelIndexList & il, QList<QString> & ps, qulonglong parentId, QObject *parent)
:QObject(parent),indexList(il), paths(ps), parentId(parentId)
ComicsRemover::ComicsRemover(QModelIndexList &il, QList<QString> &ps, qulonglong parentId, QObject *parent)
: QObject(parent), indexList(il), paths(ps), parentId(parentId)
{
}
void ComicsRemover::process()
{
QString currentComicPath;
QListIterator<QModelIndex> i(indexList);
QListIterator<QString> i2(paths);
i.toBack();
i2.toBack();
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();
}
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();
emit finished();
emit removedItemsFromFolder(parentId);
}
FoldersRemover::FoldersRemover(QModelIndexList &il, QList<QString> &ps, QObject *parent)
:QObject(parent),indexList(il), paths(ps)
: QObject(parent), indexList(il), paths(ps)
{
}
void FoldersRemover::process()
@ -49,12 +46,11 @@ void FoldersRemover::process()
QLOG_DEBUG() << "Deleting folders" << paths.at(0);
while (i.hasPrevious() && i2.hasPrevious())
{
while (i.hasPrevious() && i2.hasPrevious()) {
QModelIndex mi = i.previous();
currentFolderPath = i2.previous();
QDir d(currentFolderPath);
if(d.removeRecursively() || !d.exists()) //the folder is in the DB but no in the drive...
if (d.removeRecursively() || !d.exists()) //the folder is in the DB but no in the drive...
emit remove(mi);
else
emit removeError();