Merge lp:~michihenning/storage-framework/qt-cmake-fixes into lp:storage-framework/devel

Proposed by Michi Henning
Status: Merged
Approved by: James Henstridge
Approved revision: 39
Merged at revision: 25
Proposed branch: lp:~michihenning/storage-framework/qt-cmake-fixes
Merge into: lp:storage-framework/devel
Diff against target: 620 lines (+162/-131)
23 files modified
CMakeLists.txt (+2/-1)
debian/control (+1/-0)
debian/source/format (+1/-1)
include/unity/storage/provider/UploadJob.h (+1/-1)
include/unity/storage/provider/internal/Handler.h (+1/-1)
include/unity/storage/qt/client/internal/boost_filesystem.h (+1/-1)
include/unity/storage/qt/client/internal/local_client/AccountImpl.h (+0/-1)
include/unity/storage/qt/client/internal/local_client/ItemImpl.h (+1/-2)
include/unity/storage/qt/client/internal/remote_client/FileImpl.h (+1/-1)
include/unity/storage/qt/client/internal/remote_client/Handler.h (+18/-5)
include/unity/storage/qt/client/internal/remote_client/HandlerBase.h (+9/-3)
include/unity/storage/qt/client/internal/remote_client/RootImpl.h (+1/-1)
src/provider/CMakeLists.txt (+2/-1)
src/provider/internal/dbusmarshal.cpp (+2/-2)
src/qt/client/CMakeLists.txt (+78/-41)
src/qt/client/internal/CMakeLists.txt (+3/-0)
src/qt/client/internal/local_client/CMakeLists.txt (+15/-23)
src/qt/client/internal/remote_client/CMakeLists.txt (+15/-36)
src/qt/client/internal/remote_client/FileImpl.cpp (+5/-5)
src/qt/client/internal/remote_client/HandlerBase.cpp (+2/-2)
tests/local-client/CMakeLists.txt (+1/-1)
tests/local-client/local-client_test.cpp (+2/-1)
tests/remote-client/CMakeLists.txt (+0/-1)
To merge this branch: bzr merge lp:~michihenning/storage-framework/qt-cmake-fixes
Reviewer Review Type Date Requested Status
James Henstridge Approve
unity-api-1-bot continuous-integration Needs Fixing
Review via email: mp+299767@code.launchpad.net

Commit message

Get rid of the old qt5_use_modules macros.
Changed cmake files to build the local and remote libs in the qt/client
dir because we cannot add .moc files to OBJECT libraries on Vivid.
Added GENERATED property to generated files.
Adjusted indentation in a few places.
Fixed a bunch of clang warnings.
Added work-around for gcc 4.9 bug on Vivid.
Fixed build failure with boost::filesystem on Vivid.
Changed source package format back to 1.0 due to bug in Jenkins.

Description of the change

Get rid of the old qt5_use_modules macros.

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

FAILED: Continuous integration, rev:25
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/14/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build/137/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/145
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=vivid+overlay/92
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=xenial+overlay/92
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=yakkety/92
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=vivid+overlay/74/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/74/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=yakkety/74/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=vivid+overlay/74/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/74/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=yakkety/74/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=vivid+overlay/74/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/74/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=yakkety/74/console

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

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

FAILED: Continuous integration, rev:26
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/15/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build/141/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/149
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=vivid+overlay/96
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=xenial+overlay/96
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=yakkety/96
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=vivid+overlay/78/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/78/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=yakkety/78/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=vivid+overlay/78/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/78/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=yakkety/78/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=vivid+overlay/78/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/78/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=yakkety/78/console

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

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

FAILED: Continuous integration, rev:27
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/16/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build/142/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/150
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=vivid+overlay/97
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=xenial+overlay/97
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=yakkety/97
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=vivid+overlay/79/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/79/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=yakkety/79/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=vivid+overlay/79/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/79/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=yakkety/79/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=vivid+overlay/79/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/79/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=yakkety/79/console

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

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

FAILED: Continuous integration, rev:29
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/17/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build/145/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/153
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=vivid+overlay/100
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=xenial+overlay/100
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=yakkety/100
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=vivid+overlay/81/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/81/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=yakkety/81/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=vivid+overlay/81/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/81/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=yakkety/81/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=vivid+overlay/81/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/81/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=yakkety/81/console

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

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

FAILED: Continuous integration, rev:38
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/18/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build/154/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/162
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=vivid+overlay/107
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=xenial+overlay/107
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=yakkety/107
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=vivid+overlay/88/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/88/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=yakkety/88/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=vivid+overlay/88/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/88/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=yakkety/88/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=vivid+overlay/88/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/88/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=yakkety/88/console

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

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

This mostly looks good. I noted a few problems though that I've noted with inline comments.

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

Also, you've added libunity-api-dev to Build-Depends in debian/control. Do we actually need it? I don't see any of its headers included anywhere.

39. By Michi Henning

Fixed broken coverage in top-level cmake file. Simplified boost version check.

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

We need unity-api because I'm using ResourcePtr. It's a build dependency only because ResourcePtr is a template.

