Merge lp:~mardy/signon-ui/lp1111507 into lp:signon-ui

Proposed by Alberto Mardegan
Status: Merged
Approved by: Alberto Mardegan
Approved revision: 81
Merged at revision: 81
Proposed branch: lp:~mardy/signon-ui/lp1111507
Merge into: lp:signon-ui
Diff against target: 23 lines (+5/-1)
1 file modified
src/browser-request.cpp (+5/-1)
To merge this branch: bzr merge lp:~mardy/signon-ui/lp1111507
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
David King (community) Approve
Review via email: mp+154619@code.launchpad.net

Commit message

Prevent a double deletion of the browser dialog

Description of the change

Prevent a double deletion of the browser dialog

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
David King (amigadave) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
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/browser-request.cpp'
2--- src/browser-request.cpp 2012-11-13 10:12:54 +0000
3+++ src/browser-request.cpp 2013-03-21 07:31:20 +0000
4@@ -31,6 +31,7 @@
5 #include <QLabel>
6 #include <QNetworkCookie>
7 #include <QNetworkRequest>
8+#include <QPointer>
9 #include <QProgressBar>
10 #include <QPushButton>
11 #include <QRegExp>
12@@ -251,7 +252,10 @@
13
14 private:
15 mutable BrowserRequest *q_ptr;
16- Dialog *m_dialog;
17+ /* The dialog can be deleted by the Request class, if it's set as children
18+ * of an embedded widget which is then deleted. Therefore, in order to
19+ * avoid a double deletion, guard the pointer with a QPointer. */
20+ QPointer<Dialog> m_dialog;
21 QStackedLayout *m_dialogLayout;
22 QWidget *m_webViewPage;
23 QWidget *m_successPage;

Subscribers

People subscribed via source and target branches

to all changes: