Merge lp:~michihenning/storage-framework/qml-improvements into lp:storage-framework/devel

Proposed by Michi Henning
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
Reviewer Review Type Date Requested Status
Michi Henning (community) Approve
unity-api-1-bot continuous-integration Approve
James Henstridge Approve
Review via email: mp+309809@code.launchpad.net

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.

To post a comment you must log in.
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

PASSED: Continuous integration, rev:82
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/166/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build/944
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/951
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=vivid+overlay/754
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=vivid+overlay/754/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/754
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/754/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=yakkety/754
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=yakkety/754/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=vivid+overlay/754
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=vivid+overlay/754/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/754
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/754/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=yakkety/754
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=yakkety/754/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=vivid+overlay/754
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=vivid+overlay/754/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/754
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/754/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=yakkety/754
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=yakkety/754/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/166/rebuild

review: Approve (continuous-integration)
Revision history for this message
James Henstridge (jamesh) wrote :

This all looks a bit messed up.

In AccountImpl, we have:

     static Account make_account(std::shared_ptr<RuntimeImpl> const& runtime_impl,
                                 QString const& bus_name,
                                 QString const& object_path,
                                 QString const& id,
                                 QString const& service_id,
                                 QString const& display_name);

Which is being invoked in AccountJobImpl as:

            accounts_.append(AccountImpl::make_account(runtime,
                                                       bus_name,
                                                       object_path,
                                                       a->serviceId(),
                                                       "",
                                                       a->displayName()));

That is, it is setting id=a->serviceId(), service_id="", display_name=a->displayName(). This would explain my confusion when discussing this with you yesterday.

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.

review: Needs Information
Revision history for this message
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:

            accounts_.append(AccountImpl::make_account(runtime,
                                                       bus_name,
                                                       object_path,
                                                       QString::number(a->id()),
                                                       a->serviceId(),
                                                       a->displayName()));

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.

Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

PASSED: Continuous integration, rev:84
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/178/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build/970
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/977
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=vivid+overlay/777
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=vivid+overlay/777/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/777
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/777/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=yakkety/777
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=yakkety/777/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=vivid+overlay/777
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=vivid+overlay/777/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/777
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/777/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=yakkety/777
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=yakkety/777/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=vivid+overlay/777
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=vivid+overlay/777/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/777
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/777/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=yakkety/777
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=yakkety/777/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/178/rebuild

review: Approve (continuous-integration)
Revision history for this message
James Henstridge (jamesh) wrote :

There are a few small issues I've noted inline, but this is looking almost ready to merge.

review: Needs Fixing
Revision history for this message
Michi Henning (michihenning) wrote :

