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
=== modified file 'src/UbuntuToolkit/ucthemingextension.cpp'
--- src/UbuntuToolkit/ucthemingextension.cpp 2016-09-12 14:07:38 +0000
+++ src/UbuntuToolkit/ucthemingextension.cpp 2016-11-01 15:42:15 +0000
@@ -95,7 +95,25 @@
9595
96UCItemAttached::~UCItemAttached()96UCItemAttached::~UCItemAttached()
97{97{
98 QQuickItemPrivate::get(m_item)->removeItemChangeListener(this, QQuickItemPrivate::Parent);98 /*
99 * Apparent problem: the UCItemAttached for a given item may be
100 * destructed along with the user data for that item, which
101 * occurs after the QQuickItemPrivate destructor has run, in the
102 * destructor for the base class QObjectPrivate of
103 * QQuickItemPrivate. At that point, the destructors of the
104 * members of QQuickItemPrivate have already been called, so
105 * accessing those members via a member function is invalid.
106 * In particular, the changeListeners list of the
107 * QQuickItemPrivate has already been destructed, so it does
108 * not have much of a chance of removing a listener. We
109 * must detect this and avoid the call to it. Fortunately
110 * the base class QObjectPrivate has a flag wasDeleted that
111 * should still be valid at this point.
112 */
113 QQuickItemPrivate* itemPriv = QQuickItemPrivate::get(m_item);
114 if (!(itemPriv->wasDeleted)) {
115 itemPriv->removeItemChangeListener(this, QQuickItemPrivate::Parent);
116 }
99}117}
100118
101bool UCThemingExtension::isThemed(QQuickItem *item)119bool UCThemingExtension::isThemed(QQuickItem *item)

Subscribers

People subscribed via source and target branches