Merge lp:~zsombi/ubuntu-ui-toolkit/qt57fix into lp:ubuntu-ui-toolkit/staging

Proposed by Zsombor Egri
Status: Merged
Approved by: Timo Jyrinki
Approved revision: 2144
Merged at revision: 2144
Proposed branch: lp:~zsombi/ubuntu-ui-toolkit/qt57fix
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 30 lines (+19/-1)
1 file modified
src/UbuntuToolkit/ucthemingextension.cpp (+19/-1)
To merge this branch: bzr merge lp:~zsombi/ubuntu-ui-toolkit/qt57fix
Reviewer Review Type Date Requested Status
ubuntu-sdk-build-bot continuous-integration Approve
Timo Jyrinki Approve
Review via email: mp+309769@code.launchpad.net

Commit message

Qt5.7 related fix for theming - by Glen Whitney

Description of the change

Qt5.7 related fix for theming

To post a comment you must log in.
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Excellent fix, we will need this!

review: Approve
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/UbuntuToolkit/ucthemingextension.cpp'
2--- src/UbuntuToolkit/ucthemingextension.cpp 2016-09-12 14:07:38 +0000
3+++ src/UbuntuToolkit/ucthemingextension.cpp 2016-11-01 15:42:15 +0000
4@@ -95,7 +95,25 @@
5
6 UCItemAttached::~UCItemAttached()
7 {
8- QQuickItemPrivate::get(m_item)->removeItemChangeListener(this, QQuickItemPrivate::Parent);
9+ /*
10+ * Apparent problem: the UCItemAttached for a given item may be
11+ * destructed along with the user data for that item, which
12+ * occurs after the QQuickItemPrivate destructor has run, in the
13+ * destructor for the base class QObjectPrivate of
14+ * QQuickItemPrivate. At that point, the destructors of the
15+ * members of QQuickItemPrivate have already been called, so
16+ * accessing those members via a member function is invalid.
17+ * In particular, the changeListeners list of the
18+ * QQuickItemPrivate has already been destructed, so it does
19+ * not have much of a chance of removing a listener. We
20+ * must detect this and avoid the call to it. Fortunately
21+ * the base class QObjectPrivate has a flag wasDeleted that
22+ * should still be valid at this point.
23+ */
24+ QQuickItemPrivate* itemPriv = QQuickItemPrivate::get(m_item);
25+ if (!(itemPriv->wasDeleted)) {
26+ itemPriv->removeItemChangeListener(this, QQuickItemPrivate::Parent);
27+ }
28 }
29
30 bool UCThemingExtension::isThemed(QQuickItem *item)

Subscribers

People subscribed via source and target branches