diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-02-03 17:09:10 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-02-06 22:11:27 +0000 |
commit | 4715ca7bc54fc1f30dd7e603a396c876d667c92c (patch) | |
tree | c18936b1b194f7820dfbe5c74214f252ec0a10e6 /examples/corelib/threads/queuedcustomtype/block.cpp | |
parent | 7910dd0a548cdd9e7c5716d4f6704b3185fa34fb (diff) |
Cleanup QtCore examples
Cleanup QtCore examples:
- use new signal/slot syntax
- use 0 instead nullptr
- remove unneeded includes
- use initializer lists
- replace foreach with range-based-for loop
Change-Id: I5581f485fa0e9ccf3f4ce6f643908832bc6959bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'examples/corelib/threads/queuedcustomtype/block.cpp')
-rw-r--r-- | examples/corelib/threads/queuedcustomtype/block.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/examples/corelib/threads/queuedcustomtype/block.cpp b/examples/corelib/threads/queuedcustomtype/block.cpp index a5058cc5ae..9cfad8673c 100644 --- a/examples/corelib/threads/queuedcustomtype/block.cpp +++ b/examples/corelib/threads/queuedcustomtype/block.cpp @@ -48,8 +48,6 @@ ** ****************************************************************************/ -#include <QColor> -#include <QRect> #include "block.h" Block::Block() @@ -57,9 +55,8 @@ Block::Block() } Block::Block(const Block &other) + : m_rect(other.m_rect), m_color(other.m_color) { - m_rect = other.m_rect; - m_color = other.m_color; } Block::~Block() @@ -67,9 +64,8 @@ Block::~Block() } Block::Block(const QRect &rect, const QColor &color) + : m_rect(rect), m_color(color) { - m_rect = rect; - m_color = color; } QColor Block::color() const |