File indexing completed on 2023-11-26 07:27:57

0001 /*
0002     SPDX-FileCopyrightText: 2012-2016 Ivan Cukic <ivan.cukic(at)kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #include "dbusfuture_p.h"
0008 
0009 namespace DBusFuture
0010 {
0011 namespace detail
0012 { //_
0013 
0014 template<>
0015 void DBusCallFutureInterface<void>::callFinished()
0016 {
0017     deleteLater();
0018 
0019     // qDebug() << "This is call end";
0020 
0021     this->reportFinished();
0022 }
0023 
0024 ValueFutureInterface<void>::ValueFutureInterface()
0025 {
0026 }
0027 
0028 QFuture<void> ValueFutureInterface<void>::start()
0029 {
0030     auto future = this->future();
0031 
0032     this->reportFinished();
0033 
0034     deleteLater();
0035 
0036     return future;
0037 }
0038 
0039 } //^ namespace detail
0040 
0041 QFuture<void> fromVoid()
0042 {
0043     using namespace detail;
0044 
0045     auto valueFutureInterface = new ValueFutureInterface<void>();
0046 
0047     return valueFutureInterface->start();
0048 }
0049 
0050 } // namespace DBusFuture