Merge lp:~mandel/ubuntu-download-manager/change-wifi-default into lp:ubuntu-download-manager

Proposed by Manuel de la Peña on 2015-02-02
Status: Merged
Approved by: Michael Sheldon on 2015-02-02
Approved revision: 338
Merged at revision: 337
Proposed branch: lp:~mandel/ubuntu-download-manager/change-wifi-default
Merge into: lp:ubuntu-download-manager
Diff against target: 109 lines (+28/-26)
4 files modified
src/common/priv/ubuntu/transfers/transfer.h (+10/-10)
src/downloads/qml/single_download.h (+5/-5)
tests/downloads/daemon/test_download.cpp (+2/-0)
tests/downloads/daemon/test_download.h (+11/-11)
To merge this branch: bzr merge lp:~mandel/ubuntu-download-manager/change-wifi-default
Reviewer Review Type Date Requested Status
Michael Sheldon (community) 2015-02-02 Approve on 2015-02-02
PS Jenkins bot continuous-integration Approve on 2015-02-02
Review via email: mp+248226@code.launchpad.net

Commit Message

Set the defaults to allow modile data usage so that we ensure that client applications dot no have to set it per download.

Description of the Change

Set the defaults to allow modile data usage so that we ensure that client applications dot no have to set it per download. This change is performed on the udm server side and therefore no rebuild or change is needed in the client apps.

To post a comment you must log in.
338. By Manuel de la Peña on 2015-02-02

Update the default value of the qml binding.

Michael Sheldon (michael-sheldon) wrote :

Looks good, tested with browser and image downloads are no longer queued.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/common/priv/ubuntu/transfers/transfer.h'
2--- src/common/priv/ubuntu/transfers/transfer.h 2014-11-17 20:34:24 +0000
3+++ src/common/priv/ubuntu/transfers/transfer.h 2015-02-02 11:23:00 +0000
4@@ -97,16 +97,16 @@
5 private:
6 bool _isValid = true;
7 bool _addToQueue = true;
8- QString _lastError = "";
9- QString _id;
10- QString _appId;
11- qulonglong _throttle;
12- bool _allowMobileData;
13- Transfer::State _state;
14- QString _dbusPath;
15- bool _isConfined;
16- QString _rootPath;
17- System::NetworkSession* _networkSession;
18+ QString _lastError = QString::null;
19+ QString _id = QString::null;
20+ QString _appId = QString::null;
21+ qulonglong _throttle = 0;
22+ bool _allowMobileData = true;
23+ Transfer::State _state = State::IDLE;
24+ QString _dbusPath = QString::null;
25+ bool _isConfined = true;
26+ QString _rootPath = QString::null;
27+ System::NetworkSession* _networkSession = nullptr;
28 };
29
30 } // Transfers
31
32=== modified file 'src/downloads/qml/single_download.h'
33--- src/downloads/qml/single_download.h 2014-09-23 14:19:37 +0000
34+++ src/downloads/qml/single_download.h 2015-02-02 11:23:00 +0000
35@@ -158,13 +158,13 @@
36 }
37
38 private:
39- bool m_autoStart;
40- bool m_completed;
41- bool m_downloading;
42+ bool m_autoStart = false;
43+ bool m_completed = false;
44+ bool m_downloading = false;
45 bool m_dirty = false;
46- bool m_downloadInProgress;
47+ bool m_downloadInProgress = false;
48 int m_progress;
49- bool m_mobile = false;
50+ bool m_mobile = true;
51 qulonglong m_throttle = 0;
52 QVariantMap m_headers;
53 Metadata* m_metadata = nullptr;
54
55=== modified file 'tests/downloads/daemon/test_download.cpp'
56--- tests/downloads/daemon/test_download.cpp 2015-01-22 22:08:41 +0000
57+++ tests/downloads/daemon/test_download.cpp 2015-02-02 11:23:00 +0000
58@@ -123,6 +123,7 @@
59 QCOMPARE(download->state(), Download::IDLE);
60 QCOMPARE(download->progress(), 0ULL);
61 QCOMPARE(download->totalSize(), 0ULL);
62+ QVERIFY(download->isGSMDataAllowed());
63 verifyMocks();
64 }
65
66@@ -173,6 +174,7 @@
67 QCOMPARE(download->state(), Download::IDLE);
68 QCOMPARE(download->progress(), 0ULL);
69 QCOMPARE(download->totalSize(), 0ULL);
70+ QVERIFY(download->isGSMDataAllowed());
71 verifyMocks();
72 }
73
74
75=== modified file 'tests/downloads/daemon/test_download.h'
76--- tests/downloads/daemon/test_download.h 2015-01-22 22:08:41 +0000
77+++ tests/downloads/daemon/test_download.h 2015-02-02 11:23:00 +0000
78@@ -196,20 +196,20 @@
79 void testDataUriPostProcessing();
80
81 private:
82- QString _id;
83- QString _appId;
84- bool _isConfined;
85- QString _rootPath;
86+ QString _id = QString::null;
87+ QString _appId = QString::null;
88+ bool _isConfined = false;
89+ QString _rootPath = QString::null;
90 QVariantMap _metadata;
91 QMap<QString, QString> _headers;
92- QString _path;
93+ QString _path = QString::null;
94 QUrl _url;
95- QString _algo;
96- MockNetworkSession* _networkSession;
97- MockRequestFactory* _reqFactory;
98- MockProcessFactory* _processFactory;
99- MockFileManager* _fileManager;
100- MockCryptographicHashFactory* _cryptoFactory;
101+ QString _algo = QString::null;
102+ MockNetworkSession* _networkSession = nullptr;
103+ MockRequestFactory* _reqFactory = nullptr;
104+ MockProcessFactory* _processFactory = nullptr;
105+ MockFileManager* _fileManager = nullptr;
106+ MockCryptographicHashFactory* _cryptoFactory = nullptr;
107 };
108
109 Q_DECLARE_METATYPE(QNetworkConfiguration::BearerType)

Subscribers

People subscribed via source and target branches