Promise implementation for JavaScript to C++ in Qt QML