diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-05-28 16:41:49 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-06-03 15:14:42 +0200 |
commit | e4079eca49adce16e31dac2a18d49d7a55817891 (patch) | |
tree | 1dfb960ec1115b1f552afe8a013058542389505e /examples/widgets/tools | |
parent | f32a6cfb6b6236533508901f114ab57396da8ff3 (diff) | |
parent | ec6dc5f78453048c4f0604655a34c6c20c79d819 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/cmake
Take 5.
Change-Id: Ifb2d20e95ba824e45e667fba6c2ba45389991cc3
Diffstat (limited to 'examples/widgets/tools')
-rw-r--r-- | examples/widgets/tools/i18n/languagechooser.cpp | 7 | ||||
-rw-r--r-- | examples/widgets/tools/plugandpaint/app/interfaces.h | 6 | ||||
-rw-r--r-- | examples/widgets/tools/plugandpaint/app/paintarea.cpp | 2 |
3 files changed, 6 insertions, 9 deletions
diff --git a/examples/widgets/tools/i18n/languagechooser.cpp b/examples/widgets/tools/i18n/languagechooser.cpp index f07d0ddee3..963165ff81 100644 --- a/examples/widgets/tools/i18n/languagechooser.cpp +++ b/examples/widgets/tools/i18n/languagechooser.cpp @@ -163,11 +163,8 @@ QStringList LanguageChooser::findQmFiles() QDir dir(":/translations"); QStringList fileNames = dir.entryList(QStringList("*.qm"), QDir::Files, QDir::Name); - QMutableStringListIterator i(fileNames); - while (i.hasNext()) { - i.next(); - i.setValue(dir.filePath(i.value())); - } + for (QString &fileName : fileNames) + fileName = dir.filePath(fileName); return fileNames; } diff --git a/examples/widgets/tools/plugandpaint/app/interfaces.h b/examples/widgets/tools/plugandpaint/app/interfaces.h index a1e91e13ff..705e578809 100644 --- a/examples/widgets/tools/plugandpaint/app/interfaces.h +++ b/examples/widgets/tools/plugandpaint/app/interfaces.h @@ -68,7 +68,7 @@ QT_END_NAMESPACE class BrushInterface { public: - virtual ~BrushInterface() {} + virtual ~BrushInterface() = default; virtual QStringList brushes() const = 0; virtual QRect mousePress(const QString &brush, QPainter &painter, @@ -84,7 +84,7 @@ public: class ShapeInterface { public: - virtual ~ShapeInterface() {} + virtual ~ShapeInterface() = default; virtual QStringList shapes() const = 0; virtual QPainterPath generateShape(const QString &shape, @@ -96,7 +96,7 @@ public: class FilterInterface { public: - virtual ~FilterInterface() {} + virtual ~FilterInterface() = default; virtual QStringList filters() const = 0; virtual QImage filterImage(const QString &filter, const QImage &image, diff --git a/examples/widgets/tools/plugandpaint/app/paintarea.cpp b/examples/widgets/tools/plugandpaint/app/paintarea.cpp index 4295e04cc0..e225d78398 100644 --- a/examples/widgets/tools/plugandpaint/app/paintarea.cpp +++ b/examples/widgets/tools/plugandpaint/app/paintarea.cpp @@ -59,7 +59,7 @@ PaintArea::PaintArea(QWidget *parent) : QWidget(parent) { setAttribute(Qt::WA_StaticContents); - setAttribute(Qt::WA_NoBackground); + setAttribute(Qt::WA_OpaquePaintEvent); theImage.fill(qRgb(255, 255, 255)); } |