diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/fx/qfxitem.cpp | 2 | ||||
-rw-r--r-- | src/declarative/util/qfxview.cpp | 10 | ||||
-rw-r--r-- | src/declarative/util/qfxview.h | 1 |
3 files changed, 11 insertions, 2 deletions
diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp index 9131256..6b4c504 100644 --- a/src/declarative/fx/qfxitem.cpp +++ b/src/declarative/fx/qfxitem.cpp @@ -1658,7 +1658,7 @@ void QFxItem::classBegin() void QFxItem::classComplete() { #ifdef Q_ENABLE_PERFORMANCE_LOG - QFxPerfTimer<QFxPerf::ItemClassComplete> cc; + QFxPerfTimer<QFxPerf::ItemComponentComplete> cc; #endif Q_D(QFxItem); d->_classComplete = true; diff --git a/src/declarative/util/qfxview.cpp b/src/declarative/util/qfxview.cpp index a8b8eea..993d5cb 100644 --- a/src/declarative/util/qfxview.cpp +++ b/src/declarative/util/qfxview.cpp @@ -228,7 +228,9 @@ void QFxView::continueExecute() QPerformanceLog::displayData(); QPerformanceLog::clear(); d->root = item; - emit sceneResized(QSize(item->width(), item->height())); + connect(item, SIGNAL(widthChanged()), this, SLOT(sizeChanged())); + connect(item, SIGNAL(heightChanged()), this, SLOT(sizeChanged())); + sizeChanged(); } else if(QWidget *wid = qobject_cast<QWidget *>(obj)) { window()->setAttribute(Qt::WA_OpaquePaintEvent, false); window()->setAttribute(Qt::WA_NoSystemBackground, false); @@ -246,6 +248,12 @@ void QFxView::continueExecute() } } +void QFxView::sizeChanged() +{ + if (d->root) + emit sceneResized(QSize(d->root->width(),d->root->height())); +} + QFxItem* QFxView::addItem(const QString &xml, QFxItem* parent) { if(!d->root) diff --git a/src/declarative/util/qfxview.h b/src/declarative/util/qfxview.h index b5592b8..3c4be20 100644 --- a/src/declarative/util/qfxview.h +++ b/src/declarative/util/qfxview.h @@ -89,6 +89,7 @@ Q_SIGNALS: private Q_SLOTS: void continueExecute(); + void sizeChanged(); protected: virtual void resizeEvent(QResizeEvent *); |