Merge lp:~aacid/unity8/warn_using_only_cache into lp:unity8

Proposed by Albert Astals Cid on 2015-10-27
Status: Merged
Approved by: Michael Terry on 2015-11-04
Approved revision: 2020
Merged at revision: 2042
Proposed branch: lp:~aacid/unity8/warn_using_only_cache
Merge into: lp:unity8
Diff against target: 11 lines (+1/-0)
1 file modified
src/CachingNetworkManagerFactory.cpp (+1/-0)
To merge this branch: bzr merge lp:~aacid/unity8/warn_using_only_cache
Reviewer Review Type Date Requested Status
Michael Terry 2015-10-27 Approve on 2015-11-04
PS Jenkins bot continuous-integration Needs Fixing on 2015-10-27
Review via email: mp+275851@code.launchpad.net

Commit Message

 Warn we're using only the cache when not connected to the interwebs

Description of the Change

 * Are there any related MPs required for this MP to build/function as expected?
No

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

 * Did you make sure that your branch does not contain spurious tags?
Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Michael Terry (mterry) wrote :

Did we have a hard time debugging a cache usage recently or something? Regardless, looks fine.

 * Did you perform an exploratory manual test run of the code change and any related functionality?
 Naw, this is just a debug print.

 * Did CI run pass? If not, please explain why.
 No, but for unrelated reasons.

 * Did you make sure that the branch does not contain spurious tags?
 Yes

review: Approve
Albert Astals Cid (aacid) wrote :

> Did we have a hard time debugging a cache usage recently or something?
There's an on an off bug of people not getting images in dash, it's probably not because of this thinks we're not connected and we're actually connected, want to make sure it's easier to find out if that's the case.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/CachingNetworkManagerFactory.cpp'
2--- src/CachingNetworkManagerFactory.cpp 2015-09-14 09:11:08 +0000
3+++ src/CachingNetworkManagerFactory.cpp 2015-10-27 14:19:56 +0000
4@@ -30,6 +30,7 @@
5 QNetworkReply* CachingNetworkAccessManager::createRequest(Operation op, const QNetworkRequest &request, QIODevice *outgoingData)
6 {
7 if (m_networkingStatus->status() != ubuntu::connectivity::NetworkingStatus::Status::Online) {
8+ qDebug() << "Not connected to the internet. Request for" << request.url().toString() << "will be served only from the cache.";
9 QNetworkRequest req(request);
10 req.setAttribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::AlwaysCache);
11 return QNetworkAccessManager::createRequest(op, req, outgoingData);

Subscribers

People subscribed via source and target branches