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

Proposed by Alberto Mardegan
Status: Merged
Approved by: Ken VanDine
Approved revision: 88
Merged at revision: 88
Proposed branch: lp:~mardy/signon-ui/lp1171853
Merge into: lp:signon-ui
Diff against target: 32 lines (+8/-0)
1 file modified
src/browser-request.cpp (+8/-0)
To merge this branch: bzr merge lp:~mardy/signon-ui/lp1171853
Reviewer Review Type Date Requested Status
Ken VanDine Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+160579@code.launchpad.net

Commit message

Cancel fail timer when a load is in progress

If a page is loading, don't make the request fail.

Description of the change

This makes the failure handling a bit more robust (or less hacky).

Cancel fail timer when a load is in progress

If a page is loading, don't make the request fail.

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
Ken VanDine (ken-vandine) wrote :

Better!

review: Approve

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 2013-04-23 14:18:50 +0000
3+++ src/browser-request.cpp 2013-04-24 09:23:54 +0000
4@@ -238,6 +238,7 @@
5
6 private Q_SLOTS:
7 void onUrlChanged(const QUrl &url);
8+ void onLoadProgress();
9 void onLoadFinished(bool ok);
10 void onFailTimer();
11 void onFinished();
12@@ -327,6 +328,11 @@
13 setupViewForUrl(url);
14 }
15
16+void BrowserRequestPrivate::onLoadProgress()
17+{
18+ m_failTimer.stop();
19+}
20+
21 void BrowserRequestPrivate::onLoadFinished(bool ok)
22 {
23 TRACE() << "Load finished" << ok;
24@@ -457,6 +463,8 @@
25 setupViewForUrl(url);
26 QObject::connect(m_webView, SIGNAL(urlChanged(const QUrl&)),
27 this, SLOT(onUrlChanged(const QUrl&)));
28+ QObject::connect(m_webView, SIGNAL(loadProgress(int)),
29+ this, SLOT(onLoadProgress()));
30 QObject::connect(m_webView, SIGNAL(loadFinished(bool)),
31 this, SLOT(onLoadFinished(bool)));
32 m_webViewLayout->addWidget(m_webView);

Subscribers

People subscribed via source and target branches

to all changes: