diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2019-05-24 22:06:09 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2019-08-14 18:36:27 +0000 |
commit | d473f216b9a34a0e6272533dc11e885eebfe4191 (patch) | |
tree | d67e2c533545b38aff86ba34e4b4659f5f8b89a2 /src/widgets/kernel/qwidget_p.h | |
parent | 94d7603d5114eacaf648e0b0d2dcae5e161e0217 (diff) |
QWidget: replace manual memory management with unique_ptr [2/N]: topextra->icon
I wonder whether a QIcon could be aggregated here by value,
as it has a null state and its default ctor sets d = nullptr.
Change-Id: I7a0f46e9fdd51a93afb5db768d46d93b08f307ec
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/widgets/kernel/qwidget_p.h')
-rw-r--r-- | src/widgets/kernel/qwidget_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/kernel/qwidget_p.h b/src/widgets/kernel/qwidget_p.h index 8fb325c763..435aae2950 100644 --- a/src/widgets/kernel/qwidget_p.h +++ b/src/widgets/kernel/qwidget_p.h @@ -164,7 +164,7 @@ struct QTLWExtra { // *************************** Cross-platform variables ***************************** // Regular pointers (keep them together to avoid gaps on 64 bits architectures). - QIcon *icon; // widget icon + std::unique_ptr<QIcon> icon; // widget icon QWidgetBackingStoreTracker backingStoreTracker; QBackingStore *backingStore; QPainter *sharedPainter; |