Merge lp:~michihenning/storage-framework/qml-improvements into lp:storage-framework/devel
- qml-improvements
- Merge into devel
Status: | Merged |
---|---|
Approved by: | Michi Henning |
Approved revision: | 86 |
Merged at revision: | 88 |
Proposed branch: | lp:~michihenning/storage-framework/qml-improvements |
Merge into: | lp:storage-framework/devel |
Diff against target: |
665 lines (+167/-193) 14 files modified
demo/demo.qml (+3/-1) include/unity/storage/qt/Account.h (+9/-8) include/unity/storage/qt/AccountsJob.h (+3/-1) include/unity/storage/qt/Item.h (+22/-22) include/unity/storage/qt/MetadataKeys.h.THIS (+0/-37) include/unity/storage/qt/Runtime.h (+3/-3) include/unity/storage/qt/internal/AccountImpl.h (+12/-12) include/unity/storage/qt/internal/AccountsJobImpl.h (+1/-0) plugins/Ubuntu/StorageFramework/plugin.cpp (+1/-1) src/qt/Account.cpp (+13/-13) src/qt/AccountsJob.cpp (+7/-0) src/qt/internal/AccountImpl.cpp (+46/-46) src/qt/internal/AccountsJobImpl.cpp (+11/-1) tests/remote-client/remote-client_test.cpp (+36/-48) |
To merge this branch: | bzr merge lp:~michihenning/storage-framework/qml-improvements |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michi Henning (community) | Approve | ||
unity-api-1-bot | continuous-integration | Approve | |
James Henstridge | Approve | ||
Review via email:
|
Commit message
Renamed Account accessors to reflect what we get from online accounts.
A few fixes for QML:
- accounts property is no tied to a method that returns a QVariantList
- Changed to fully-qualified type names for Q_INVOKABLE methods, so QML
doesn't complain about an unknown return type.
Description of the change
Renamed Account accessors to reflect what we get from online accounts.
A few fixes for QML:
- accounts property is no tied to a method that returns a QVariantList
- Changed to fully-qualified type names for Q_INVOKABLE methods, so QML
doesn't complain about an unknown return type.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
unity-api-1-bot (unity-api-1-bot) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
James Henstridge (jamesh) wrote : | # |
This all looks a bit messed up.
In AccountImpl, we have:
static Account make_account(
Which is being invoked in AccountJobImpl as:
That is, it is setting id=a->serviceId(), service_id="", display_
This looks like it is a transposition of the 4th and 5th arguments relative to the v1 API. So before merging this, it'd be good to decide what information exactly we're actually trying expose here.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Michi Henning (michihenning) wrote : | # |
I fixed that after the hangout last night. Are you sure that you were looking at the correct branch? Looking through the diff, I'm seeing the correct call:
The change is around line 441 of the diff.
In terms of what to expose, the ID is not particularly useful, so we could drop that. The ID isn't stable anyway (for example, if I delete an account and then re-add it).
The service ID and display name we have to keep, I think.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
unity-api-1-bot (unity-api-1-bot) wrote : | # |
FAILED: Continuous integration, rev:83
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
unity-api-1-bot (unity-api-1-bot) wrote : | # |
PASSED: Continuous integration, rev:84
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
James Henstridge (jamesh) wrote : | # |
There are a few small issues I've noted inline, but this is looking almost ready to merge.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Michi Henning (michihenning) wrote : | # |
Thanks for your eagle eye! Old habits die hard :-(
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
unity-api-1-bot (unity-api-1-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
- 86. By Michi Henning
-
Merged devel and resolved conflict.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
unity-api-1-bot (unity-api-1-bot) wrote : | # |
PASSED: Continuous integration, rev:85
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
unity-api-1-bot (unity-api-1-bot) wrote : | # |
PASSED: Continuous integration, rev:86
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Michi Henning (michihenning) wrote : | # |
Re-approving after fixing merge conflict.
Preview Diff
1 | === modified file 'demo/demo.qml' | |||
2 | --- demo/demo.qml 2016-09-29 12:34:18 +0000 | |||
3 | +++ demo/demo.qml 2016-11-03 07:36:55 +0000 | |||
4 | @@ -27,7 +27,9 @@ | |||
5 | 27 | var accounts = root.accountsjob.accounts; | 27 | var accounts = root.accountsjob.accounts; |
6 | 28 | console.log("Got accounts " + accounts); | 28 | console.log("Got accounts " + accounts); |
7 | 29 | for (var i = 0; i < accounts.length; i++) { | 29 | for (var i = 0; i < accounts.length; i++) { |
9 | 30 | console.log("Account " + i + " owner = " + accounts[i].owner); | 30 | console.log("Account " + i + ": busName = " + accounts[i].busName()); |
10 | 31 | console.log("Account " + i + ": objectPath = " + accounts[i].objectPath()); | ||
11 | 32 | console.log("Account " + i + ": displayName = " + accounts[i].displayName); | ||
12 | 31 | } | 33 | } |
13 | 32 | } | 34 | } |
14 | 33 | } | 35 | } |
15 | 34 | 36 | ||
16 | === modified file 'include/unity/storage/qt/Account.h' | |||
17 | --- include/unity/storage/qt/Account.h 2016-11-02 04:27:52 +0000 | |||
18 | +++ include/unity/storage/qt/Account.h 2016-11-03 07:36:55 +0000 | |||
19 | @@ -44,9 +44,9 @@ | |||
20 | 44 | { | 44 | { |
21 | 45 | Q_GADGET | 45 | Q_GADGET |
22 | 46 | Q_PROPERTY(bool isValid READ isValid FINAL) | 46 | Q_PROPERTY(bool isValid READ isValid FINAL) |
26 | 47 | Q_PROPERTY(QString owner READ owner FINAL) | 47 | Q_PROPERTY(QString busName READ busName FINAL) |
27 | 48 | Q_PROPERTY(QString ownerId READ ownerId FINAL) | 48 | Q_PROPERTY(QString objectPath READ objectPath FINAL) |
28 | 49 | Q_PROPERTY(QString description READ description FINAL) | 49 | Q_PROPERTY(QString displayName READ displayName FINAL) |
29 | 50 | 50 | ||
30 | 51 | public: | 51 | public: |
31 | 52 | Account(); | 52 | Account(); |
32 | @@ -57,12 +57,13 @@ | |||
33 | 57 | Account& operator=(Account&&); | 57 | Account& operator=(Account&&); |
34 | 58 | 58 | ||
35 | 59 | bool isValid() const; | 59 | bool isValid() const; |
39 | 60 | QString owner() const; | 60 | QString busName() const; |
40 | 61 | QString ownerId() const; | 61 | QString objectPath() const; |
41 | 62 | QString description() const; | 62 | QString displayName() const; |
42 | 63 | // TODO: add more methods to retrieve additional info, such as description, icon ID, and service name. | ||
43 | 63 | 64 | ||
46 | 64 | Q_INVOKABLE ItemListJob* roots(QStringList const& keys = QStringList()) const; | 65 | Q_INVOKABLE unity::storage::qt::ItemListJob* roots(QStringList const& keys = QStringList()) const; |
47 | 65 | Q_INVOKABLE ItemJob* get(QString const& itemId, QStringList const& keys = QStringList()) const; | 66 | Q_INVOKABLE unity::storage::qt::ItemJob* get(QString const& itemId, QStringList const& keys = QStringList()) const; |
48 | 66 | 67 | ||
49 | 67 | bool operator==(Account const&) const; | 68 | bool operator==(Account const&) const; |
50 | 68 | bool operator!=(Account const&) const; | 69 | bool operator!=(Account const&) const; |
51 | 69 | 70 | ||
52 | === modified file 'include/unity/storage/qt/AccountsJob.h' | |||
53 | --- include/unity/storage/qt/AccountsJob.h 2016-10-10 04:07:07 +0000 | |||
54 | +++ include/unity/storage/qt/AccountsJob.h 2016-11-03 07:36:55 +0000 | |||
55 | @@ -48,7 +48,7 @@ | |||
56 | 48 | Q_PROPERTY(bool isValid READ isValid NOTIFY statusChanged FINAL) | 48 | Q_PROPERTY(bool isValid READ isValid NOTIFY statusChanged FINAL) |
57 | 49 | Q_PROPERTY(unity::storage::qt::AccountsJob::Status status READ status NOTIFY statusChanged FINAL) | 49 | Q_PROPERTY(unity::storage::qt::AccountsJob::Status status READ status NOTIFY statusChanged FINAL) |
58 | 50 | Q_PROPERTY(unity::storage::qt::StorageError error READ error NOTIFY statusChanged FINAL) | 50 | Q_PROPERTY(unity::storage::qt::StorageError error READ error NOTIFY statusChanged FINAL) |
60 | 51 | Q_PROPERTY(QList<unity::storage::qt::Account> accounts READ accounts NOTIFY statusChanged FINAL) | 51 | Q_PROPERTY(QVariantList accounts READ accountsAsVariantList NOTIFY statusChanged FINAL) |
61 | 52 | 52 | ||
62 | 53 | public: | 53 | public: |
63 | 54 | enum Status { Loading, Finished, Error }; | 54 | enum Status { Loading, Finished, Error }; |
64 | @@ -68,6 +68,8 @@ | |||
65 | 68 | AccountsJob(std::shared_ptr<internal::RuntimeImpl> const& runtime); | 68 | AccountsJob(std::shared_ptr<internal::RuntimeImpl> const& runtime); |
66 | 69 | AccountsJob(StorageError const& error); | 69 | AccountsJob(StorageError const& error); |
67 | 70 | 70 | ||
68 | 71 | QVariantList accountsAsVariantList() const; | ||
69 | 72 | |||
70 | 71 | std::unique_ptr<internal::AccountsJobImpl> const p_; | 73 | std::unique_ptr<internal::AccountsJobImpl> const p_; |
71 | 72 | 74 | ||
72 | 73 | friend class internal::RuntimeImpl; | 75 | friend class internal::RuntimeImpl; |
73 | 74 | 76 | ||
74 | === modified file 'include/unity/storage/qt/Item.h' | |||
75 | --- include/unity/storage/qt/Item.h 2016-11-03 03:41:24 +0000 | |||
76 | +++ include/unity/storage/qt/Item.h 2016-11-03 07:36:55 +0000 | |||
77 | @@ -98,28 +98,28 @@ | |||
78 | 98 | QDateTime lastModifiedTime() const; | 98 | QDateTime lastModifiedTime() const; |
79 | 99 | QStringList parentIds() const; | 99 | QStringList parentIds() const; |
80 | 100 | 100 | ||
103 | 101 | Q_INVOKABLE ItemListJob* parents(QStringList const& keys = QStringList()) const; | 101 | Q_INVOKABLE unity::storage::qt::ItemListJob* parents(QStringList const& keys = QStringList()) const; |
104 | 102 | Q_INVOKABLE ItemJob* copy(Item const& newParent, | 102 | Q_INVOKABLE unity::storage::qt::ItemJob* copy(Item const& newParent, |
105 | 103 | QString const& newName, | 103 | QString const& newName, |
106 | 104 | QStringList const& keys = QStringList()) const; | 104 | QStringList const& keys = QStringList()) const; |
107 | 105 | Q_INVOKABLE ItemJob* move(Item const& newParent, | 105 | Q_INVOKABLE unity::storage::qt::ItemJob* move(Item const& newParent, |
108 | 106 | QString const& newName, | 106 | QString const& newName, |
109 | 107 | QStringList const& keys = QStringList()) const; | 107 | QStringList const& keys = QStringList()) const; |
110 | 108 | Q_INVOKABLE VoidJob* deleteItem() const; | 108 | Q_INVOKABLE unity::storage::qt::VoidJob* deleteItem() const; |
111 | 109 | 109 | ||
112 | 110 | Q_INVOKABLE Uploader* createUploader(ConflictPolicy policy, | 110 | Q_INVOKABLE unity::storage::qt::Uploader* createUploader(ConflictPolicy policy, |
113 | 111 | qint64 sizeInBytes, | 111 | qint64 sizeInBytes, |
114 | 112 | QStringList const& keys = QStringList()) const; | 112 | QStringList const& keys = QStringList()) const; |
115 | 113 | Q_INVOKABLE Downloader* createDownloader(ConflictPolicy policy) const; | 113 | Q_INVOKABLE unity::storage::qt::Downloader* createDownloader(ConflictPolicy policy) const; |
116 | 114 | 114 | ||
117 | 115 | Q_INVOKABLE ItemListJob* list(QStringList const& keys = QStringList()) const; | 115 | Q_INVOKABLE unity::storage::qt::ItemListJob* list(QStringList const& keys = QStringList()) const; |
118 | 116 | Q_INVOKABLE ItemListJob* lookup(QString const& name, QStringList const& = QStringList()) const; | 116 | Q_INVOKABLE unity::storage::qt::ItemListJob* lookup(QString const& name, QStringList const& = QStringList()) const; |
119 | 117 | Q_INVOKABLE ItemJob* createFolder(QString const& name, QStringList const& = QStringList()) const; | 117 | Q_INVOKABLE unity::storage::qt::ItemJob* createFolder(QString const& name, QStringList const& = QStringList()) const; |
120 | 118 | Q_INVOKABLE Uploader* createFile(QString const& name, | 118 | Q_INVOKABLE unity::storage::qt::Uploader* createFile(QString const& name, |
121 | 119 | ConflictPolicy policy, | 119 | ConflictPolicy policy, |
122 | 120 | qint64 sizeInBytes, | 120 | qint64 sizeInBytes, |
123 | 121 | QString const& contentType, | 121 | QString const& contentType, |
124 | 122 | QStringList const& keys = QStringList()) const; | 122 | QStringList const& keys = QStringList()) const; |
125 | 123 | 123 | ||
126 | 124 | bool operator==(Item const&) const; | 124 | bool operator==(Item const&) const; |
127 | 125 | bool operator!=(Item const&) const; | 125 | bool operator!=(Item const&) const; |
128 | 126 | 126 | ||
129 | === removed file 'include/unity/storage/qt/MetadataKeys.h.THIS' | |||
130 | --- include/unity/storage/qt/MetadataKeys.h.THIS 2016-11-02 03:27:23 +0000 | |||
131 | +++ include/unity/storage/qt/MetadataKeys.h.THIS 1970-01-01 00:00:00 +0000 | |||
132 | @@ -1,37 +0,0 @@ | |||
133 | 1 | /* | ||
134 | 2 | * Copyright (C) 2016 Canonical Ltd | ||
135 | 3 | * | ||
136 | 4 | * This program is free software: you can redistribute it and/or modify | ||
137 | 5 | * it under the terms of the GNU Lesser General Public License version 3 as | ||
138 | 6 | * published by the Free Software Foundation. | ||
139 | 7 | * | ||
140 | 8 | * This program is distributed in the hope that it will be useful, | ||
141 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
142 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
143 | 11 | * GNU Lesser General Public License for more details. | ||
144 | 12 | * | ||
145 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
146 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
147 | 15 | * | ||
148 | 16 | * Authors: Michi Henning <michi.henning@canonical.com> | ||
149 | 17 | */ | ||
150 | 18 | |||
151 | 19 | #pragma once | ||
152 | 20 | |||
153 | 21 | #include <unity/storage/common.h> | ||
154 | 22 | |||
155 | 23 | #include <QList> | ||
156 | 24 | #include <QString> | ||
157 | 25 | |||
158 | 26 | namespace unity | ||
159 | 27 | { | ||
160 | 28 | namespace storage | ||
161 | 29 | { | ||
162 | 30 | namespace qt | ||
163 | 31 | { | ||
164 | 32 | |||
165 | 33 | static QStringList const ALL_METADATA = { metadata::ALL }; | ||
166 | 34 | |||
167 | 35 | } // namespace qt | ||
168 | 36 | } // namespace storage | ||
169 | 37 | } // namespace unity | ||
170 | 38 | 0 | ||
171 | === modified file 'include/unity/storage/qt/Runtime.h' | |||
172 | --- include/unity/storage/qt/Runtime.h 2016-09-29 12:28:46 +0000 | |||
173 | +++ include/unity/storage/qt/Runtime.h 2016-11-03 07:36:55 +0000 | |||
174 | @@ -66,9 +66,9 @@ | |||
175 | 66 | 66 | ||
176 | 67 | Account make_test_account(QString const& bus_name, | 67 | Account make_test_account(QString const& bus_name, |
177 | 68 | QString const& object_path, | 68 | QString const& object_path, |
181 | 69 | QString const& owner_id = "", | 69 | QString const& id = "", |
182 | 70 | QString const& owner = "", | 70 | QString const& serviceId = "", |
183 | 71 | QString const& description = "") const; | 71 | QString const& displayName = "") const; |
184 | 72 | 72 | ||
185 | 73 | private: | 73 | private: |
186 | 74 | std::shared_ptr<internal::RuntimeImpl> p_; | 74 | std::shared_ptr<internal::RuntimeImpl> p_; |
187 | 75 | 75 | ||
188 | === modified file 'include/unity/storage/qt/internal/AccountImpl.h' | |||
189 | --- include/unity/storage/qt/internal/AccountImpl.h 2016-11-02 03:20:03 +0000 | |||
190 | +++ include/unity/storage/qt/internal/AccountImpl.h 2016-11-03 07:36:55 +0000 | |||
191 | @@ -47,9 +47,9 @@ | |||
192 | 47 | AccountImpl& operator=(AccountImpl const&) = default; | 47 | AccountImpl& operator=(AccountImpl const&) = default; |
193 | 48 | AccountImpl& operator=(AccountImpl&&) = default; | 48 | AccountImpl& operator=(AccountImpl&&) = default; |
194 | 49 | 49 | ||
198 | 50 | QString ownerId() const; | 50 | QString busName() const; |
199 | 51 | QString owner() const; | 51 | QString objectPath() const; |
200 | 52 | QString description() const; | 52 | QString displayName() const; |
201 | 53 | 53 | ||
202 | 54 | ItemListJob* roots(QStringList const& keys) const; | 54 | ItemListJob* roots(QStringList const& keys) const; |
203 | 55 | ItemJob* get(QString const& itemId, QStringList const& keys) const; | 55 | ItemJob* get(QString const& itemId, QStringList const& keys) const; |
204 | @@ -69,24 +69,24 @@ | |||
205 | 69 | static Account make_account(std::shared_ptr<RuntimeImpl> const& runtime_impl, | 69 | static Account make_account(std::shared_ptr<RuntimeImpl> const& runtime_impl, |
206 | 70 | QString const& bus_name, | 70 | QString const& bus_name, |
207 | 71 | QString const& object_path, | 71 | QString const& object_path, |
211 | 72 | QString const& owner_id, | 72 | QString const& id, |
212 | 73 | QString const& owner, | 73 | QString const& service_id, |
213 | 74 | QString const& description); | 74 | QString const& display_name); |
214 | 75 | 75 | ||
215 | 76 | private: | 76 | private: |
216 | 77 | AccountImpl(std::shared_ptr<RuntimeImpl> const& runtime_impl, | 77 | AccountImpl(std::shared_ptr<RuntimeImpl> const& runtime_impl, |
217 | 78 | QString const& bus_name, | 78 | QString const& bus_name, |
218 | 79 | QString const& object_path, | 79 | QString const& object_path, |
222 | 80 | QString const& owner_id, | 80 | QString const& id, |
223 | 81 | QString const& owner, | 81 | QString const& service_id, |
224 | 82 | QString const& description); | 82 | QString const& display_name); |
225 | 83 | 83 | ||
226 | 84 | bool is_valid_; | 84 | bool is_valid_; |
227 | 85 | QString bus_name_; | 85 | QString bus_name_; |
228 | 86 | QString object_path_; | 86 | QString object_path_; |
232 | 87 | QString owner_id_; | 87 | QString id_; |
233 | 88 | QString owner_; | 88 | QString service_id_; |
234 | 89 | QString description_; | 89 | QString display_name_; |
235 | 90 | std::weak_ptr<RuntimeImpl> runtime_impl_; | 90 | std::weak_ptr<RuntimeImpl> runtime_impl_; |
236 | 91 | std::shared_ptr<ProviderInterface> provider_; | 91 | std::shared_ptr<ProviderInterface> provider_; |
237 | 92 | 92 | ||
238 | 93 | 93 | ||
239 | === modified file 'include/unity/storage/qt/internal/AccountsJobImpl.h' | |||
240 | --- include/unity/storage/qt/internal/AccountsJobImpl.h 2016-10-12 05:25:20 +0000 | |||
241 | +++ include/unity/storage/qt/internal/AccountsJobImpl.h 2016-11-03 07:36:55 +0000 | |||
242 | @@ -43,6 +43,7 @@ | |||
243 | 43 | AccountsJob::Status status() const; | 43 | AccountsJob::Status status() const; |
244 | 44 | StorageError error() const; | 44 | StorageError error() const; |
245 | 45 | QList<Account> accounts() const; | 45 | QList<Account> accounts() const; |
246 | 46 | QVariantList accountsAsVariantList() const; | ||
247 | 46 | 47 | ||
248 | 47 | private Q_SLOTS: | 48 | private Q_SLOTS: |
249 | 48 | void manager_ready(); | 49 | void manager_ready(); |
250 | 49 | 50 | ||
251 | === modified file 'plugins/Ubuntu/StorageFramework/plugin.cpp' | |||
252 | --- plugins/Ubuntu/StorageFramework/plugin.cpp 2016-09-29 12:28:46 +0000 | |||
253 | +++ plugins/Ubuntu/StorageFramework/plugin.cpp 2016-11-03 07:36:55 +0000 | |||
254 | @@ -36,8 +36,8 @@ | |||
255 | 36 | void StorageFrameworkPlugin::registerTypes(const char* uri) | 36 | void StorageFrameworkPlugin::registerTypes(const char* uri) |
256 | 37 | { | 37 | { |
257 | 38 | qmlRegisterType<Runtime>(uri, 0, 1, "Runtime"); | 38 | qmlRegisterType<Runtime>(uri, 0, 1, "Runtime"); |
258 | 39 | qmlRegisterUncreatableType<Account>(uri, 0, 1, "Account", ""); | ||
259 | 39 | qmlRegisterUncreatableType<AccountsJob>(uri, 0, 1, "AccountsJob", "Use Runtime to create AccountsJob"); | 40 | qmlRegisterUncreatableType<AccountsJob>(uri, 0, 1, "AccountsJob", "Use Runtime to create AccountsJob"); |
260 | 40 | qmlRegisterUncreatableType<Account>(uri, 0, 1, "Account", ""); | ||
261 | 41 | qmlRegisterUncreatableType<Item>(uri, 0, 1, "Item", ""); | 41 | qmlRegisterUncreatableType<Item>(uri, 0, 1, "Item", ""); |
262 | 42 | qmlRegisterUncreatableType<ItemJob>(uri, 0, 1, "ItemJob", "Use Account or another item to access items"); | 42 | qmlRegisterUncreatableType<ItemJob>(uri, 0, 1, "ItemJob", "Use Account or another item to access items"); |
263 | 43 | qmlRegisterUncreatableType<ItemListJob>(uri, 0, 1, "ItemListJob", "Use Account or another item to access items"); | 43 | qmlRegisterUncreatableType<ItemListJob>(uri, 0, 1, "ItemListJob", "Use Account or another item to access items"); |
264 | 44 | 44 | ||
265 | === modified file 'src/qt/Account.cpp' | |||
266 | --- src/qt/Account.cpp 2016-11-02 03:20:03 +0000 | |||
267 | +++ src/qt/Account.cpp 2016-11-03 07:36:55 +0000 | |||
268 | @@ -78,19 +78,19 @@ | |||
269 | 78 | return p_->is_valid_; | 78 | return p_->is_valid_; |
270 | 79 | } | 79 | } |
271 | 80 | 80 | ||
285 | 81 | QString Account::owner() const | 81 | QString Account::busName() const |
286 | 82 | { | 82 | { |
287 | 83 | return p_->owner(); | 83 | return p_->busName(); |
288 | 84 | } | 84 | } |
289 | 85 | 85 | ||
290 | 86 | QString Account::ownerId() const | 86 | QString Account::objectPath() const |
291 | 87 | { | 87 | { |
292 | 88 | return p_->ownerId(); | 88 | return p_->objectPath(); |
293 | 89 | } | 89 | } |
294 | 90 | 90 | ||
295 | 91 | QString Account::description() const | 91 | QString Account::displayName() const |
296 | 92 | { | 92 | { |
297 | 93 | return p_->description(); | 93 | return p_->displayName(); |
298 | 94 | } | 94 | } |
299 | 95 | 95 | ||
300 | 96 | ItemListJob* Account::roots(QStringList const& keys) const | 96 | ItemListJob* Account::roots(QStringList const& keys) const |
301 | 97 | 97 | ||
302 | === modified file 'src/qt/AccountsJob.cpp' | |||
303 | --- src/qt/AccountsJob.cpp 2016-09-16 06:25:08 +0000 | |||
304 | +++ src/qt/AccountsJob.cpp 2016-11-03 07:36:55 +0000 | |||
305 | @@ -21,6 +21,8 @@ | |||
306 | 21 | #include <unity/storage/qt/Account.h> | 21 | #include <unity/storage/qt/Account.h> |
307 | 22 | #include <unity/storage/qt/internal/AccountsJobImpl.h> | 22 | #include <unity/storage/qt/internal/AccountsJobImpl.h> |
308 | 23 | 23 | ||
309 | 24 | #include <QVariant> | ||
310 | 25 | |||
311 | 24 | using namespace unity::storage::qt; | 26 | using namespace unity::storage::qt; |
312 | 25 | using namespace std; | 27 | using namespace std; |
313 | 26 | 28 | ||
314 | @@ -63,6 +65,11 @@ | |||
315 | 63 | return p_->accounts(); | 65 | return p_->accounts(); |
316 | 64 | } | 66 | } |
317 | 65 | 67 | ||
318 | 68 | QVariantList AccountsJob::accountsAsVariantList() const | ||
319 | 69 | { | ||
320 | 70 | return p_->accountsAsVariantList(); | ||
321 | 71 | } | ||
322 | 72 | |||
323 | 66 | } // namespace qt | 73 | } // namespace qt |
324 | 67 | } // namespace storage | 74 | } // namespace storage |
325 | 68 | } // namespace unity | 75 | } // namespace unity |
326 | 69 | 76 | ||
327 | === modified file 'src/qt/internal/AccountImpl.cpp' | |||
328 | --- src/qt/internal/AccountImpl.cpp 2016-11-02 03:20:03 +0000 | |||
329 | +++ src/qt/internal/AccountImpl.cpp 2016-11-03 07:36:55 +0000 | |||
330 | @@ -50,15 +50,15 @@ | |||
331 | 50 | AccountImpl::AccountImpl(shared_ptr<RuntimeImpl> const& runtime_impl, | 50 | AccountImpl::AccountImpl(shared_ptr<RuntimeImpl> const& runtime_impl, |
332 | 51 | QString const& bus_name, | 51 | QString const& bus_name, |
333 | 52 | QString const& object_path, | 52 | QString const& object_path, |
337 | 53 | QString const& owner_id, | 53 | QString const& id, |
338 | 54 | QString const& owner, | 54 | QString const& service_id, |
339 | 55 | QString const& description) | 55 | QString const& display_name) |
340 | 56 | : is_valid_(true) | 56 | : is_valid_(true) |
341 | 57 | , bus_name_(bus_name) | 57 | , bus_name_(bus_name) |
342 | 58 | , object_path_(object_path) | 58 | , object_path_(object_path) |
346 | 59 | , owner_id_(owner_id) | 59 | , id_(id) |
347 | 60 | , owner_(owner) | 60 | , service_id_(service_id) |
348 | 61 | , description_(description) | 61 | , display_name_(display_name) |
349 | 62 | , runtime_impl_(runtime_impl) | 62 | , runtime_impl_(runtime_impl) |
350 | 63 | , provider_(new ProviderInterface(bus_name, object_path, runtime_impl->connection())) | 63 | , provider_(new ProviderInterface(bus_name, object_path, runtime_impl->connection())) |
351 | 64 | { | 64 | { |
352 | @@ -66,19 +66,19 @@ | |||
353 | 66 | assert(!object_path.isEmpty()); | 66 | assert(!object_path.isEmpty()); |
354 | 67 | } | 67 | } |
355 | 68 | 68 | ||
369 | 69 | QString AccountImpl::owner() const | 69 | QString AccountImpl::busName() const |
370 | 70 | { | 70 | { |
371 | 71 | return is_valid_ ? owner_ : ""; | 71 | return is_valid_ ? bus_name_ : ""; |
372 | 72 | } | 72 | } |
373 | 73 | 73 | ||
374 | 74 | QString AccountImpl::ownerId() const | 74 | QString AccountImpl::objectPath() const |
375 | 75 | { | 75 | { |
376 | 76 | return is_valid_ ? owner_id_ : ""; | 76 | return is_valid_ ? object_path_ : ""; |
377 | 77 | } | 77 | } |
378 | 78 | 78 | ||
379 | 79 | QString AccountImpl::description() const | 79 | QString AccountImpl::displayName() const |
380 | 80 | { | 80 | { |
381 | 81 | return is_valid_ ? description_ : ""; | 81 | return is_valid_ ? display_name_ : ""; |
382 | 82 | } | 82 | } |
383 | 83 | 83 | ||
384 | 84 | ItemListJob* AccountImpl::roots(QStringList const& keys) const | 84 | ItemListJob* AccountImpl::roots(QStringList const& keys) const |
385 | @@ -142,9 +142,9 @@ | |||
386 | 142 | if (is_valid_) | 142 | if (is_valid_) |
387 | 143 | { | 143 | { |
388 | 144 | return other.is_valid_ | 144 | return other.is_valid_ |
392 | 145 | && owner_ == other.owner_ | 145 | && id_ == other.id_ |
393 | 146 | && owner_id_ == other.owner_id_ | 146 | && service_id_ == other.service_id_ |
394 | 147 | && description_ == other.description_; | 147 | && display_name_ == other.display_name_; |
395 | 148 | } | 148 | } |
396 | 149 | return !other.is_valid_; | 149 | return !other.is_valid_; |
397 | 150 | } | 150 | } |
398 | @@ -165,23 +165,23 @@ | |||
399 | 165 | return false; | 165 | return false; |
400 | 166 | } | 166 | } |
401 | 167 | assert(is_valid_ && other.is_valid_); | 167 | assert(is_valid_ && other.is_valid_); |
419 | 168 | if (owner_id_ < other.owner_id_) | 168 | if (id_ < other.id_) |
420 | 169 | { | 169 | { |
421 | 170 | return true; | 170 | return true; |
422 | 171 | } | 171 | } |
423 | 172 | if (owner_id_ > other.owner_id_) | 172 | if (id_ > other.id_) |
424 | 173 | { | 173 | { |
425 | 174 | return false; | 174 | return false; |
426 | 175 | } | 175 | } |
427 | 176 | if (owner_ < other.owner_) | 176 | if (service_id_ < other.service_id_) |
428 | 177 | { | 177 | { |
429 | 178 | return true; | 178 | return true; |
430 | 179 | } | 179 | } |
431 | 180 | if (owner_ > other.owner_) | 180 | if (service_id_ > other.service_id_) |
432 | 181 | { | 181 | { |
433 | 182 | return false; | 182 | return false; |
434 | 183 | } | 183 | } |
435 | 184 | return description_ < other.description_; | 184 | return display_name_ < other.display_name_; |
436 | 185 | } | 185 | } |
437 | 186 | 186 | ||
438 | 187 | bool AccountImpl::operator<=(AccountImpl const& other) const | 187 | bool AccountImpl::operator<=(AccountImpl const& other) const |
439 | @@ -216,20 +216,20 @@ | |||
440 | 216 | return 0; | 216 | return 0; |
441 | 217 | } | 217 | } |
442 | 218 | size_t hash = 0; | 218 | size_t hash = 0; |
446 | 219 | boost::hash_combine(hash, qHash(owner_)); | 219 | boost::hash_combine(hash, qHash(service_id_)); |
447 | 220 | boost::hash_combine(hash, qHash(owner_id_)); | 220 | boost::hash_combine(hash, qHash(id_)); |
448 | 221 | boost::hash_combine(hash, qHash(description_)); | 221 | boost::hash_combine(hash, qHash(display_name_)); |
449 | 222 | return hash; | 222 | return hash; |
450 | 223 | } | 223 | } |
451 | 224 | 224 | ||
452 | 225 | Account AccountImpl::make_account(shared_ptr<RuntimeImpl> const& runtime, | 225 | Account AccountImpl::make_account(shared_ptr<RuntimeImpl> const& runtime, |
453 | 226 | QString const& bus_name, | 226 | QString const& bus_name, |
454 | 227 | QString const& object_path, | 227 | QString const& object_path, |
458 | 228 | QString const& owner_id, | 228 | QString const& id, |
459 | 229 | QString const& owner, | 229 | QString const& service_id, |
460 | 230 | QString const& description) | 230 | QString const& display_name) |
461 | 231 | { | 231 | { |
463 | 232 | shared_ptr<AccountImpl> p(new AccountImpl(runtime, bus_name, object_path, owner_id, owner, description)); | 232 | shared_ptr<AccountImpl> p(new AccountImpl(runtime, bus_name, object_path, id, service_id, display_name)); |
464 | 233 | return Account(p); | 233 | return Account(p); |
465 | 234 | } | 234 | } |
466 | 235 | 235 | ||
467 | 236 | 236 | ||
468 | === modified file 'src/qt/internal/AccountsJobImpl.cpp' | |||
469 | --- src/qt/internal/AccountsJobImpl.cpp 2016-11-02 09:32:53 +0000 | |||
470 | +++ src/qt/internal/AccountsJobImpl.cpp 2016-11-03 07:36:55 +0000 | |||
471 | @@ -103,6 +103,16 @@ | |||
472 | 103 | return accounts_; | 103 | return accounts_; |
473 | 104 | } | 104 | } |
474 | 105 | 105 | ||
475 | 106 | QVariantList AccountsJobImpl::accountsAsVariantList() const | ||
476 | 107 | { | ||
477 | 108 | QVariantList account_list; | ||
478 | 109 | for (auto const& a : accounts()) | ||
479 | 110 | { | ||
480 | 111 | account_list.append(QVariant::fromValue(a)); | ||
481 | 112 | } | ||
482 | 113 | return account_list; | ||
483 | 114 | } | ||
484 | 115 | |||
485 | 106 | void AccountsJobImpl::manager_ready() | 116 | void AccountsJobImpl::manager_ready() |
486 | 107 | { | 117 | { |
487 | 108 | timer_.stop(); | 118 | timer_.stop(); |
488 | @@ -171,8 +181,8 @@ | |||
489 | 171 | accounts_.append(AccountImpl::make_account(runtime, | 181 | accounts_.append(AccountImpl::make_account(runtime, |
490 | 172 | bus_name, | 182 | bus_name, |
491 | 173 | object_path, | 183 | object_path, |
492 | 184 | QString::number(a->id()), | ||
493 | 174 | a->serviceId(), | 185 | a->serviceId(), |
494 | 175 | "", | ||
495 | 176 | a->displayName())); | 186 | a->displayName())); |
496 | 177 | } | 187 | } |
497 | 178 | } | 188 | } |
498 | 179 | 189 | ||
499 | === modified file 'tests/remote-client/remote-client_test.cpp' | |||
500 | --- tests/remote-client/remote-client_test.cpp 2016-11-03 03:41:24 +0000 | |||
501 | +++ tests/remote-client/remote-client_test.cpp 2016-11-03 07:36:55 +0000 | |||
502 | @@ -114,84 +114,84 @@ | |||
503 | 114 | // Default constructor. | 114 | // Default constructor. |
504 | 115 | Account a; | 115 | Account a; |
505 | 116 | EXPECT_FALSE(a.isValid()); | 116 | EXPECT_FALSE(a.isValid()); |
509 | 117 | EXPECT_EQ("", a.ownerId()); | 117 | EXPECT_EQ("", a.busName()); |
510 | 118 | EXPECT_EQ("", a.owner()); | 118 | EXPECT_EQ("", a.objectPath()); |
511 | 119 | EXPECT_EQ("", a.description()); | 119 | EXPECT_EQ("", a.displayName()); |
512 | 120 | } | 120 | } |
513 | 121 | 121 | ||
514 | 122 | { | 122 | { |
515 | 123 | auto acc = runtime_->make_test_account(service_connection_->baseService(), object_path(), | 123 | auto acc = runtime_->make_test_account(service_connection_->baseService(), object_path(), |
517 | 124 | "id", "owner", "description"); | 124 | "id", "sid", "displayName"); |
518 | 125 | EXPECT_TRUE(acc.isValid()); | 125 | EXPECT_TRUE(acc.isValid()); |
522 | 126 | EXPECT_EQ("id", acc.ownerId()); | 126 | EXPECT_EQ(service_connection_->baseService(), acc.busName()); |
523 | 127 | EXPECT_EQ("owner", acc.owner()); | 127 | EXPECT_EQ(object_path(), acc.objectPath()); |
524 | 128 | EXPECT_EQ("description", acc.description()); | 128 | EXPECT_EQ("displayName", acc.displayName()); |
525 | 129 | 129 | ||
526 | 130 | // Copy constructor | 130 | // Copy constructor |
527 | 131 | Account a2(acc); | 131 | Account a2(acc); |
528 | 132 | EXPECT_TRUE(a2.isValid()); | 132 | EXPECT_TRUE(a2.isValid()); |
532 | 133 | EXPECT_EQ("id", a2.ownerId()); | 133 | EXPECT_EQ(service_connection_->baseService(), a2.busName()); |
533 | 134 | EXPECT_EQ("owner", a2.owner()); | 134 | EXPECT_EQ(object_path(), a2.objectPath()); |
534 | 135 | EXPECT_EQ("description", a2.description()); | 135 | EXPECT_EQ("displayName", a2.displayName()); |
535 | 136 | 136 | ||
536 | 137 | // Move constructor | 137 | // Move constructor |
537 | 138 | Account a3(move(a2)); | 138 | Account a3(move(a2)); |
538 | 139 | EXPECT_TRUE(a3.isValid()); | 139 | EXPECT_TRUE(a3.isValid()); |
542 | 140 | EXPECT_EQ("id", a3.ownerId()); | 140 | EXPECT_EQ(service_connection_->baseService(), a3.busName()); |
543 | 141 | EXPECT_EQ("owner", a3.owner()); | 141 | EXPECT_EQ(object_path(), a3.objectPath()); |
544 | 142 | EXPECT_EQ("description", a3.description()); | 142 | EXPECT_EQ("displayName", a3.displayName()); |
545 | 143 | 143 | ||
546 | 144 | // Moved-from object must be invalid | 144 | // Moved-from object must be invalid |
547 | 145 | EXPECT_FALSE(a2.isValid()); | 145 | EXPECT_FALSE(a2.isValid()); |
548 | 146 | 146 | ||
549 | 147 | // Moved-from object must be assignable | 147 | // Moved-from object must be assignable |
550 | 148 | auto a4 = runtime_->make_test_account(service_connection_->baseService(), object_path(), | 148 | auto a4 = runtime_->make_test_account(service_connection_->baseService(), object_path(), |
552 | 149 | "id4", "owner4", "description4"); | 149 | "id4", "sid4", "displayName4"); |
553 | 150 | a2 = a4; | 150 | a2 = a4; |
554 | 151 | EXPECT_TRUE(a2.isValid()); | 151 | EXPECT_TRUE(a2.isValid()); |
558 | 152 | EXPECT_EQ("id4", a2.ownerId()); | 152 | EXPECT_EQ(service_connection_->baseService(), a2.busName()); |
559 | 153 | EXPECT_EQ("owner4", a2.owner()); | 153 | EXPECT_EQ(object_path(), a2.objectPath()); |
560 | 154 | EXPECT_EQ("description4", a2.description()); | 154 | EXPECT_EQ("displayName4", a2.displayName()); |
561 | 155 | } | 155 | } |
562 | 156 | 156 | ||
563 | 157 | { | 157 | { |
566 | 158 | auto a1 = runtime_->make_test_account(service_connection_->baseService(), object_path(), "id", "owner", "description"); | 158 | auto a1 = runtime_->make_test_account(service_connection_->baseService(), object_path(), "id", "sid", "dn"); |
567 | 159 | auto a2 = runtime_->make_test_account(service_connection_->baseService(), object_path(), "id2", "owner2", "description2"); | 159 | auto a2 = runtime_->make_test_account(service_connection_->baseService(), object_path(), "id2", "sid2", "dn2"); |
568 | 160 | 160 | ||
569 | 161 | // Copy assignment | 161 | // Copy assignment |
570 | 162 | a1 = a2; | 162 | a1 = a2; |
571 | 163 | EXPECT_TRUE(a2.isValid()); | 163 | EXPECT_TRUE(a2.isValid()); |
575 | 164 | EXPECT_EQ("id2", a1.ownerId()); | 164 | EXPECT_EQ(service_connection_->baseService(), a1.busName()); |
576 | 165 | EXPECT_EQ("owner2", a2.owner()); | 165 | EXPECT_EQ(object_path(), a1.objectPath()); |
577 | 166 | EXPECT_EQ("description2", a1.description()); | 166 | EXPECT_EQ("dn2", a1.displayName()); |
578 | 167 | 167 | ||
579 | 168 | // Self-assignment | 168 | // Self-assignment |
580 | 169 | a2 = a2; | 169 | a2 = a2; |
581 | 170 | EXPECT_TRUE(a2.isValid()); | 170 | EXPECT_TRUE(a2.isValid()); |
585 | 171 | EXPECT_EQ("id2", a1.ownerId()); | 171 | EXPECT_EQ(service_connection_->baseService(), a1.busName()); |
586 | 172 | EXPECT_EQ("owner2", a2.owner()); | 172 | EXPECT_EQ(object_path(), a1.objectPath()); |
587 | 173 | EXPECT_EQ("description2", a1.description()); | 173 | EXPECT_EQ("dn2", a1.displayName()); |
588 | 174 | 174 | ||
589 | 175 | // Move assignment | 175 | // Move assignment |
590 | 176 | auto a3 = runtime_->make_test_account(service_connection_->baseService(), object_path(), | 176 | auto a3 = runtime_->make_test_account(service_connection_->baseService(), object_path(), |
592 | 177 | "id3", "owner3", "description3"); | 177 | "id3", "sid3", "dn3"); |
593 | 178 | a1 = move(a3); | 178 | a1 = move(a3); |
594 | 179 | EXPECT_TRUE(a1.isValid()); | 179 | EXPECT_TRUE(a1.isValid()); |
598 | 180 | EXPECT_EQ("id3", a1.ownerId()); | 180 | EXPECT_EQ(service_connection_->baseService(), a1.busName()); |
599 | 181 | EXPECT_EQ("owner3", a1.owner()); | 181 | EXPECT_EQ(object_path(), a1.objectPath()); |
600 | 182 | EXPECT_EQ("description3", a1.description()); | 182 | EXPECT_EQ("dn3", a1.displayName()); |
601 | 183 | 183 | ||
602 | 184 | // Moved-from object must be invalid | 184 | // Moved-from object must be invalid |
603 | 185 | EXPECT_FALSE(a3.isValid()); | 185 | EXPECT_FALSE(a3.isValid()); |
604 | 186 | 186 | ||
605 | 187 | // Moved-from object must be assignable | 187 | // Moved-from object must be assignable |
606 | 188 | auto a4 = runtime_->make_test_account(service_connection_->baseService(), object_path(), | 188 | auto a4 = runtime_->make_test_account(service_connection_->baseService(), object_path(), |
608 | 189 | "id4", "owner4", "description4"); | 189 | "id4", "sid4", "dn4"); |
609 | 190 | a2 = a4; | 190 | a2 = a4; |
610 | 191 | EXPECT_TRUE(a2.isValid()); | 191 | EXPECT_TRUE(a2.isValid()); |
614 | 192 | EXPECT_EQ("id4", a2.ownerId()); | 192 | EXPECT_EQ(service_connection_->baseService(), a2.busName()); |
615 | 193 | EXPECT_EQ("owner4", a2.owner()); | 193 | EXPECT_EQ(object_path(), a2.objectPath()); |
616 | 194 | EXPECT_EQ("description4", a2.description()); | 194 | EXPECT_EQ("dn4", a2.displayName()); |
617 | 195 | } | 195 | } |
618 | 196 | } | 196 | } |
619 | 197 | 197 | ||
620 | @@ -230,7 +230,7 @@ | |||
621 | 230 | } | 230 | } |
622 | 231 | 231 | ||
623 | 232 | { | 232 | { |
625 | 233 | // a1 < a2 for owner ID | 233 | // a1 < a2 for ID |
626 | 234 | auto a1 = runtime_->make_test_account(service_connection_->baseService(), object_path(), "a", "x", "x"); | 234 | auto a1 = runtime_->make_test_account(service_connection_->baseService(), object_path(), "a", "x", "x"); |
627 | 235 | auto a2 = runtime_->make_test_account(service_connection_->baseService(), object_path(), "b", "x", "x"); | 235 | auto a2 = runtime_->make_test_account(service_connection_->baseService(), object_path(), "b", "x", "x"); |
628 | 236 | 236 | ||
629 | @@ -251,7 +251,7 @@ | |||
630 | 251 | } | 251 | } |
631 | 252 | 252 | ||
632 | 253 | { | 253 | { |
634 | 254 | // a1 < a2 for owner | 254 | // a1 < a2 for service ID |
635 | 255 | auto a1 = runtime_->make_test_account(service_connection_->baseService(), object_path(), "a", "a", "x"); | 255 | auto a1 = runtime_->make_test_account(service_connection_->baseService(), object_path(), "a", "a", "x"); |
636 | 256 | auto a2 = runtime_->make_test_account(service_connection_->baseService(), object_path(), "a", "b", "x"); | 256 | auto a2 = runtime_->make_test_account(service_connection_->baseService(), object_path(), "a", "b", "x"); |
637 | 257 | 257 | ||
638 | @@ -272,7 +272,7 @@ | |||
639 | 272 | } | 272 | } |
640 | 273 | 273 | ||
641 | 274 | { | 274 | { |
643 | 275 | // a1 < a2 for description | 275 | // a1 < a2 for display name |
644 | 276 | auto a1 = runtime_->make_test_account(service_connection_->baseService(), object_path(), "a", "a", "a"); | 276 | auto a1 = runtime_->make_test_account(service_connection_->baseService(), object_path(), "a", "a", "a"); |
645 | 277 | auto a2 = runtime_->make_test_account(service_connection_->baseService(), object_path(), "a", "a", "b"); | 277 | auto a2 = runtime_->make_test_account(service_connection_->baseService(), object_path(), "a", "a", "b"); |
646 | 278 | 278 | ||
647 | @@ -994,18 +994,6 @@ | |||
648 | 994 | EXPECT_EQ("Item::deleteItem(): cannot create job from invalid item", j->error().message()); | 994 | EXPECT_EQ("Item::deleteItem(): cannot create job from invalid item", j->error().message()); |
649 | 995 | } | 995 | } |
650 | 996 | 996 | ||
651 | 997 | #if 0 | ||
652 | 998 | // TODO: need to make internal symbols available for testing. | ||
653 | 999 | TEST_F(ValidateTest, basic) | ||
654 | 1000 | { | ||
655 | 1001 | using namespace unity::storage::qt::internal; | ||
656 | 1002 | |||
657 | 1003 | unity::storage::internal::ItemMetadata md; | ||
658 | 1004 | |||
659 | 1005 | validate("foo", md); | ||
660 | 1006 | } | ||
661 | 1007 | #endif | ||
662 | 1008 | |||
663 | 1009 | TEST_F(ItemTest, basic) | 997 | TEST_F(ItemTest, basic) |
664 | 1010 | { | 998 | { |
665 | 1011 | set_provider(unique_ptr<provider::ProviderBase>(new MockProvider())); | 999 | set_provider(unique_ptr<provider::ProviderBase>(new MockProvider())); |
PASSED: Continuous integration, rev:82 /jenkins. canonical. com/unity- api-1/job/ lp-storage- framework- ci/166/ /jenkins. canonical. com/unity- api-1/job/ build/944 /jenkins. canonical. com/unity- api-1/job/ build-0- fetch/951 /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 754 /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 754/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 754 /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 754/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=amd64, release= yakkety/ 754 /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=amd64, release= yakkety/ 754/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 754 /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 754/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 754 /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 754/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=armhf, release= yakkety/ 754 /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=armhf, release= yakkety/ 754/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 754 /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 754/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 754 /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 754/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=i386, release= yakkety/ 754 /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=i386, release= yakkety/ 754/artifact/ output/ *zip*/output. zip
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild: /jenkins. canonical. com/unity- api-1/job/ lp-storage- framework- ci/166/ rebuild
https:/