Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

256.1. qcoro-0.13.0

C++20 coroutines for Qt — co_await on network replies, D-Bus calls, processes, timers and QML

0.13.0-1 · MIT AND BSD-3-Clause · 1.1 SBU · 1.0 MiB, 144 files · 43_toolkits, 68 of 344 · ports/core/qt-extra/qcoro

Homepage: https://qcoro.dvratil.cz/

QCoro gives Qt C++20 coroutines: a QNetworkReply, a D-Bus pending call, a QProcess, a timer, a socket or a QML-facing task can be co_awaited instead of chained through signals. It is a set of shared libraries, libQCoro6Core with one library per Qt module beside it, and CMake packages named QCoro6 with a component for each. plasma-workspace, powerdevil, plasma-nm and Discover require it, kio-extras’ sftp:/ worker requires it, and the Gear applications that co_await a futuresql query build on it.

Depends on: cmake, ninja, qt6-qtbase, qt6-qtdeclarative, qt6-qtwebsockets.

Required by (15): angelfish, audiotube, discover, itinerary, kaccounts-integration, kaccounts-providers, kdenetwork-filesharing, kdos-discover, kio-extras, kontrast, neochat, plasma-nm, plasma-workspace, powerdevil, tokodon.

Sources: qcoro-0.13.0.tar.gz (159.6 KiB). Every step kpkg takes applies to this port.

Install: script/chroot/exec.sh bash -c 'source script/phases/43_toolkits/phase.env && kpkg install qcoro'

build.sh:

cmake -S . -B build -G Ninja \
	-D CMAKE_INSTALL_PREFIX=/usr \
	-D CMAKE_INSTALL_LIBDIR=lib \
	-D CMAKE_BUILD_TYPE=Release \
	-D BUILD_SHARED_LIBS=ON \
	-D BUILD_TESTING=OFF \
	-D USE_QT_VERSION=6 \
	-D QCORO_BUILD_EXAMPLES=OFF \
	-D QCORO_WITH_QTDBUS=ON \
	-D QCORO_WITH_QTNETWORK=ON \
	-D QCORO_WITH_QTWEBSOCKETS=ON \
	-D QCORO_WITH_QTQUICK=ON \
	-D QCORO_WITH_QML=ON \
	-D QCORO_WITH_QTTEST=ON \
	-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build

Each QCORO_WITH_* switch is on by default upstream. The recipe names them, so a component a consumer requires cannot drop out of the package unnoticed.

Libraries: libQCoro6Core.so, libQCoro6DBus.so, libQCoro6Network.so, libQCoro6Qml.so, libQCoro6Quick.so, libQCoro6WebSockets.so.

Directories: /usr/include/qcoro6, /usr/lib/cmake/QCoro6, /usr/lib/cmake/QCoro6Core, /usr/lib/cmake/QCoro6Coro, /usr/lib/cmake/QCoro6DBus, /usr/lib/cmake/QCoro6Network, /usr/lib/cmake/QCoro6Qml, /usr/lib/cmake/QCoro6Quick, /usr/lib/cmake/QCoro6Test, /usr/lib/cmake/QCoro6WebSockets, /usr/share/licenses/qcoro.

Coroutines need C++20. QCoro6Coro’s CMake package installs the qcoro_enable_coroutines() macro, which adds GCC’s -fcoroutines, and a consumer calls it itself. find_package(QCoro6) with no component is refused by the package, so a consumer always names the components it uses.