diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-06-04 08:49:58 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-06-11 09:23:57 +0200 |
commit | fac0dcbeef6a0c23e780b9751c17883ec9918d6f (patch) | |
tree | 82ba10f4f93ebb02968c0e65a90f3daeea552b83 /src/designer/src/lib/shared/iconselector.cpp | |
parent | dbbe4be100e757ff17ca6b8533946c7b55880f8d (diff) | |
download | qttools-fac0dcbeef6a0c23e780b9751c17883ec9918d6f.tar.gz |
Qt Designer: introduce member initialization
Fix warnings emitted by clang, use default constructors where
applicable.
Initialize remaining member variables about which clang warns
about missing initialization in the constructor.
Change-Id: Ic23a1f36f7507dc728ca6daf0d2067727125c0a9
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src/designer/src/lib/shared/iconselector.cpp')
-rw-r--r-- | src/designer/src/lib/shared/iconselector.cpp | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/src/designer/src/lib/shared/iconselector.cpp b/src/designer/src/lib/shared/iconselector.cpp index 139d61b90..d2bf33a13 100644 --- a/src/designer/src/lib/shared/iconselector.cpp +++ b/src/designer/src/lib/shared/iconselector.cpp @@ -176,10 +176,10 @@ static inline QPixmap emptyPixmap() class IconSelectorPrivate { - IconSelector *q_ptr; + IconSelector *q_ptr = nullptr; Q_DECLARE_PUBLIC(IconSelector) public: - IconSelectorPrivate(); + IconSelectorPrivate() = default; void slotStateActivated(); void slotSetActivated(); @@ -195,30 +195,17 @@ public: QMap<int, QPair<QIcon::Mode, QIcon::State> > m_indexToState; const QIcon m_emptyIcon; - QComboBox *m_stateComboBox; - QToolButton *m_iconButton; - QAction *m_resetAction; - QAction *m_resetAllAction; + QComboBox *m_stateComboBox = nullptr; + QToolButton *m_iconButton = nullptr; + QAction *m_resetAction = nullptr; + QAction *m_resetAllAction = nullptr; PropertySheetIconValue m_icon; - DesignerIconCache *m_iconCache; - DesignerPixmapCache *m_pixmapCache; - QtResourceModel *m_resourceModel; - QDesignerFormEditorInterface *m_core; + DesignerIconCache *m_iconCache = nullptr; + DesignerPixmapCache *m_pixmapCache = nullptr; + QtResourceModel *m_resourceModel = nullptr; + QDesignerFormEditorInterface *m_core = nullptr; }; -IconSelectorPrivate::IconSelectorPrivate() : - q_ptr(0), - m_emptyIcon(emptyPixmap()), - m_stateComboBox(0), - m_iconButton(0), - m_resetAction(0), - m_resetAllAction(0), - m_iconCache(0), - m_pixmapCache(0), - m_resourceModel(0), - m_core(0) -{ -} void IconSelectorPrivate::slotUpdate() { QIcon icon; |