I fixed the other two issues, thanks!

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

Looks great.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2016-07-11 03:28:40 +0000
+++ CMakeLists.txt 2016-07-20 01:16:16 +0000
@@ -106,6 +106,7 @@
106find_package(Qt5Core REQUIRED)106find_package(Qt5Core REQUIRED)
107find_package(Qt5DBus REQUIRED)107find_package(Qt5DBus REQUIRED)
108find_package(Qt5Network REQUIRED)108find_package(Qt5Network REQUIRED)
109find_package(Qt5Test REQUIRED)
109110
110include(FindPkgConfig)111include(FindPkgConfig)
111pkg_check_modules(APPARMOR_DEPS REQUIRED libapparmor)112pkg_check_modules(APPARMOR_DEPS REQUIRED libapparmor)
@@ -121,7 +122,7 @@
121122
122enable_coverage_report(123enable_coverage_report(
123 TARGETS124 TARGETS
124 qt-client-lib-public125 qt-client-lib-common
125 storage-framework-qt-client126 storage-framework-qt-client
126 storage-framework-qt-local-client127 storage-framework-qt-local-client
127 FILTER128 FILTER
128129
=== modified file 'debian/control'
--- debian/control 2016-07-12 02:22:05 +0000
+++ debian/control 2016-07-20 01:16:16 +0000
@@ -16,6 +16,7 @@
16 libglib2.0-dev,16 libglib2.0-dev,
17 libgtest-dev,17 libgtest-dev,
18 libonline-accounts-qt-dev,18 libonline-accounts-qt-dev,
19 libunity-api-dev,
19 qtbase5-dev,20 qtbase5-dev,
20 qtbase5-dev-tools,21 qtbase5-dev-tools,
21Homepage: https://launchpad.net/storage-framework22Homepage: https://launchpad.net/storage-framework
2223
=== modified file 'debian/source/format'
--- debian/source/format 2016-07-12 02:22:05 +0000
+++ debian/source/format 2016-07-20 01:16:16 +0000
@@ -1,1 +1,1 @@
13.0 (quilt)11.0
22
=== modified file 'include/unity/storage/provider/UploadJob.h'
--- include/unity/storage/provider/UploadJob.h 2016-07-12 02:22:05 +0000
+++ include/unity/storage/provider/UploadJob.h 2016-07-20 01:16:16 +0000
@@ -30,7 +30,7 @@
30namespace provider30namespace provider
31{31{
3232
33class Item;33struct Item;
3434
35namespace internal35namespace internal
36{36{
3737
=== modified file 'include/unity/storage/provider/internal/Handler.h'
--- include/unity/storage/provider/internal/Handler.h 2016-07-12 02:22:05 +0000
+++ include/unity/storage/provider/internal/Handler.h 2016-07-20 01:16:16 +0000
@@ -34,7 +34,7 @@
34namespace provider34namespace provider
35{35{
3636
37class Context;37struct Context;
38class ProviderBase;38class ProviderBase;
3939
40namespace internal40namespace internal
4141
=== modified file 'include/unity/storage/qt/client/internal/boost_filesystem.h'
--- include/unity/storage/qt/client/internal/boost_filesystem.h 2016-07-12 02:22:05 +0000
+++ include/unity/storage/qt/client/internal/boost_filesystem.h 2016-07-20 01:16:16 +0000
@@ -20,7 +20,7 @@
2020
21#include <boost/version.hpp>21#include <boost/version.hpp>
2222
23#if BOOST_VERSION / 100000 == 1 && BOOST_VERSION / 100 & 1000 <= 5523#if BOOST_VERSION < 105500
24 #define BOOST_NO_CXX11_SCOPED_ENUMS24 #define BOOST_NO_CXX11_SCOPED_ENUMS
25 #include <boost/filesystem.hpp>25 #include <boost/filesystem.hpp>
26 #undef BOOST_NO_CXX11_SCOPED_ENUMS26 #undef BOOST_NO_CXX11_SCOPED_ENUMS
2727
=== modified file 'include/unity/storage/qt/client/internal/local_client/AccountImpl.h'
--- include/unity/storage/qt/client/internal/local_client/AccountImpl.h 2016-07-12 02:22:05 +0000
+++ include/unity/storage/qt/client/internal/local_client/AccountImpl.h 2016-07-20 01:16:16 +0000
@@ -51,7 +51,6 @@
51 QString owner_id_; // Immutable51 QString owner_id_; // Immutable
52 QString description_; // Immutable52 QString description_; // Immutable
53 QVector<std::shared_ptr<Root>> roots_; // Immutable53 QVector<std::shared_ptr<Root>> roots_; // Immutable
54 std::atomic_bool copy_in_progress_;
55};54};
5655
57} // namespace local_client56} // namespace local_client
5857
=== modified file 'include/unity/storage/qt/client/internal/local_client/ItemImpl.h'
--- include/unity/storage/qt/client/internal/local_client/ItemImpl.h 2016-07-12 02:22:05 +0000
+++ include/unity/storage/qt/client/internal/local_client/ItemImpl.h 2016-07-20 01:16:16 +0000
@@ -19,10 +19,9 @@
19#pragma once19#pragma once
2020
21#include <unity/storage/common.h>21#include <unity/storage/common.h>
22#include <unity/storage/qt/client/internal/boost_filesystem.h>
22#include <unity/storage/qt/client/internal/ItemBase.h>23#include <unity/storage/qt/client/internal/ItemBase.h>
2324
24#include <boost/filesystem.hpp>
25
26#include <mutex>25#include <mutex>
2726
28namespace unity27namespace unity
2928
=== modified file 'include/unity/storage/qt/client/internal/remote_client/FileImpl.h'
--- include/unity/storage/qt/client/internal/remote_client/FileImpl.h 2016-07-12 02:22:05 +0000
+++ include/unity/storage/qt/client/internal/remote_client/FileImpl.h 2016-07-20 01:16:16 +0000
@@ -28,7 +28,7 @@
28namespace internal28namespace internal
29{29{
3030
31class ItemMetadata;31struct ItemMetadata;
3232
33} // namespace internal33} // namespace internal
3434
3535
=== modified file 'include/unity/storage/qt/client/internal/remote_client/Handler.h'
--- include/unity/storage/qt/client/internal/remote_client/Handler.h 2016-07-12 02:22:05 +0000
+++ include/unity/storage/qt/client/internal/remote_client/Handler.h 2016-07-20 01:16:16 +0000
@@ -44,8 +44,8 @@
44public:44public:
45 template<typename ... DBusArgs>45 template<typename ... DBusArgs>
46 Handler(QObject* parent,46 Handler(QObject* parent,
47 QDBusPendingReply<DBusArgs...> const& reply,47 QDBusPendingReply<DBusArgs...>& reply,
48 std::function<void(decltype(reply) const&, QFutureInterface<T>&)> closure);48 std::function<void(decltype(reply)&, QFutureInterface<T>&)> closure);
4949
50 QFuture<T> future();50 QFuture<T> future();
5151
@@ -53,12 +53,23 @@
53 QFutureInterface<T> qf_;53 QFutureInterface<T> qf_;
54};54};
5555
56// TODO: HACK: The reply argument really should be passed by const reference, which also
57// would make the explicit conversion of the call to QDBusPendingReply<QDBusArgs...>
58// unnecessary. But this doesn't work with gcc 4.9: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60420
59// Once we get rid of Vivid, this should be changed back to
60//
61// Handler<T>::Handler(QObject* parent,
62// QDBusPendingReply<DBusArgs...> const& reply,
63// std::function<void(decltype(reply) const&, QFutureInterface<T>&)> closure)
64
56template<typename T>65template<typename T>
57template<typename ... DBusArgs>66template<typename ... DBusArgs>
58Handler<T>::Handler(QObject* parent, QDBusPendingReply<DBusArgs...> const& reply, std::function<void(decltype(reply) const&, QFutureInterface<T>&)> closure)67Handler<T>::Handler(QObject* parent,
68 QDBusPendingReply<DBusArgs...>& reply,
69 std::function<void(decltype(reply)&, QFutureInterface<T>&)> closure)
59 : HandlerBase(parent,70 : HandlerBase(parent,
60 reply,71 reply,
61 [this, closure](QDBusPendingCallWatcher const& call)72 [this, closure](QDBusPendingCallWatcher& call)
62 {73 {
63 if (call.isError())74 if (call.isError())
64 {75 {
@@ -67,7 +78,9 @@
67 qf_.reportFinished();78 qf_.reportFinished();
68 return;79 return;
69 }80 }
70 closure(call, qf_);81 // TODO: See HACK above. Should just be closure(call, qf_);
82 QDBusPendingReply<DBusArgs...> r = call;
83 closure(r, qf_);
71 })84 })
72{85{
73 qf_.reportStarted();86 qf_.reportStarted();
7487
=== modified file 'include/unity/storage/qt/client/internal/remote_client/HandlerBase.h'
--- include/unity/storage/qt/client/internal/remote_client/HandlerBase.h 2016-07-12 02:22:05 +0000
+++ include/unity/storage/qt/client/internal/remote_client/HandlerBase.h 2016-07-20 01:16:16 +0000
@@ -47,9 +47,15 @@
47 Q_OBJECT47 Q_OBJECT
4848
49public:49public:
50 // TODO: HACK: gcc 4.9 bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60420
51 // Once we get rid of Vivid, this should be changed back to
52 //
53 // HandlerBase(QObject* parent,
54 // QDBusPendingCall const& call,
55 // std::function<void(QDBusPendingCallWatcher const&)> const& closure);
50 HandlerBase(QObject* parent,56 HandlerBase(QObject* parent,
51 QDBusPendingCall const& call,57 QDBusPendingCall& call,
52 std::function<void(QDBusPendingCallWatcher const&)> closure);58 std::function<void(QDBusPendingCallWatcher&)> const& closure);
5359
54public Q_SLOTS:60public Q_SLOTS:
55 void finished(QDBusPendingCallWatcher* call);61 void finished(QDBusPendingCallWatcher* call);
@@ -58,7 +64,7 @@
58 QDBusPendingCallWatcher watcher_;64 QDBusPendingCallWatcher watcher_;
5965
60private:66private:
61 std::function<void(QDBusPendingCallWatcher const&)> closure_;67 std::function<void(QDBusPendingCallWatcher&)> closure_;
62};68};
6369
64} // namespace remote_client70} // namespace remote_client
6571
=== modified file 'include/unity/storage/qt/client/internal/remote_client/RootImpl.h'
--- include/unity/storage/qt/client/internal/remote_client/RootImpl.h 2016-07-12 02:22:05 +0000
+++ include/unity/storage/qt/client/internal/remote_client/RootImpl.h 2016-07-20 01:16:16 +0000
@@ -28,7 +28,7 @@
28namespace internal28namespace internal
29{29{
3030
31class ItemMetadata;31struct ItemMetadata;
3232
33} // namespace internal33} // namespace internal
3434
3535
=== modified file 'src/provider/CMakeLists.txt'
--- src/provider/CMakeLists.txt 2016-07-11 03:28:40 +0000
+++ src/provider/CMakeLists.txt 2016-07-20 01:16:16 +0000
@@ -11,6 +11,8 @@
11set_source_files_properties(bus.xml PROPERTIES CLASSNAME BusInterface)11set_source_files_properties(bus.xml PROPERTIES CLASSNAME BusInterface)
12qt5_add_dbus_interface(generated_files bus.xml businterface)12qt5_add_dbus_interface(generated_files bus.xml businterface)
1313
14set_source_files_properties(${generated_files} PROPERTIES GENERATED TRUE)
15
14add_library(storage-framework-provider SHARED16add_library(storage-framework-provider SHARED
15 DownloadJob.cpp17 DownloadJob.cpp
16 ProviderBase.cpp18 ProviderBase.cpp
@@ -46,7 +48,6 @@
46 SOVERSION ${SF_PROVIDER_SOVERSION}48 SOVERSION ${SF_PROVIDER_SOVERSION}
47 VERSION ${SF_PROVIDER_LIBVERSION}49 VERSION ${SF_PROVIDER_LIBVERSION}
48)50)
49qt5_use_modules(storage-framework-provider Core DBus Network)
50target_link_libraries(storage-framework-provider51target_link_libraries(storage-framework-provider
51 Qt5::Core52 Qt5::Core
52 Qt5::DBus53 Qt5::DBus
5354
=== modified file 'src/provider/internal/dbusmarshal.cpp'
--- src/provider/internal/dbusmarshal.cpp 2016-07-12 02:22:05 +0000
+++ src/provider/internal/dbusmarshal.cpp 2016-07-20 01:16:16 +0000
@@ -51,7 +51,7 @@
51 return argument;51 return argument;
52}52}
5353
54QDBusArgument const& operator>>(QDBusArgument const& argument, Item& item)54QDBusArgument const& operator>>(QDBusArgument const&, Item&)
55{55{
56 throw std::runtime_error("Item decode not implemented");56 throw std::runtime_error("Item decode not implemented");
57}57}
@@ -67,7 +67,7 @@
67 return argument;67 return argument;
68}68}
6969
70QDBusArgument const& operator>>(QDBusArgument const& argument, ItemList& items)70QDBusArgument const& operator>>(QDBusArgument const&, ItemList&)
71{71{
72 throw std::runtime_error("std::vector<Item> decode not implemented");72 throw std::runtime_error("std::vector<Item> decode not implemented");
73}73}
7474
=== modified file 'src/qt/client/CMakeLists.txt'
--- src/qt/client/CMakeLists.txt 2016-07-11 03:28:40 +0000
+++ src/qt/client/CMakeLists.txt 2016-07-20 01:16:16 +0000
@@ -1,4 +1,7 @@
1add_library(qt-client-lib-public OBJECT1# Create an OBJECT library for the files that are used by both
2# local and remote client libraries, so we don't compile them twice.
3
4add_library(qt-client-lib-common OBJECT
2 Account.cpp5 Account.cpp
3 Downloader.cpp6 Downloader.cpp
4 Exceptions.cpp7 Exceptions.cpp
@@ -19,61 +22,95 @@
19 ${CMAKE_SOURCE_DIR}/include/unity/storage/qt/client/internal/DownloaderBase.h22 ${CMAKE_SOURCE_DIR}/include/unity/storage/qt/client/internal/DownloaderBase.h
20 ${CMAKE_SOURCE_DIR}/include/unity/storage/qt/client/internal/UploaderBase.h23 ${CMAKE_SOURCE_DIR}/include/unity/storage/qt/client/internal/UploaderBase.h
21)24)
22target_include_directories(qt-client-lib-public PRIVATE25target_include_directories(qt-client-lib-common PRIVATE
23 ${Qt5Core_INCLUDE_DIRS}26 ${Qt5Network_INCLUDE_DIRS}
24 ${Qt5Network_INCLUDE_DIRS})27)
25set_target_properties(qt-client-lib-public PROPERTIES28set_target_properties(qt-client-lib-common PROPERTIES
26 AUTOMOC TRUE29 AUTOMOC TRUE
27 POSITION_INDEPENDENT_CODE TRUE30 POSITION_INDEPENDENT_CODE TRUE
28)31)
2932
33# We build both local and remote client libraries here instead
34# of creating OBJECT libraries for them because cmake 3.0.2 (which
35# is in the Vivid overlay) cannot handle .moc files in OBJECT libraries.
36
37# Descend into the child directories first. The CMakeLists.txt files
38# there set QT_CLIENT_LIB_LOCAL_SRC and QT_CLIENT_LIB_REMOTE_SRC.
30add_subdirectory(internal)39add_subdirectory(internal)
3140
32# Build the local loopback client library41# Build the local loopback client library
33add_library(storage-framework-qt-local-client SHARED42add_library(storage-framework-qt-local-client SHARED
34 $<TARGET_OBJECTS:qt-client-lib-public>43 $<TARGET_OBJECTS:qt-client-lib-common>
35 $<TARGET_OBJECTS:qt-client-lib-local>)44 ${QT_CLIENT_LIB_LOCAL_SRC}
36qt5_use_modules(storage-framework-qt-local-client Concurrent Core Network)45)
46target_include_directories(storage-framework-qt-local-client PRIVATE
47 ${GLIB_DEPS_INCLUDE_DIRS}
48 ${Qt5Core_INCLUDE_DIRS}
49 ${Qt5Network_INCLUDE_DIRS}
50 ${Qt5Concurrent_INCLUDE_DIRS}
51)
37set_target_properties(storage-framework-qt-local-client PROPERTIES52set_target_properties(storage-framework-qt-local-client PROPERTIES
38 AUTOMOC TRUE53 AUTOMOC TRUE
39 LINK_FLAGS "-Wl,--no-undefined"54 POSITION_INDEPENDENT_CODE TRUE
40 OUTPUT_NAME "storage-framework-qt-local-client-${SF_CLIENT_API_VERSION}"55 LINK_FLAGS "-Wl,--no-undefined"
41 SOVERSION ${SF_CLIENT_SOVERSION}56 OUTPUT_NAME "storage-framework-qt-local-client-${SF_CLIENT_API_VERSION}"
42 VERSION ${SF_CLIENT_LIBVERSION}57 SOVERSION ${SF_CLIENT_SOVERSION}
58 VERSION ${SF_CLIENT_LIBVERSION}
43)59)
44target_link_libraries(storage-framework-qt-local-client60target_link_libraries(storage-framework-qt-local-client
45 Qt5::Concurrent61 Qt5::Concurrent
46 Qt5::Core62 Qt5::Core
47 Qt5::Network63 Qt5::Network
48 ${Boost_LIBRARIES}64 ${Boost_LIBRARIES}
49 ${GLIB_DEPS_LIBRARIES})65 ${GLIB_DEPS_LIBRARIES}
5066)
51install(67install(
52 TARGETS storage-framework-qt-local-client68 TARGETS storage-framework-qt-local-client
53 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}69 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
54)70)
5571
56configure_file(72configure_file(
57 storage-framework-qt-local-client.pc.in73 storage-framework-qt-local-client.pc.in
58 storage-framework-qt-local-client-${SF_CLIENT_API_VERSION}.pc74 storage-framework-qt-local-client-${SF_CLIENT_API_VERSION}.pc
59)75)
60install(76install(
61 FILES ${CMAKE_CURRENT_BINARY_DIR}/storage-framework-qt-local-client-${SF_CLIENT_API_VERSION}.pc77 FILES ${CMAKE_CURRENT_BINARY_DIR}/storage-framework-qt-local-client-${SF_CLIENT_API_VERSION}.pc
62 DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig78 DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
63)79)
6480
65# Build the remote client library81# Build the remote client library
82set_source_files_properties(${CMAKE_SOURCE_DIR}/data/provider.xml PROPERTIES
83 CLASSNAME ProviderInterface
84 INCLUDE unity/storage/qt/client/internal/remote_client/dbusmarshal.h
85)
86
87qt5_add_dbus_interface(generated_files
88 ${CMAKE_SOURCE_DIR}/data/provider.xml
89 ProviderInterface
90)
91set_source_files_properties(${generated_files} PROPERTIES
92 COMPILE_FLAGS -Wno-ctor-dtor-privacy
93 GENERATED TRUE
94)
6695
67add_library(storage-framework-qt-client SHARED96add_library(storage-framework-qt-client SHARED
68 $<TARGET_OBJECTS:qt-client-lib-public>97 $<TARGET_OBJECTS:qt-client-lib-common>
69 $<TARGET_OBJECTS:qt-client-lib-remote>)98 ${QT_CLIENT_LIB_REMOTE_SRC}
70qt5_use_modules(storage-framework-qt-client Core DBus Network)99 ${generated_files}
100)
101target_include_directories(storage-framework-qt-client PRIVATE
102 ${GLIB_DEPS_INCLUDE_DIRS}
103 ${ONLINEACCOUNTS_DEPS_INCLUDE_DIRS}
104 ${Qt5Core_INCLUDE_DIRS}
105 ${Qt5DBus_INCLUDE_DIRS}
106 ${Qt5Network_INCLUDE_DIRS}
107)
71set_target_properties(storage-framework-qt-client PROPERTIES108set_target_properties(storage-framework-qt-client PROPERTIES
72 AUTOMOC TRUE109 AUTOMOC TRUE
73 LINK_FLAGS "-Wl,--no-undefined"110 LINK_FLAGS "-Wl,--no-undefined"
74 OUTPUT_NAME "storage-framework-qt-client-${SF_CLIENT_API_VERSION}"111 OUTPUT_NAME "storage-framework-qt-client-${SF_CLIENT_API_VERSION}"
75 SOVERSION ${SF_CLIENT_SOVERSION}112 SOVERSION ${SF_CLIENT_SOVERSION}
76 VERSION ${SF_CLIENT_LIBVERSION}113 VERSION ${SF_CLIENT_LIBVERSION}
77)114)
78target_link_libraries(storage-framework-qt-client115target_link_libraries(storage-framework-qt-client
79 Qt5::Concurrent116 Qt5::Concurrent
@@ -81,18 +118,18 @@
81 Qt5::DBus118 Qt5::DBus
82 Qt5::Network119 Qt5::Network
83 ${Boost_LIBRARIES}120 ${Boost_LIBRARIES}
84 ${ONLINEACCOUNTS_DEPS_LDFLAGS})121 ${ONLINEACCOUNTS_DEPS_LDFLAGS}
85122)
86install(123install(
87 TARGETS storage-framework-qt-client124 TARGETS storage-framework-qt-client
88 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}125 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
89)126)
90127
91configure_file(128configure_file(
92 storage-framework-qt-client.pc.in129 storage-framework-qt-client.pc.in
93 storage-framework-qt-client-${SF_CLIENT_API_VERSION}.pc130 storage-framework-qt-client-${SF_CLIENT_API_VERSION}.pc
94)131)
95install(132install(
96 FILES ${CMAKE_CURRENT_BINARY_DIR}/storage-framework-qt-client-${SF_CLIENT_API_VERSION}.pc133 FILES ${CMAKE_CURRENT_BINARY_DIR}/storage-framework-qt-client-${SF_CLIENT_API_VERSION}.pc
97 DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig134 DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
98)135)
99136
=== modified file 'src/qt/client/internal/CMakeLists.txt'
--- src/qt/client/internal/CMakeLists.txt 2016-06-22 04:51:19 +0000
+++ src/qt/client/internal/CMakeLists.txt 2016-07-20 01:16:16 +0000
@@ -1,2 +1,5 @@
1add_subdirectory(local_client)1add_subdirectory(local_client)
2add_subdirectory(remote_client)2add_subdirectory(remote_client)
3
4SET(QT_CLIENT_LIB_REMOTE_SRC ${QT_CLIENT_LIB_REMOTE_SRC} PARENT_SCOPE)
5SET(QT_CLIENT_LIB_LOCAL_SRC ${QT_CLIENT_LIB_LOCAL_SRC} PARENT_SCOPE)
36
=== modified file 'src/qt/client/internal/local_client/CMakeLists.txt'
--- src/qt/client/internal/local_client/CMakeLists.txt 2016-07-11 02:55:24 +0000
+++ src/qt/client/internal/local_client/CMakeLists.txt 2016-07-20 01:16:16 +0000
@@ -1,24 +1,16 @@
1add_library(qt-client-lib-local OBJECT1set(QT_CLIENT_LIB_LOCAL_SRC
2 AccountImpl.cpp2 ${CMAKE_CURRENT_SOURCE_DIR}/AccountImpl.cpp
3 DownloaderImpl.cpp3 ${CMAKE_CURRENT_SOURCE_DIR}/DownloaderImpl.cpp
4 FileImpl.cpp4 ${CMAKE_CURRENT_SOURCE_DIR}/FileImpl.cpp
5 FolderImpl.cpp5 ${CMAKE_CURRENT_SOURCE_DIR}/FolderImpl.cpp
6 ItemImpl.cpp6 ${CMAKE_CURRENT_SOURCE_DIR}/ItemImpl.cpp
7 RootImpl.cpp7 ${CMAKE_CURRENT_SOURCE_DIR}/RootImpl.cpp
8 Runtime_create.cpp8 ${CMAKE_CURRENT_SOURCE_DIR}/Runtime_create.cpp
9 RuntimeImpl.cpp9 ${CMAKE_CURRENT_SOURCE_DIR}/RuntimeImpl.cpp
10 UploaderImpl.cpp10 ${CMAKE_CURRENT_SOURCE_DIR}/UploaderImpl.cpp
11 ${CMAKE_SOURCE_DIR}/include/unity/storage/qt/client/internal/local_client/DownloaderImpl.h11 ${CMAKE_SOURCE_DIR}/include/unity/storage/qt/client/internal/local_client/DownloaderImpl.h
12 ${CMAKE_SOURCE_DIR}/include/unity/storage/qt/client/internal/local_client/UploaderImpl.h12 ${CMAKE_SOURCE_DIR}/include/unity/storage/qt/client/internal/local_client/UploaderImpl.h
13 ${CMAKE_SOURCE_DIR}/include/unity/storage/qt/client/internal/local_client/RuntimeImpl.h13 ${CMAKE_SOURCE_DIR}/include/unity/storage/qt/client/internal/local_client/RuntimeImpl.h
14 ${CMAKE_SOURCE_DIR}/include/unity/storage/qt/client/internal/RuntimeBase.h14 ${CMAKE_SOURCE_DIR}/include/unity/storage/qt/client/internal/RuntimeBase.h
15)15 PARENT_SCOPE
16target_include_directories(qt-client-lib-local PRIVATE
17 ${GLIB_DEPS_INCLUDE_DIRS}
18 ${Qt5Core_INCLUDE_DIRS}
19 ${Qt5Network_INCLUDE_DIRS}
20 ${Qt5Concurrent_INCLUDE_DIRS})
21set_target_properties(qt-client-lib-local PROPERTIES
22 AUTOMOC TRUE
23 POSITION_INDEPENDENT_CODE TRUE
24)16)
2517
=== modified file 'src/qt/client/internal/remote_client/CMakeLists.txt'
--- src/qt/client/internal/remote_client/CMakeLists.txt 2016-07-11 05:42:50 +0000
+++ src/qt/client/internal/remote_client/CMakeLists.txt 2016-07-20 01:16:16 +0000
@@ -1,36 +1,15 @@
1set_source_files_properties(${CMAKE_SOURCE_DIR}/data/provider.xml PROPERTIES1set(QT_CLIENT_LIB_REMOTE_SRC
2 CLASSNAME ProviderInterface2 ${CMAKE_CURRENT_SOURCE_DIR}/AccountImpl.cpp
3 INCLUDE unity/storage/qt/client/internal/remote_client/dbusmarshal.h)3 ${CMAKE_CURRENT_SOURCE_DIR}/dbusmarshal.cpp
44 ${CMAKE_CURRENT_SOURCE_DIR}/DownloaderImpl.cpp
5qt5_add_dbus_interface(generated_files5 ${CMAKE_CURRENT_SOURCE_DIR}/FileImpl.cpp
6 ${CMAKE_SOURCE_DIR}/data/provider.xml6 ${CMAKE_CURRENT_SOURCE_DIR}/FolderImpl.cpp
7 ProviderInterface)7 ${CMAKE_CURRENT_SOURCE_DIR}/HandlerBase.cpp
8set_source_files_properties(${generated_files} PROPERTIES COMPILE_FLAGS -Wno-ctor-dtor-privacy)8 ${CMAKE_CURRENT_SOURCE_DIR}/ItemImpl.cpp
99 ${CMAKE_CURRENT_SOURCE_DIR}/RootImpl.cpp
10add_library(qt-client-lib-remote OBJECT10 ${CMAKE_CURRENT_SOURCE_DIR}/Runtime_create.cpp
11 AccountImpl.cpp11 ${CMAKE_CURRENT_SOURCE_DIR}/RuntimeImpl.cpp
12 dbusmarshal.cpp12 ${CMAKE_CURRENT_SOURCE_DIR}/UploaderImpl.cpp
13 DownloaderImpl.cpp13 ${CMAKE_SOURCE_DIR}/include/unity/storage/qt/client/internal/remote_client/HandlerBase.h
14 FileImpl.cpp14 ${CMAKE_SOURCE_DIR}/include/unity/storage/qt/client/internal/remote_client/RuntimeImpl.h
15 FolderImpl.cpp15 PARENT_SCOPE)
16 HandlerBase.cpp
17 ItemImpl.cpp
18 RootImpl.cpp
19 Runtime_create.cpp
20 RuntimeImpl.cpp
21 UploaderImpl.cpp
22 ${CMAKE_SOURCE_DIR}/include/unity/storage/qt/client/internal/remote_client/HandlerBase.h
23 ${CMAKE_SOURCE_DIR}/include/unity/storage/qt/client/internal/remote_client/RuntimeImpl.h
24 ${generated_files}
25)
26target_include_directories(qt-client-lib-remote PRIVATE
27 ${GLIB_DEPS_INCLUDE_DIRS}
28 ${ONLINEACCOUNTS_DEPS_INCLUDE_DIRS}
29 ${Qt5Core_INCLUDE_DIRS}
30 ${Qt5DBus_INCLUDE_DIRS}
31 ${Qt5Network_INCLUDE_DIRS}
32 )
33set_target_properties(qt-client-lib-remote PROPERTIES
34 AUTOMOC TRUE
35 POSITION_INDEPENDENT_CODE TRUE
36)
3716
=== modified file 'src/qt/client/internal/remote_client/FileImpl.cpp'
--- src/qt/client/internal/remote_client/FileImpl.cpp 2016-07-12 02:22:05 +0000
+++ src/qt/client/internal/remote_client/FileImpl.cpp 2016-07-20 01:16:16 +0000
@@ -91,8 +91,10 @@
91 return make_exceptional_future<shared_ptr<Downloader>>(DeletedException());91 return make_exceptional_future<shared_ptr<Downloader>>(DeletedException());
92 }92 }
9393
94 auto process_create_downloader_reply = [this](QDBusPendingReply<QString, QDBusUnixFileDescriptor> const& reply,94 auto reply = provider().Download(md_.item_id);
95 QFutureInterface<std::shared_ptr<Downloader>>& qf)95
96 auto process_reply = [this](QDBusPendingReply<QString, QDBusUnixFileDescriptor> const& reply,
97 QFutureInterface<std::shared_ptr<Downloader>>& qf)
96 {98 {
97 auto download_id = reply.argumentAt<0>();99 auto download_id = reply.argumentAt<0>();
98 auto fd = reply.argumentAt<1>();100 auto fd = reply.argumentAt<1>();
@@ -108,9 +110,7 @@
108 }110 }
109 };111 };
110112
111 auto handler = new Handler<shared_ptr<Downloader>>(this,113 auto handler = new Handler<shared_ptr<Downloader>>(this, reply, process_reply);
112 provider().Download(md_.item_id),
113 process_create_downloader_reply);
114 return handler->future();114 return handler->future();
115}115}
116116
117117
=== modified file 'src/qt/client/internal/remote_client/HandlerBase.cpp'
--- src/qt/client/internal/remote_client/HandlerBase.cpp 2016-07-12 02:22:05 +0000
+++ src/qt/client/internal/remote_client/HandlerBase.cpp 2016-07-20 01:16:16 +0000
@@ -41,8 +41,8 @@
41{41{
4242
43HandlerBase::HandlerBase(QObject* parent,43HandlerBase::HandlerBase(QObject* parent,
44 QDBusPendingCall const& call,44 QDBusPendingCall& call,
45 function<void(QDBusPendingCallWatcher const&)> closure)45 function<void(QDBusPendingCallWatcher&)> const& closure)
46 : QObject(parent)46 : QObject(parent)
47 , watcher_(call)47 , watcher_(call)
48 , closure_(closure)48 , closure_(closure)
4949
=== modified file 'tests/local-client/CMakeLists.txt'
--- tests/local-client/CMakeLists.txt 2016-06-22 04:51:19 +0000
+++ tests/local-client/CMakeLists.txt 2016-07-20 01:16:16 +0000
@@ -4,9 +4,9 @@
4add_definitions(-DTEST_DIR="${CMAKE_CURRENT_BINARY_DIR}")4add_definitions(-DTEST_DIR="${CMAKE_CURRENT_BINARY_DIR}")
5include_directories(${GLIB_DEPS_INCLUDE_DIRS})5include_directories(${GLIB_DEPS_INCLUDE_DIRS})
66
7qt5_use_modules(local-client_test Test)
8target_link_libraries(local-client_test7target_link_libraries(local-client_test
9 storage-framework-qt-local-client8 storage-framework-qt-local-client
9 Qt5::Test
10 gtest10 gtest
11)11)
12add_test(local-client local-client_test)12add_test(local-client local-client_test)
1313
=== modified file 'tests/local-client/local-client_test.cpp'
--- tests/local-client/local-client_test.cpp 2016-07-12 02:22:05 +0000
+++ tests/local-client/local-client_test.cpp 2016-07-20 01:16:16 +0000
@@ -18,7 +18,8 @@
1818
19#include <unity/storage/qt/client/client-api.h>19#include <unity/storage/qt/client/client-api.h>
2020
21#include <boost/filesystem.hpp>21#include <unity/storage/qt/client/internal/boost_filesystem.h>
22
22#include <gtest/gtest.h>23#include <gtest/gtest.h>
23#include <QCoreApplication>24#include <QCoreApplication>
24#include <QFile>25#include <QFile>
2526
=== modified file 'tests/remote-client/CMakeLists.txt'
--- tests/remote-client/CMakeLists.txt 2016-06-22 04:51:19 +0000
+++ tests/remote-client/CMakeLists.txt 2016-07-20 01:16:16 +0000
@@ -4,7 +4,6 @@
4add_definitions(-DTEST_DIR="${CMAKE_CURRENT_BINARY_DIR}")4add_definitions(-DTEST_DIR="${CMAKE_CURRENT_BINARY_DIR}")
5include_directories(${GLIB_DEPS_INCLUDE_DIRS})5include_directories(${GLIB_DEPS_INCLUDE_DIRS})
66
7qt5_use_modules(remote-client_test Test)
8target_link_libraries(remote-client_test7target_link_libraries(remote-client_test
9 storage-framework-qt-client8 storage-framework-qt-client
10 Qt5::Network9 Qt5::Network

Subscribers

People subscribed via source and target branches

to all changes: