summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.cpp2
-rw-r--r--src/widgets/itemviews/qheaderview.cpp2
-rw-r--r--src/widgets/kernel/qwidget.cpp3
3 files changed, 5 insertions, 2 deletions
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp
index cef1d1b6da..fdf21fb499 100644
--- a/src/widgets/graphicsview/qgraphicsitem.cpp
+++ b/src/widgets/graphicsview/qgraphicsitem.cpp
@@ -1579,6 +1579,7 @@ QGraphicsItem::~QGraphicsItem()
QObjectPrivate *p = QObjectPrivate::get(o);
p->wasDeleted = true;
if (p->declarativeData) {
+ p->wasDeleted = true; // needed, so that destroying the declarative data does the right thing
if (static_cast<QAbstractDeclarativeDataImpl*>(p->declarativeData)->ownedByQml1) {
if (QAbstractDeclarativeData::destroyed_qml1)
QAbstractDeclarativeData::destroyed_qml1(p->declarativeData, o);
@@ -1587,6 +1588,7 @@ QGraphicsItem::~QGraphicsItem()
QAbstractDeclarativeData::destroyed(p->declarativeData, o);
}
p->declarativeData = 0;
+ p->wasDeleted = false;
}
}
diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp
index 00e9ff7400..9a8206de45 100644
--- a/src/widgets/itemviews/qheaderview.cpp
+++ b/src/widgets/itemviews/qheaderview.cpp
@@ -2725,7 +2725,7 @@ void QHeaderView::mouseMoveEvent(QMouseEvent *e)
statusTip = d->model->headerData(logical, d->orientation, Qt::StatusTipRole).toString();
if (d->shouldClearStatusTip || !statusTip.isEmpty()) {
QStatusTipEvent tip(statusTip);
- QCoreApplication::sendEvent(d->parent, &tip);
+ QCoreApplication::sendEvent(d->parent ? d->parent : this, &tip);
d->shouldClearStatusTip = !statusTip.isEmpty();
}
#endif // !QT_NO_STATUSTIP
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 41f9d69c12..5f1f6d880a 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -1677,8 +1677,8 @@ QWidget::~QWidget()
}
}
- d->wasDeleted = true;
if (d->declarativeData) {
+ d->wasDeleted = true; // needed, so that destroying the declarative data does the right thing
if (static_cast<QAbstractDeclarativeDataImpl*>(d->declarativeData)->ownedByQml1) {
if (QAbstractDeclarativeData::destroyed_qml1)
QAbstractDeclarativeData::destroyed_qml1(d->declarativeData, this);
@@ -1687,6 +1687,7 @@ QWidget::~QWidget()
QAbstractDeclarativeData::destroyed(d->declarativeData, this);
}
d->declarativeData = 0; // don't activate again in ~QObject
+ d->wasDeleted = false;
}
d->blockSig = blocked;