summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/widgets/widgets/qlabel.cpp21
-rw-r--r--src/widgets/widgets/qlabel_p.h69
2 files changed, 47 insertions, 43 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)
{
}
diff --git a/src/widgets/widgets/qlabel_p.h b/src/widgets/widgets/qlabel_p.h
index d3ad25be6f..bd7a9d1e8f 100644
--- a/src/widgets/widgets/qlabel_p.h
+++ b/src/widgets/widgets/qlabel_p.h
@@ -72,43 +72,13 @@ public:
void updateLabel();
QSize sizeForWidth(int w) const;
- mutable QSize sh;
- mutable QSize msh;
- mutable bool valid_hints;
- mutable QSizePolicy sizePolicy;
- int margin;
- QString text;
- QPixmap *pixmap;
- QPixmap *scaledpixmap;
- QImage *cachedimage;
-#ifndef QT_NO_PICTURE
- QPicture *picture;
-#endif
#ifndef QT_NO_MOVIE
- QPointer<QMovie> movie;
void _q_movieUpdated(const QRect&);
void _q_movieResized(const QSize&);
#endif
#ifndef QT_NO_SHORTCUT
void updateShortcut();
#endif
-#ifndef QT_NO_SHORTCUT
- QPointer<QWidget> buddy;
- int shortcutId;
-#endif
- ushort align;
- short indent;
- uint scaledcontents :1;
- mutable uint textLayoutDirty : 1;
- mutable uint textDirty : 1;
- mutable uint isRichText : 1;
- mutable uint isTextLabel : 1;
- mutable uint hasShortcut : 1;
- Qt::TextFormat textformat;
- mutable QWidgetTextControl *control;
- mutable QTextCursor shortcutCursor;
- Qt::TextInteractionFlags textInteractionFlags;
-
inline bool needTextControl() const {
return isTextLabel
&& (isRichText
@@ -130,13 +100,46 @@ public:
QMenu *createStandardContextMenu(const QPoint &pos);
#endif
- bool openExternalLinks;
-
+ mutable QSize sh;
+ mutable QSize msh;
+ QString text;
+ QPixmap *pixmap;
+ QPixmap *scaledpixmap;
+ QImage *cachedimage;
+#ifndef QT_NO_PICTURE
+ QPicture *picture;
+#endif
+#ifndef QT_NO_MOVIE
+ QPointer<QMovie> movie;
+#endif
+ mutable QWidgetTextControl *control;
+ mutable QTextCursor shortcutCursor;
+#ifndef QT_NO_CURSOR
+ QCursor cursor;
+#endif
+#ifndef QT_NO_SHORTCUT
+ QPointer<QWidget> buddy;
+ int shortcutId;
+#endif
+ Qt::TextFormat textformat;
+ Qt::TextInteractionFlags textInteractionFlags;
+ mutable QSizePolicy sizePolicy;
+ int margin;
+ ushort align;
+ short indent;
+ mutable uint valid_hints : 1;
+ uint scaledcontents : 1;
+ mutable uint textLayoutDirty : 1;
+ mutable uint textDirty : 1;
+ mutable uint isRichText : 1;
+ mutable uint isTextLabel : 1;
+ mutable uint hasShortcut : 1;
#ifndef QT_NO_CURSOR
uint validCursor : 1;
uint onAnchor : 1;
- QCursor cursor;
#endif
+ uint openExternalLinks : 1;
+ // <-- space for more bit field values here
friend class QMessageBoxPrivate;
};