mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 21:14:33 -04:00
Format code using clang-format
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user