aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickloader_p_p.h
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2020-02-12 13:29:08 +0100
committerFabian Kosmale <fabian.kosmale@qt.io>2020-02-12 14:47:35 +0100
commit1a7ca47a7a92945e16006ddd00adea186535cdd5 (patch)
treea5029ce5c620ee525848da2daeb6a34c65c1518b /src/quick/items/qquickloader_p_p.h
parent70120c931faa0c6139354c75fcf8d39b77ec3b4a (diff)
QQuickLoader: store status
This allows us to emit the change signal only when the status has actually changed. Due to alignment restrictions, this does not even change the size of the class. Fixes: QTBUG-82002 Change-Id: I2192bf80e72b92108046780811c3acdab39af518 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/quick/items/qquickloader_p_p.h')
-rw-r--r--src/quick/items/qquickloader_p_p.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/quick/items/qquickloader_p_p.h b/src/quick/items/qquickloader_p_p.h
index 349b5c6c06..39d50280c5 100644
--- a/src/quick/items/qquickloader_p_p.h
+++ b/src/quick/items/qquickloader_p_p.h
@@ -96,6 +96,8 @@ public:
void disposeInitialPropertyValues();
static QUrl resolveSourceUrl(QQmlV4Function *args);
QV4::ReturnedValue extractInitialPropertyValues(QQmlV4Function *args, QObject *loader, bool *error);
+ QQuickLoader::Status computeStatus() const;
+ void updateStatus();
qreal getImplicitWidth() const override;
qreal getImplicitHeight() const override;
@@ -112,6 +114,11 @@ public:
bool active : 1;
bool loadingFromSource : 1;
bool asynchronous : 1;
+ // We need to use char instead of QQuickLoader::Status
+ // as otherwise the size of the class would increase
+ // on 32-bit systems, as sizeof(Status) == sizeof(int)
+ // and sizeof(int) > remaining padding on 32 bit
+ char status;
void _q_sourceLoaded();
void _q_updateSize(bool loaderGeometryChanged = true);