Thanks for your eagle eye! Old habits die hard :-(

Revision history for this message
James Henstridge (jamesh) wrote :

Looks good.

review: Approve
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :
review: Needs Fixing (continuous-integration)
86. By Michi Henning

Merged devel and resolved conflict.

Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

PASSED: Continuous integration, rev:85
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/184/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build/978
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/985
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=vivid+overlay/785
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=vivid+overlay/785/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/785
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/785/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=yakkety/785
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=yakkety/785/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=vivid+overlay/785
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=vivid+overlay/785/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/785
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/785/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=yakkety/785
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=yakkety/785/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=vivid+overlay/785
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=vivid+overlay/785/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/785
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/785/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=yakkety/785
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=yakkety/785/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/184/rebuild

review: Approve (continuous-integration)
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

PASSED: Continuous integration, rev:86
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/185/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build/980
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/987
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=vivid+overlay/786
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=vivid+overlay/786/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/786
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/786/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=yakkety/786
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=yakkety/786/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=vivid+overlay/786
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=vivid+overlay/786/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/786
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/786/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=yakkety/786
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=yakkety/786/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=vivid+overlay/786
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=vivid+overlay/786/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/786
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/786/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=yakkety/786
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=yakkety/786/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/185/rebuild

review: Approve (continuous-integration)
Revision history for this message
Michi Henning (michihenning) wrote :

Re-approving after fixing merge conflict.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'demo/demo.qml'
--- demo/demo.qml 2016-09-29 12:34:18 +0000
+++ demo/demo.qml 2016-11-03 07:36:55 +0000
@@ -27,7 +27,9 @@
27 var accounts = root.accountsjob.accounts;27 var accounts = root.accountsjob.accounts;
28 console.log("Got accounts " + accounts);28 console.log("Got accounts " + accounts);
29 for (var i = 0; i < accounts.length; i++) {29 for (var i = 0; i < accounts.length; i++) {
30 console.log("Account " + i + " owner = " + accounts[i].owner);30 console.log("Account " + i + ": busName = " + accounts[i].busName());
31 console.log("Account " + i + ": objectPath = " + accounts[i].objectPath());
32 console.log("Account " + i + ": displayName = " + accounts[i].displayName);
31 }33 }
32 }34 }
33 }35 }
3436
=== modified file 'include/unity/storage/qt/Account.h'
--- include/unity/storage/qt/Account.h 2016-11-02 04:27:52 +0000
+++ include/unity/storage/qt/Account.h 2016-11-03 07:36:55 +0000
@@ -44,9 +44,9 @@
44{44{
45 Q_GADGET45 Q_GADGET
46 Q_PROPERTY(bool isValid READ isValid FINAL)46 Q_PROPERTY(bool isValid READ isValid FINAL)
47 Q_PROPERTY(QString owner READ owner FINAL)47 Q_PROPERTY(QString busName READ busName FINAL)
48 Q_PROPERTY(QString ownerId READ ownerId FINAL)48 Q_PROPERTY(QString objectPath READ objectPath FINAL)
49 Q_PROPERTY(QString description READ description FINAL)49 Q_PROPERTY(QString displayName READ displayName FINAL)
5050
51public:51public:
52 Account();52 Account();
@@ -57,12 +57,13 @@
57 Account& operator=(Account&&);57 Account& operator=(Account&&);
5858
59 bool isValid() const;59 bool isValid() const;
60 QString owner() const;60 QString busName() const;
61 QString ownerId() const;61 QString objectPath() const;
62 QString description() const;62 QString displayName() const;
63 // TODO: add more methods to retrieve additional info, such as description, icon ID, and service name.
6364
64 Q_INVOKABLE ItemListJob* roots(QStringList const& keys = QStringList()) const;65 Q_INVOKABLE unity::storage::qt::ItemListJob* roots(QStringList const& keys = QStringList()) const;
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;
6667
67 bool operator==(Account const&) const;68 bool operator==(Account const&) const;
68 bool operator!=(Account const&) const;69 bool operator!=(Account const&) const;
6970
=== modified file 'include/unity/storage/qt/AccountsJob.h'
--- include/unity/storage/qt/AccountsJob.h 2016-10-10 04:07:07 +0000
+++ include/unity/storage/qt/AccountsJob.h 2016-11-03 07:36:55 +0000
@@ -48,7 +48,7 @@
48 Q_PROPERTY(bool isValid READ isValid NOTIFY statusChanged FINAL)48 Q_PROPERTY(bool isValid READ isValid NOTIFY statusChanged FINAL)
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)
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)
51 Q_PROPERTY(QList<unity::storage::qt::Account> accounts READ accounts NOTIFY statusChanged FINAL)51 Q_PROPERTY(QVariantList accounts READ accountsAsVariantList NOTIFY statusChanged FINAL)
5252
53public:53public:
54 enum Status { Loading, Finished, Error };54 enum Status { Loading, Finished, Error };
@@ -68,6 +68,8 @@
68 AccountsJob(std::shared_ptr<internal::RuntimeImpl> const& runtime);68 AccountsJob(std::shared_ptr<internal::RuntimeImpl> const& runtime);
69 AccountsJob(StorageError const& error);69 AccountsJob(StorageError const& error);
7070
71 QVariantList accountsAsVariantList() const;
72
71 std::unique_ptr<internal::AccountsJobImpl> const p_;73 std::unique_ptr<internal::AccountsJobImpl> const p_;
7274
73 friend class internal::RuntimeImpl;75 friend class internal::RuntimeImpl;
7476
=== modified file 'include/unity/storage/qt/Item.h'
--- include/unity/storage/qt/Item.h 2016-11-03 03:41:24 +0000
+++ include/unity/storage/qt/Item.h 2016-11-03 07:36:55 +0000
@@ -98,28 +98,28 @@
98 QDateTime lastModifiedTime() const;98 QDateTime lastModifiedTime() const;
99 QStringList parentIds() const;99 QStringList parentIds() const;
100100
101 Q_INVOKABLE ItemListJob* parents(QStringList const& keys = QStringList()) const;101 Q_INVOKABLE unity::storage::qt::ItemListJob* parents(QStringList const& keys = QStringList()) const;
102 Q_INVOKABLE ItemJob* copy(Item const& newParent,102 Q_INVOKABLE unity::storage::qt::ItemJob* copy(Item const& newParent,
103 QString const& newName,103 QString const& newName,
104 QStringList const& keys = QStringList()) const;104 QStringList const& keys = QStringList()) const;
105 Q_INVOKABLE ItemJob* move(Item const& newParent,105 Q_INVOKABLE unity::storage::qt::ItemJob* move(Item const& newParent,
106 QString const& newName,106 QString const& newName,
107 QStringList const& keys = QStringList()) const;107 QStringList const& keys = QStringList()) const;
108 Q_INVOKABLE VoidJob* deleteItem() const;108 Q_INVOKABLE unity::storage::qt::VoidJob* deleteItem() const;
109109
110 Q_INVOKABLE Uploader* createUploader(ConflictPolicy policy,110 Q_INVOKABLE unity::storage::qt::Uploader* createUploader(ConflictPolicy policy,
111 qint64 sizeInBytes,111 qint64 sizeInBytes,
112 QStringList const& keys = QStringList()) const;112 QStringList const& keys = QStringList()) const;
113 Q_INVOKABLE Downloader* createDownloader(ConflictPolicy policy) const;113 Q_INVOKABLE unity::storage::qt::Downloader* createDownloader(ConflictPolicy policy) const;
114114
115 Q_INVOKABLE ItemListJob* list(QStringList const& keys = QStringList()) const;115 Q_INVOKABLE unity::storage::qt::ItemListJob* list(QStringList const& keys = QStringList()) const;
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;
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;
118 Q_INVOKABLE Uploader* createFile(QString const& name,118 Q_INVOKABLE unity::storage::qt::Uploader* createFile(QString const& name,
119 ConflictPolicy policy,119 ConflictPolicy policy,
120 qint64 sizeInBytes,120 qint64 sizeInBytes,
121 QString const& contentType,121 QString const& contentType,
122 QStringList const& keys = QStringList()) const;122 QStringList const& keys = QStringList()) const;
123123
124 bool operator==(Item const&) const;124 bool operator==(Item const&) const;
125 bool operator!=(Item const&) const;125 bool operator!=(Item const&) const;
126126
=== removed file 'include/unity/storage/qt/MetadataKeys.h.THIS'
--- include/unity/storage/qt/MetadataKeys.h.THIS 2016-11-02 03:27:23 +0000
+++ include/unity/storage/qt/MetadataKeys.h.THIS 1970-01-01 00:00:00 +0000
@@ -1,37 +0,0 @@
1/*
2 * Copyright (C) 2016 Canonical Ltd
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors: Michi Henning <michi.henning@canonical.com>
17 */
18
19#pragma once
20
21#include <unity/storage/common.h>
22
23#include <QList>
24#include <QString>
25
26namespace unity
27{
28namespace storage
29{
30namespace qt
31{
32
33static QStringList const ALL_METADATA = { metadata::ALL };
34
35} // namespace qt
36} // namespace storage
37} // namespace unity
380
=== modified file 'include/unity/storage/qt/Runtime.h'
--- include/unity/storage/qt/Runtime.h 2016-09-29 12:28:46 +0000
+++ include/unity/storage/qt/Runtime.h 2016-11-03 07:36:55 +0000
@@ -66,9 +66,9 @@
6666
67 Account make_test_account(QString const& bus_name,67 Account make_test_account(QString const& bus_name,
68 QString const& object_path,68 QString const& object_path,
69 QString const& owner_id = "",69 QString const& id = "",
70 QString const& owner = "",70 QString const& serviceId = "",
71 QString const& description = "") const;71 QString const& displayName = "") const;
7272
73private:73private:
74 std::shared_ptr<internal::RuntimeImpl> p_;74 std::shared_ptr<internal::RuntimeImpl> p_;
7575
=== modified file 'include/unity/storage/qt/internal/AccountImpl.h'
--- include/unity/storage/qt/internal/AccountImpl.h 2016-11-02 03:20:03 +0000
+++ include/unity/storage/qt/internal/AccountImpl.h 2016-11-03 07:36:55 +0000
@@ -47,9 +47,9 @@
47 AccountImpl& operator=(AccountImpl const&) = default;47 AccountImpl& operator=(AccountImpl const&) = default;
48 AccountImpl& operator=(AccountImpl&&) = default;48 AccountImpl& operator=(AccountImpl&&) = default;
4949
50 QString ownerId() const;50 QString busName() const;
51 QString owner() const;51 QString objectPath() const;
52 QString description() const;52 QString displayName() const;
5353
54 ItemListJob* roots(QStringList const& keys) const;54 ItemListJob* roots(QStringList const& keys) const;
55 ItemJob* get(QString const& itemId, QStringList const& keys) const;55 ItemJob* get(QString const& itemId, QStringList const& keys) const;
@@ -69,24 +69,24 @@
69 static Account make_account(std::shared_ptr<RuntimeImpl> const& runtime_impl,69 static Account make_account(std::shared_ptr<RuntimeImpl> const& runtime_impl,
70 QString const& bus_name,70 QString const& bus_name,
71 QString const& object_path,71 QString const& object_path,
72 QString const& owner_id,72 QString const& id,
73 QString const& owner,73 QString const& service_id,
74 QString const& description);74 QString const& display_name);
7575
76private:76private:
77 AccountImpl(std::shared_ptr<RuntimeImpl> const& runtime_impl,77 AccountImpl(std::shared_ptr<RuntimeImpl> const& runtime_impl,
78 QString const& bus_name,78 QString const& bus_name,
79 QString const& object_path,79 QString const& object_path,
80 QString const& owner_id,80 QString const& id,
81 QString const& owner,81 QString const& service_id,
82 QString const& description);82 QString const& display_name);
8383
84 bool is_valid_;84 bool is_valid_;
85 QString bus_name_;85 QString bus_name_;
86 QString object_path_;86 QString object_path_;
87 QString owner_id_;87 QString id_;
88 QString owner_;88 QString service_id_;
89 QString description_;89 QString display_name_;
90 std::weak_ptr<RuntimeImpl> runtime_impl_;90 std::weak_ptr<RuntimeImpl> runtime_impl_;
91 std::shared_ptr<ProviderInterface> provider_;91 std::shared_ptr<ProviderInterface> provider_;
9292
9393
=== modified file 'include/unity/storage/qt/internal/AccountsJobImpl.h'
--- include/unity/storage/qt/internal/AccountsJobImpl.h 2016-10-12 05:25:20 +0000
+++ include/unity/storage/qt/internal/AccountsJobImpl.h 2016-11-03 07:36:55 +0000
@@ -43,6 +43,7 @@
43 AccountsJob::Status status() const;43 AccountsJob::Status status() const;
44 StorageError error() const;44 StorageError error() const;
45 QList<Account> accounts() const;45 QList<Account> accounts() const;
46 QVariantList accountsAsVariantList() const;
4647
47private Q_SLOTS:48private Q_SLOTS:
48 void manager_ready();49 void manager_ready();
4950
=== modified file 'plugins/Ubuntu/StorageFramework/plugin.cpp'
--- plugins/Ubuntu/StorageFramework/plugin.cpp 2016-09-29 12:28:46 +0000
+++ plugins/Ubuntu/StorageFramework/plugin.cpp 2016-11-03 07:36:55 +0000
@@ -36,8 +36,8 @@
36void StorageFrameworkPlugin::registerTypes(const char* uri)36void StorageFrameworkPlugin::registerTypes(const char* uri)
37{37{
38 qmlRegisterType<Runtime>(uri, 0, 1, "Runtime");38 qmlRegisterType<Runtime>(uri, 0, 1, "Runtime");
39 qmlRegisterUncreatableType<Account>(uri, 0, 1, "Account", "");
39 qmlRegisterUncreatableType<AccountsJob>(uri, 0, 1, "AccountsJob", "Use Runtime to create AccountsJob");40 qmlRegisterUncreatableType<AccountsJob>(uri, 0, 1, "AccountsJob", "Use Runtime to create AccountsJob");
40 qmlRegisterUncreatableType<Account>(uri, 0, 1, "Account", "");
41 qmlRegisterUncreatableType<Item>(uri, 0, 1, "Item", "");41 qmlRegisterUncreatableType<Item>(uri, 0, 1, "Item", "");
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");
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");
4444
=== modified file 'src/qt/Account.cpp'
--- src/qt/Account.cpp 2016-11-02 03:20:03 +0000
+++ src/qt/Account.cpp 2016-11-03 07:36:55 +0000
@@ -78,19 +78,19 @@
78 return p_->is_valid_;78 return p_->is_valid_;
79}79}
8080
81QString Account::owner() const81QString Account::busName() const
82{82{
83 return p_->owner();83 return p_->busName();
84}84}
8585
86QString Account::ownerId() const86QString Account::objectPath() const
87{87{
88 return p_->ownerId();88 return p_->objectPath();
89}89}
9090
91QString Account::description() const91QString Account::displayName() const
92{92{
93 return p_->description();93 return p_->displayName();
94}94}
9595
96ItemListJob* Account::roots(QStringList const& keys) const96ItemListJob* Account::roots(QStringList const& keys) const
9797
=== modified file 'src/qt/AccountsJob.cpp'
--- src/qt/AccountsJob.cpp 2016-09-16 06:25:08 +0000
+++ src/qt/AccountsJob.cpp 2016-11-03 07:36:55 +0000
@@ -21,6 +21,8 @@
21#include <unity/storage/qt/Account.h>21#include <unity/storage/qt/Account.h>
22#include <unity/storage/qt/internal/AccountsJobImpl.h>22#include <unity/storage/qt/internal/AccountsJobImpl.h>
2323
24#include <QVariant>
25
24using namespace unity::storage::qt;26using namespace unity::storage::qt;
25using namespace std;27using namespace std;
2628
@@ -63,6 +65,11 @@
63 return p_->accounts();65 return p_->accounts();
64}66}
6567
68QVariantList AccountsJob::accountsAsVariantList() const
69{
70 return p_->accountsAsVariantList();
71}
72
66} // namespace qt73} // namespace qt
67} // namespace storage74} // namespace storage
68} // namespace unity75} // namespace unity
6976
=== modified file 'src/qt/internal/AccountImpl.cpp'
--- src/qt/internal/AccountImpl.cpp 2016-11-02 03:20:03 +0000
+++ src/qt/internal/AccountImpl.cpp 2016-11-03 07:36:55 +0000
@@ -50,15 +50,15 @@
50AccountImpl::AccountImpl(shared_ptr<RuntimeImpl> const& runtime_impl,50AccountImpl::AccountImpl(shared_ptr<RuntimeImpl> const& runtime_impl,
51 QString const& bus_name,51 QString const& bus_name,
52 QString const& object_path,52 QString const& object_path,
53 QString const& owner_id,53 QString const& id,
54 QString const& owner,54 QString const& service_id,
55 QString const& description)55 QString const& display_name)
56 : is_valid_(true)56 : is_valid_(true)
57 , bus_name_(bus_name)57 , bus_name_(bus_name)
58 , object_path_(object_path)58 , object_path_(object_path)
59 , owner_id_(owner_id)59 , id_(id)
60 , owner_(owner)60 , service_id_(service_id)
61 , description_(description)61 , display_name_(display_name)
62 , runtime_impl_(runtime_impl)62 , runtime_impl_(runtime_impl)
63 , provider_(new ProviderInterface(bus_name, object_path, runtime_impl->connection()))63 , provider_(new ProviderInterface(bus_name, object_path, runtime_impl->connection()))
64{64{
@@ -66,19 +66,19 @@
66 assert(!object_path.isEmpty());66 assert(!object_path.isEmpty());
67}67}
6868
69QString AccountImpl::owner() const69QString AccountImpl::busName() const
70{70{
71 return is_valid_ ? owner_ : "";71 return is_valid_ ? bus_name_ : "";
72}72}
7373
74QString AccountImpl::ownerId() const74QString AccountImpl::objectPath() const
75{75{
76 return is_valid_ ? owner_id_ : "";76 return is_valid_ ? object_path_ : "";
77}77}
7878
79QString AccountImpl::description() const79QString AccountImpl::displayName() const
80{80{
81 return is_valid_ ? description_ : "";81 return is_valid_ ? display_name_ : "";
82}82}
8383
84ItemListJob* AccountImpl::roots(QStringList const& keys) const84ItemListJob* AccountImpl::roots(QStringList const& keys) const
@@ -142,9 +142,9 @@
142 if (is_valid_)142 if (is_valid_)
143 {143 {
144 return other.is_valid_144 return other.is_valid_
145 && owner_ == other.owner_145 && id_ == other.id_
146 && owner_id_ == other.owner_id_146 && service_id_ == other.service_id_
147 && description_ == other.description_;147 && display_name_ == other.display_name_;
148 }148 }
149 return !other.is_valid_;149 return !other.is_valid_;
150}150}
@@ -165,23 +165,23 @@
165 return false;165 return false;
166 }166 }
167 assert(is_valid_ && other.is_valid_);167 assert(is_valid_ && other.is_valid_);
168 if (owner_id_ < other.owner_id_)168 if (id_ < other.id_)
169 {169 {
170 return true;170 return true;
171 }171 }
172 if (owner_id_ > other.owner_id_)172 if (id_ > other.id_)
173 {173 {
174 return false;174 return false;
175 }175 }
176 if (owner_ < other.owner_)176 if (service_id_ < other.service_id_)
177 {177 {
178 return true;178 return true;
179 }179 }
180 if (owner_ > other.owner_)180 if (service_id_ > other.service_id_)
181 {181 {
182 return false;182 return false;
183 }183 }
184 return description_ < other.description_;184 return display_name_ < other.display_name_;
185}185}
186186
187bool AccountImpl::operator<=(AccountImpl const& other) const187bool AccountImpl::operator<=(AccountImpl const& other) const
@@ -216,20 +216,20 @@
216 return 0;216 return 0;
217 }217 }
218 size_t hash = 0;218 size_t hash = 0;
219 boost::hash_combine(hash, qHash(owner_));219 boost::hash_combine(hash, qHash(service_id_));
220 boost::hash_combine(hash, qHash(owner_id_));220 boost::hash_combine(hash, qHash(id_));
221 boost::hash_combine(hash, qHash(description_));221 boost::hash_combine(hash, qHash(display_name_));
222 return hash;222 return hash;
223}223}
224224
225Account AccountImpl::make_account(shared_ptr<RuntimeImpl> const& runtime,225Account AccountImpl::make_account(shared_ptr<RuntimeImpl> const& runtime,
226 QString const& bus_name,226 QString const& bus_name,
227 QString const& object_path,227 QString const& object_path,
228 QString const& owner_id,228 QString const& id,
229 QString const& owner,229 QString const& service_id,
230 QString const& description)230 QString const& display_name)
231{231{
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));
233 return Account(p);233 return Account(p);
234}234}
235235
236236
=== modified file 'src/qt/internal/AccountsJobImpl.cpp'
--- src/qt/internal/AccountsJobImpl.cpp 2016-11-02 09:32:53 +0000
+++ src/qt/internal/AccountsJobImpl.cpp 2016-11-03 07:36:55 +0000
@@ -103,6 +103,16 @@
103 return accounts_;103 return accounts_;
104}104}
105105
106QVariantList AccountsJobImpl::accountsAsVariantList() const
107{
108 QVariantList account_list;
109 for (auto const& a : accounts())
110 {
111 account_list.append(QVariant::fromValue(a));
112 }
113 return account_list;
114}
115
106void AccountsJobImpl::manager_ready()116void AccountsJobImpl::manager_ready()
107{117{
108 timer_.stop();118 timer_.stop();
@@ -171,8 +181,8 @@
171 accounts_.append(AccountImpl::make_account(runtime,181 accounts_.append(AccountImpl::make_account(runtime,
172 bus_name,182 bus_name,
173 object_path,183 object_path,
184 QString::number(a->id()),
174 a->serviceId(),185 a->serviceId(),
175 "",
176 a->displayName()));186 a->displayName()));
177 }187 }
178 }188 }
179189
=== modified file 'tests/remote-client/remote-client_test.cpp'
--- tests/remote-client/remote-client_test.cpp 2016-11-03 03:41:24 +0000
+++ tests/remote-client/remote-client_test.cpp 2016-11-03 07:36:55 +0000
@@ -114,84 +114,84 @@
114 // Default constructor.114 // Default constructor.
115 Account a;115 Account a;
116 EXPECT_FALSE(a.isValid());116 EXPECT_FALSE(a.isValid());
117 EXPECT_EQ("", a.ownerId());117 EXPECT_EQ("", a.busName());
118 EXPECT_EQ("", a.owner());118 EXPECT_EQ("", a.objectPath());
119 EXPECT_EQ("", a.description());119 EXPECT_EQ("", a.displayName());
120 }120 }
121121
122 {122 {
123 auto acc = runtime_->make_test_account(service_connection_->baseService(), object_path(),123 auto acc = runtime_->make_test_account(service_connection_->baseService(), object_path(),
124 "id", "owner", "description");124 "id", "sid", "displayName");
125 EXPECT_TRUE(acc.isValid());125 EXPECT_TRUE(acc.isValid());
126 EXPECT_EQ("id", acc.ownerId());126 EXPECT_EQ(service_connection_->baseService(), acc.busName());
127 EXPECT_EQ("owner", acc.owner());127 EXPECT_EQ(object_path(), acc.objectPath());
128 EXPECT_EQ("description", acc.description());128 EXPECT_EQ("displayName", acc.displayName());
129129
130 // Copy constructor130 // Copy constructor
131 Account a2(acc);131 Account a2(acc);
132 EXPECT_TRUE(a2.isValid());132 EXPECT_TRUE(a2.isValid());
133 EXPECT_EQ("id", a2.ownerId());133 EXPECT_EQ(service_connection_->baseService(), a2.busName());
134 EXPECT_EQ("owner", a2.owner());134 EXPECT_EQ(object_path(), a2.objectPath());
135 EXPECT_EQ("description", a2.description());135 EXPECT_EQ("displayName", a2.displayName());
136136
137 // Move constructor137 // Move constructor
138 Account a3(move(a2));138 Account a3(move(a2));
139 EXPECT_TRUE(a3.isValid());139 EXPECT_TRUE(a3.isValid());
140 EXPECT_EQ("id", a3.ownerId());140 EXPECT_EQ(service_connection_->baseService(), a3.busName());
141 EXPECT_EQ("owner", a3.owner());141 EXPECT_EQ(object_path(), a3.objectPath());
142 EXPECT_EQ("description", a3.description());142 EXPECT_EQ("displayName", a3.displayName());
143143
144 // Moved-from object must be invalid144 // Moved-from object must be invalid
145 EXPECT_FALSE(a2.isValid());145 EXPECT_FALSE(a2.isValid());
146146
147 // Moved-from object must be assignable147 // Moved-from object must be assignable
148 auto a4 = runtime_->make_test_account(service_connection_->baseService(), object_path(),148 auto a4 = runtime_->make_test_account(service_connection_->baseService(), object_path(),
149 "id4", "owner4", "description4");149 "id4", "sid4", "displayName4");
150 a2 = a4;150 a2 = a4;
151 EXPECT_TRUE(a2.isValid());151 EXPECT_TRUE(a2.isValid());
152 EXPECT_EQ("id4", a2.ownerId());152 EXPECT_EQ(service_connection_->baseService(), a2.busName());
153 EXPECT_EQ("owner4", a2.owner());153 EXPECT_EQ(object_path(), a2.objectPath());
154 EXPECT_EQ("description4", a2.description());154 EXPECT_EQ("displayName4", a2.displayName());
155 }155 }
156156
157 {157 {
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");
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");
160160
161 // Copy assignment161 // Copy assignment
162 a1 = a2;162 a1 = a2;
163 EXPECT_TRUE(a2.isValid());163 EXPECT_TRUE(a2.isValid());
164 EXPECT_EQ("id2", a1.ownerId());164 EXPECT_EQ(service_connection_->baseService(), a1.busName());
165 EXPECT_EQ("owner2", a2.owner());165 EXPECT_EQ(object_path(), a1.objectPath());
166 EXPECT_EQ("description2", a1.description());166 EXPECT_EQ("dn2", a1.displayName());
167167
168 // Self-assignment168 // Self-assignment
169 a2 = a2;169 a2 = a2;
170 EXPECT_TRUE(a2.isValid());170 EXPECT_TRUE(a2.isValid());
171 EXPECT_EQ("id2", a1.ownerId());171 EXPECT_EQ(service_connection_->baseService(), a1.busName());
172 EXPECT_EQ("owner2", a2.owner());172 EXPECT_EQ(object_path(), a1.objectPath());
173 EXPECT_EQ("description2", a1.description());173 EXPECT_EQ("dn2", a1.displayName());
174174
175 // Move assignment175 // Move assignment
176 auto a3 = runtime_->make_test_account(service_connection_->baseService(), object_path(),176 auto a3 = runtime_->make_test_account(service_connection_->baseService(), object_path(),
177 "id3", "owner3", "description3");177 "id3", "sid3", "dn3");
178 a1 = move(a3);178 a1 = move(a3);
179 EXPECT_TRUE(a1.isValid());179 EXPECT_TRUE(a1.isValid());
180 EXPECT_EQ("id3", a1.ownerId());180 EXPECT_EQ(service_connection_->baseService(), a1.busName());
181 EXPECT_EQ("owner3", a1.owner());181 EXPECT_EQ(object_path(), a1.objectPath());
182 EXPECT_EQ("description3", a1.description());182 EXPECT_EQ("dn3", a1.displayName());
183183
184 // Moved-from object must be invalid184 // Moved-from object must be invalid
185 EXPECT_FALSE(a3.isValid());185 EXPECT_FALSE(a3.isValid());
186186
187 // Moved-from object must be assignable187 // Moved-from object must be assignable
188 auto a4 = runtime_->make_test_account(service_connection_->baseService(), object_path(),188 auto a4 = runtime_->make_test_account(service_connection_->baseService(), object_path(),
189 "id4", "owner4", "description4");189 "id4", "sid4", "dn4");
190 a2 = a4;190 a2 = a4;
191 EXPECT_TRUE(a2.isValid());191 EXPECT_TRUE(a2.isValid());
192 EXPECT_EQ("id4", a2.ownerId());192 EXPECT_EQ(service_connection_->baseService(), a2.busName());
193 EXPECT_EQ("owner4", a2.owner());193 EXPECT_EQ(object_path(), a2.objectPath());
194 EXPECT_EQ("description4", a2.description());194 EXPECT_EQ("dn4", a2.displayName());
195 }195 }
196}196}
197197
@@ -230,7 +230,7 @@
230 }230 }
231231
232 {232 {
233 // a1 < a2 for owner ID233 // a1 < a2 for ID
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");
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");
236236
@@ -251,7 +251,7 @@
251 }251 }
252252
253 {253 {
254 // a1 < a2 for owner254 // a1 < a2 for service ID
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");
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");
257257
@@ -272,7 +272,7 @@
272 }272 }
273273
274 {274 {
275 // a1 < a2 for description275 // a1 < a2 for display name
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");
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");
278278
@@ -994,18 +994,6 @@
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());
995}995}
996996
997#if 0
998// TODO: need to make internal symbols available for testing.
999TEST_F(ValidateTest, basic)
1000{
1001 using namespace unity::storage::qt::internal;
1002
1003 unity::storage::internal::ItemMetadata md;
1004
1005 validate("foo", md);
1006}
1007#endif
1008
1009TEST_F(ItemTest, basic)997TEST_F(ItemTest, basic)
1010{998{
1011 set_provider(unique_ptr<provider::ProviderBase>(new MockProvider()));999 set_provider(unique_ptr<provider::ProviderBase>(new MockProvider()));

Subscribers

People subscribed via source and target branches

to all changes: