~unity-api-team/storage-framework/vivid

« back to all changes in this revision

Viewing changes to src/qt/client/internal/local_client/ItemImpl.cpp

  • Committer: Michi Henning
  • Date: 2016-07-11 05:44:31 UTC
  • mfrom: (8.10.31 decltype)
  • mto: (8.1.15 devel)
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: michi.henning@canonical.com-20160711054431-jj23l6adsm7367b7
Merged decltype branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
#include <unity/storage/qt/client/Account.h>
4
4
#include <unity/storage/qt/client/Exceptions.h>
 
5
#include <unity/storage/qt/client/internal/make_future.h>
5
6
#include <unity/storage/qt/client/internal/local_client/AccountImpl.h>
6
7
#include <unity/storage/qt/client/internal/local_client/FileImpl.h>
7
8
#include <unity/storage/qt/client/internal/local_client/RootImpl.h>
8
9
#include <unity/storage/qt/client/internal/local_client/tmpfile-prefix.h>
9
10
 
10
11
#include <boost/algorithm/string/predicate.hpp>
 
12
#pragma GCC diagnostic push
 
13
#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
11
14
#include <QtConcurrent>
 
15
#pragma GCC diagnostic pop
12
16
 
13
17
#include <sys/stat.h>
14
18
 
263
267
    QFutureInterface<QVector<Folder::SPtr>> qf;
264
268
    if (deleted_)
265
269
    {
266
 
        qf.reportException(DeletedException());
267
 
        qf.reportFinished();
268
 
        return qf.future();
 
270
        return make_exceptional_future<QVector<Folder::SPtr>>(DeletedException());
269
271
    }
270
272
 
271
273
    Root::SPtr root = root_.lock();
289
291
    {
290
292
        results.append(root);
291
293
    }
292
 
    qf.reportResult(results);
293
 
    qf.reportFinished();
294
 
    return qf.future();
 
294
    return make_ready_future(results);
295
295
}
296
296
 
297
297
QVector<QString> ItemImpl::parent_ids() const