File indexing completed on 2024-05-12 05:29:23
0001 /* 0002 * SPDX-FileCopyrightText: 2013-2016 Ivan Cukic <ivan.cukic@kde.org> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 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 // qCDebug(KAMD_LOG_RESOURCES) << "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