diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-07-08 23:20:56 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-07-08 23:20:56 +0200 |
commit | 90940a774eab876c38d5cef981b4be5bae67a462 (patch) | |
tree | 2e60edc1719ffd53752a55a7f0444166965e90c5 /tracker-rs | |
parent | e3292e1ddaa8d69eb320d2700fc582b4675cf8ce (diff) |
modernize only
Diffstat (limited to 'tracker-rs')
-rw-r--r-- | tracker-rs/imagewidget.cpp | 5 | ||||
-rw-r--r-- | tracker-rs/imagewidget.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/tracker-rs/imagewidget.cpp b/tracker-rs/imagewidget.cpp index 63986234..50a904f5 100644 --- a/tracker-rs/imagewidget.cpp +++ b/tracker-rs/imagewidget.cpp @@ -6,6 +6,7 @@ */ #include "imagewidget.h" +#include <utility> #include <QPainter> ImageWidget::ImageWidget(QWidget *parent) : @@ -14,11 +15,11 @@ ImageWidget::ImageWidget(QWidget *parent) : mImage.fill(Qt::gray); } -void ImageWidget::setImage(const QImage image) +void ImageWidget::setImage(QImage image) { { QMutexLocker lock(&mMutex); - mImage = image; + mImage = std::move(image); } repaint(); } diff --git a/tracker-rs/imagewidget.h b/tracker-rs/imagewidget.h index e8b6e61e..f04eb1a3 100644 --- a/tracker-rs/imagewidget.h +++ b/tracker-rs/imagewidget.h @@ -15,7 +15,7 @@ class ImageWidget : public QWidget { Q_OBJECT public: ImageWidget(QWidget* parent = 0); - void setImage(const QImage image); + void setImage(QImage image); private: QImage mImage; |