kdeconnect-kde/plugins/sftp/mountloop.cpp
2022-09-11 23:21:58 +00:00

35 lines
580 B
C++

/**
* SPDX-FileCopyrightText: 2014 Samoilenko Yuri <kinnalru@gmail.com>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#include "mountloop.h"
MountLoop::MountLoop()
: QEventLoop()
{
}
bool MountLoop::exec(QEventLoop::ProcessEventsFlags flags)
{
return QEventLoop::exec(flags) == 0;
}
void MountLoop::failed()
{
Q_EMIT result(false);
exit(1);
}
void MountLoop::succeeded()
{
Q_EMIT result(true);
exit(0);
}
void MountLoop::exitWith(bool status)
{
Q_EMIT result(status);
exit(status ? 0 : 1);
}