[OpenDocString] kdeconnect-kde (cpp)
mountloop.cpp
MountLoop::MountLoop()
    : QEventLoop()
{
}
This implements the loop that mounts the event loop.
bool MountLoop::exec(QEventLoop::ProcessEventsFlags flags)
{
    return QEventLoop::exec(flags) == 0;
}
This implements the exec function of the process loop.
void MountLoop::failed()
{
    Q_EMIT result(false);
    exit(1);
}
This code sets the result of the mount loop to false and exits the program. It also emits the signal with a signal exit code 1.
void MountLoop::succeeded()
{
    Q_EMIT result(true);
    exit(0);
}
This code is called when the mount loop has succeeded. It emits the result signal and exits the process.
void MountLoop::exitWith(bool status)
{
    Q_EMIT result(status);
    exit(status ? 0 : 1);
}
This code sets the result of the loop and exits with the given status. It emits the signal result and exits with a value of 1.