Promise implemenation for JavaScript to C++ in Qt QML