Page MenuHomePhorge

AsyncHandler.qml
No OneTemporary

Size
604 B
Referenced Files
None
Subscribers
None

AsyncHandler.qml

/*
* This file is part of kazv.
* SPDX-FileCopyrightText: 2023 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
QtObject {
id: asyncHandler
required property var trigger
property var promise: null
signal resolved(bool success, var data)
property var conn: Connections {
target: asyncHandler.promise
function onResolved(success, data) {
asyncHandler.resolved(success, data);
asyncHandler.promise = null;
}
}
function call() {
promise = trigger();
}
}

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 2:21 PM (1 d, 10 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40377
Default Alt Text
AsyncHandler.qml (604 B)

Event Timeline