mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 17:40:05 +00:00
First pass fixes from discussions. Mostly linter fixes
This commit is contained in:
parent
91b4d6c2c2
commit
dc284974b3
14 changed files with 107 additions and 74 deletions
|
|
@ -6,11 +6,7 @@
|
|||
#include <QPixmap>
|
||||
#include <QSize>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace qt
|
||||
{
|
||||
namespace util
|
||||
namespace scwx::qt::util
|
||||
{
|
||||
|
||||
void modulateColors_(QImage& image, const QColor& color)
|
||||
|
|
@ -20,6 +16,9 @@ void modulateColors_(QImage& image, const QColor& color)
|
|||
QRgb* line = reinterpret_cast<QRgb*>(image.scanLine(y));
|
||||
for (int x = 0; x < image.width(); ++x)
|
||||
{
|
||||
// This is pulled from Qt Documentation
|
||||
// https://doc.qt.io/qt-6/qimage.html#scanLine
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
|
||||
QRgb& rgb = line[x];
|
||||
/* clang-format off
|
||||
* NOLINTBEGIN(cppcoreguidelines-narrowing-conversions, bugprone-narrowing-conversions)
|
||||
|
|
@ -62,6 +61,4 @@ QIcon modulateColors(const QIcon& icon, const QSize& size, const QColor& color)
|
|||
return QIcon(pixmap);
|
||||
}
|
||||
|
||||
} // namespace util
|
||||
} // namespace qt
|
||||
} // namespace scwx
|
||||
} // namespace scwx::qt::util
|
||||
|
|
|
|||
|
|
@ -6,17 +6,11 @@
|
|||
#include <QPixmap>
|
||||
#include <QSize>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace qt
|
||||
{
|
||||
namespace util
|
||||
namespace scwx::qt::util
|
||||
{
|
||||
|
||||
QImage modulateColors(const QImage& image, const QColor& color);
|
||||
QPixmap modulateColors(const QPixmap& pixmap, const QColor& color);
|
||||
QIcon modulateColors(const QIcon& icon, const QSize& size, const QColor& color);
|
||||
|
||||
} // namespace util
|
||||
} // namespace qt
|
||||
} // namespace scwx
|
||||
} // namespace scwx::qt::util
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue