clang-format

This commit is contained in:
Luis Ángel San Martín
2021-10-18 21:56:52 +02:00
parent 78e0c522d2
commit 5aa02a19bb
190 changed files with 2286 additions and 2286 deletions

View File

@ -13,7 +13,7 @@ void LocalComicListModel::load(QList<ComicDB> &comics)
QModelIndex LocalComicListModel::parent(const QModelIndex &index) const
{
Q_UNUSED(index)
return QModelIndex(); //no parent
return QModelIndex(); // no parent
}
int LocalComicListModel::rowCount(const QModelIndex &parent) const
@ -40,7 +40,7 @@ QVariant LocalComicListModel::data(const QModelIndex &index, int role) const
return QVariant();
}
if (role == Qt::TextAlignmentRole) {
//TODO
// TODO
}
if (role != Qt::DisplayRole)
@ -48,10 +48,10 @@ QVariant LocalComicListModel::data(const QModelIndex &index, int role) const
int row = index.row();
//if(row < _data.count())
// if(row < _data.count())
return _data[row].getFileName();
//else
//return QVariant();
// else
// return QVariant();
}
Qt::ItemFlags LocalComicListModel::flags(const QModelIndex &index) const

View File

@ -13,7 +13,7 @@ public:
void load(QList<ComicDB> &comics);
//QAbstractItemModel methods
// QAbstractItemModel methods
QModelIndex parent(const QModelIndex &index) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent) const override;

View File

@ -54,7 +54,7 @@ void VolumeComicsModel::load(const QString &json)
QModelIndex VolumeComicsModel::parent(const QModelIndex &index) const
{
Q_UNUSED(index)
return QModelIndex(); //no parent
return QModelIndex(); // no parent
}
int VolumeComicsModel::rowCount(const QModelIndex &parent) const
@ -84,7 +84,7 @@ QVariant VolumeComicsModel::data(const QModelIndex &index, int role) const
return QVariant();
}
if (role == Qt::TextAlignmentRole) {
switch (column) //TODO obtener esto de la query
switch (column) // TODO obtener esto de la query
{
case ISSUE:
return QVariant(Qt::AlignRight | Qt::AlignVCenter);
@ -112,7 +112,7 @@ Qt::ItemFlags VolumeComicsModel::flags(const QModelIndex &index) const
QVariant VolumeComicsModel::headerData(int section, Qt::Orientation orientation, int role) const
{
if (orientation == Qt::Horizontal && role == Qt::DisplayRole) {
switch (section) //TODO obtener esto de la query
switch (section) // TODO obtener esto de la query
{
case ISSUE:
return QVariant(QString("issue"));
@ -122,7 +122,7 @@ QVariant VolumeComicsModel::headerData(int section, Qt::Orientation orientation,
}
if (orientation == Qt::Horizontal && role == Qt::TextAlignmentRole) {
switch (section) //TODO obtener esto de la query
switch (section) // TODO obtener esto de la query
{
case ISSUE:
return QVariant(Qt::AlignRight | Qt::AlignVCenter);

View File

@ -9,7 +9,7 @@ class VolumeComicsModel : public JSONModel
public:
explicit VolumeComicsModel(QObject *parent = nullptr);
void load(const QString &json) override;
//void load(const QStringList & jsonList);
// void load(const QStringList & jsonList);
QModelIndex parent(const QModelIndex &index) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;

View File

@ -10,7 +10,7 @@ VolumesModel::VolumesModel(QObject *parent)
VolumesModel::~VolumesModel()
{
//std::for_each(_data.begin(), _data.end(), [](QList<QString> * ptr) { delete ptr; });
// std::for_each(_data.begin(), _data.end(), [](QList<QString> * ptr) { delete ptr; });
}
void VolumesModel::load(const QString &json)
@ -23,7 +23,7 @@ void VolumesModel::load(const QString &json)
return;
}
int numResults = sc.value("number_of_total_results").toInt(); //fix to weird behaviour using hasNext
int numResults = sc.value("number_of_total_results").toInt(); // fix to weird behaviour using hasNext
QListIterator<QVariant> it(sc.value("results").toList());
bool test;
QVariantMap resultsValue;
@ -48,7 +48,7 @@ void VolumesModel::load(const QString &json)
QModelIndex VolumesModel::parent(const QModelIndex &index) const
{
Q_UNUSED(index)
return QModelIndex(); //no parent
return QModelIndex(); // no parent
}
int VolumesModel::rowCount(const QModelIndex &parent) const
@ -110,7 +110,7 @@ QVariant VolumesModel::headerData(int section, Qt::Orientation orientation, int
{
if (orientation == Qt::Horizontal && role == Qt::DisplayRole) {
switch (section) //TODO obtener esto de la query
switch (section) // TODO obtener esto de la query
{
case SERIES:
return QVariant(QString("series"));
@ -124,7 +124,7 @@ QVariant VolumesModel::headerData(int section, Qt::Orientation orientation, int
}
if (orientation == Qt::Horizontal && role == Qt::TextAlignmentRole) {
switch (section) //TODO obtener esto de la query
switch (section) // TODO obtener esto de la query
{
case YEAR:
return QVariant(Qt::AlignRight | Qt::AlignVCenter);

View File

@ -9,10 +9,10 @@ class VolumesModel : public JSONModel
public:
explicit VolumesModel(QObject *parent = nullptr);
virtual ~VolumesModel();
//receive a valid json with a list of volumes
// receive a valid json with a list of volumes
void load(const QString &json) override;
//QAbstractItemModel methods
// QAbstractItemModel methods
QModelIndex parent(const QModelIndex &index) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent) const override;