diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-06-01 13:56:59 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-07-07 05:22:18 +0000 |
commit | 48d7a53abf53e2798ce532f5f9c2b38d3806d430 (patch) | |
tree | eb1be0037b2c338f323a870fb39d9330a559bfcc /src/widgets/widgets/qlabel.cpp | |
parent | 3d788fc0f1adab960446ef9074ccfcda964a8391 (diff) |
QLabelPrivate: separate data and function members, avoid padding
sizeof(QLabelPrivate) only goes down from 640 to 632 (on 64-bit),
but we now have a non-conditional data member as the last member,
so the ctor-init-list doesn't look quite so ugly anymore.
Change-Id: I51f7e56d92cfcca4f35128595c829e2f3f887c72
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/widgets/widgets/qlabel.cpp')
-rw-r--r-- | src/widgets/widgets/qlabel.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/widgets/widgets/qlabel.cpp b/src/widgets/widgets/qlabel.cpp index 905c5ce7ef..e58a3e8211 100644 --- a/src/widgets/widgets/qlabel.cpp +++ b/src/widgets/widgets/qlabel.cpp @@ -57,9 +57,6 @@ QLabelPrivate::QLabelPrivate() : QFramePrivate(), sh(), msh(), - valid_hints(false), - sizePolicy(), - margin(0), text(), pixmap(Q_NULLPTR), scaledpixmap(Q_NULLPTR), @@ -70,29 +67,33 @@ QLabelPrivate::QLabelPrivate() #ifndef QT_NO_MOVIE movie(), #endif + control(Q_NULLPTR), + shortcutCursor(), +#ifndef QT_NO_CURSOR + cursor(), +#endif #ifndef QT_NO_SHORTCUT buddy(), shortcutId(0), #endif + textformat(Qt::AutoText), + textInteractionFlags(Qt::LinksAccessibleByMouse), + sizePolicy(), + margin(0), align(Qt::AlignLeft | Qt::AlignVCenter | Qt::TextExpandTabs), indent(-1), + valid_hints(false), scaledcontents(false), textLayoutDirty(false), textDirty(false), isRichText(false), isTextLabel(false), hasShortcut(/*???*/), - textformat(Qt::AutoText), - control(Q_NULLPTR), - shortcutCursor(), - textInteractionFlags(Qt::LinksAccessibleByMouse), - openExternalLinks(false) #ifndef QT_NO_CURSOR - , validCursor(false), onAnchor(false), - cursor() #endif + openExternalLinks(false) { } |