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

@ -7,14 +7,14 @@ using namespace YACReader;
void YACReader::addSperator(QWidget *w)
{
QAction * separator = new QAction(w);
QAction *separator = new QAction(w);
separator->setSeparator(true);
w->addAction(separator);
}
QAction * YACReader::createSeparator()
QAction *YACReader::createSeparator()
{
QAction * a = new QAction(0);
QAction *a = new QAction(0);
a->setSeparator(true);
return a;
}
@ -23,20 +23,20 @@ QIcon YACReader::noHighlightedIcon(const QString &path)
{
QPixmap p(path);
QIcon icon;//(path);
icon.addFile(path,p.size(),QIcon::Normal);
icon.addFile(path,p.size(),QIcon::Selected);
QIcon icon; //(path);
icon.addFile(path, p.size(), QIcon::Normal);
icon.addFile(path, p.size(), QIcon::Selected);
return icon;
}
void YACReader::colorize(QImage &img, QColor &col)
{
QRgb *data = (QRgb *)img.bits();
QRgb *end = data + img.width()*img.height();
QRgb *end = data + img.width() * img.height();
int rcol = col.red(), gcol = col.green(), bcol = col.blue();
while(data != end) {
*data = qRgba(rcol,gcol,bcol,qAlpha(*data));
while (data != end) {
*data = qRgba(rcol, gcol, bcol, qAlpha(*data));
++data;
}
}
@ -45,7 +45,7 @@ QList<qulonglong> YACReader::mimeDataToComicsIds(const QMimeData *data)
{
QList<qulonglong> comicIds;
QByteArray rawData = data->data(YACReader::YACReaderLibrarComiscSelectionMimeDataFormat);
QDataStream in(&rawData,QIODevice::ReadOnly);
in >> comicIds; //deserialize the list of indentifiers
QDataStream in(&rawData, QIODevice::ReadOnly);
in >> comicIds; //deserialize the list of indentifiers
return comicIds;
}