diff options
author | Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> | 2016-04-28 16:18:15 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> | 2016-05-24 06:13:00 +0000 |
commit | a324194b5965b4232b01e38c32741eadc130e8d1 (patch) | |
tree | f0b0cd0f359566717252b9ec3c763166b63e65f8 /src/widgets/widgets/qwidgetlinecontrol_p.h | |
parent | 40074bc985f1fa5c859dc48aed84b48d4c17fff3 (diff) |
QWidgetLineControl::Command - delete default ctor.
While dealing with Coverity's CID 11424 ('missing initializer'), it was
recommended (by Marc, thanks) to get rid of Command's default ctor,
since it's apparently not needed at all (replacing QVector with std::vector also).
Change-Id: Ibe9d2789c67431a9810feb7db4fa1bce0b61921c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/widgets/widgets/qwidgetlinecontrol_p.h')
-rw-r--r-- | src/widgets/widgets/qwidgetlinecontrol_p.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/widgets/widgets/qwidgetlinecontrol_p.h b/src/widgets/widgets/qwidgetlinecontrol_p.h index 039453f0d5..3d8df9e3ff 100644 --- a/src/widgets/widgets/qwidgetlinecontrol_p.h +++ b/src/widgets/widgets/qwidgetlinecontrol_p.h @@ -61,6 +61,8 @@ #include "qplatformdefs.h" +#include <vector> + #ifdef DrawText # undef DrawText #endif @@ -461,7 +463,6 @@ private: // undo/redo handling enum CommandType { Separator, Insert, Remove, Delete, RemoveSelection, DeleteSelection, SetSelection }; struct Command { - inline Command() {} inline Command(CommandType t, int p, QChar c, int ss, int se) : type(t),uc(c),pos(p),selStart(ss),selEnd(se) {} uint type : 4; QChar uc; @@ -469,7 +470,7 @@ private: }; int m_modifiedState; int m_undoState; - QVector<Command> m_history; + std::vector<Command> m_history; void addCommand(const Command& cmd); inline void separate() { m_separator = true; } |