diff options
Diffstat (limited to 'src/widgets/widgets/qlabel_p.h')
-rw-r--r-- | src/widgets/widgets/qlabel_p.h | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/src/widgets/widgets/qlabel_p.h b/src/widgets/widgets/qlabel_p.h index 4718a07614..d6127f1e54 100644 --- a/src/widgets/widgets/qlabel_p.h +++ b/src/widgets/widgets/qlabel_p.h @@ -26,14 +26,15 @@ #if QT_CONFIG(movie) #include "qmovie.h" #endif -#include "qimage.h" -#include "qbitmap.h" #include "qpicture.h" +#include "qpixmap.h" #if QT_CONFIG(menu) #include "qmenu.h" #endif -#include <optional> +#include <QtCore/qpointer.h> + +#include <array> QT_BEGIN_NAMESPACE @@ -50,12 +51,12 @@ public: QSize sizeForWidth(int w) const; #if QT_CONFIG(movie) - void _q_movieUpdated(const QRect&); - void _q_movieResized(const QSize&); + void movieUpdated(const QRect &rect); + void movieResized(const QSize &size); #endif #ifndef QT_NO_SHORTCUT void updateShortcut(); - void _q_buddyDeleted(); + void buddyDeleted(); #endif inline bool needTextControl() const { Q_Q(const QLabel); @@ -70,7 +71,7 @@ public: void ensureTextControl() const; void sendControlEvent(QEvent *e); - void _q_linkHovered(const QString &link); + void linkHovered(const QString &link); QRectF layoutRect() const; QRect documentRect() const; @@ -83,31 +84,31 @@ public: mutable QSize sh; mutable QSize msh; QString text; - std::optional<QPixmap> pixmap; - std::optional<QPixmap> scaledpixmap; - std::optional<QImage> cachedimage; + QPixmap pixmap; + QPixmap scaledpixmap; #ifndef QT_NO_PICTURE - std::optional<QPicture> picture; + QPicture picture; #endif #if QT_CONFIG(movie) QPointer<QMovie> movie; + std::array<QMetaObject::Connection, 2> movieConnections; #endif - mutable QWidgetTextControl *control; + mutable QWidgetTextControl *control = nullptr; mutable QTextCursor shortcutCursor; #ifndef QT_NO_CURSOR QCursor cursor; #endif #ifndef QT_NO_SHORTCUT QPointer<QWidget> buddy; - int shortcutId; + int shortcutId = 0; #endif - Qt::TextFormat textformat; - Qt::TextFormat effectiveTextFormat; - Qt::TextInteractionFlags textInteractionFlags; + Qt::TextFormat textformat = Qt::AutoText; + Qt::TextFormat effectiveTextFormat = Qt::PlainText; + Qt::TextInteractionFlags textInteractionFlags = Qt::LinksAccessibleByMouse; mutable QSizePolicy sizePolicy; - int margin; - ushort align; - short indent; + int margin = 0; + int align = Qt::AlignLeft | Qt::AlignVCenter | Qt::TextExpandTabs; + int indent = -1; mutable uint valid_hints : 1; uint scaledcontents : 1; mutable uint textLayoutDirty : 1; @@ -120,7 +121,7 @@ public: #endif uint openExternalLinks : 1; // <-- space for more bit field values here - QTextDocument::ResourceProvider resourceProvider; + QTextDocument::ResourceProvider resourceProvider = nullptr; friend class QMessageBoxPrivate; }; |