2014-01-21 19:49:50 +00:00
|
|
|
/**
|
2020-08-17 10:48:10 +01:00
|
|
|
* SPDX-FileCopyrightText: 2014 Samoilenko Yuri <kinnalru@gmail.com>
|
2014-01-21 19:49:50 +00:00
|
|
|
*
|
2020-08-17 10:48:10 +01:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
2014-01-21 19:49:50 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "mountloop.h"
|
|
|
|
|
|
|
|
MountLoop::MountLoop()
|
|
|
|
: QEventLoop()
|
2022-09-10 22:23:52 +01:00
|
|
|
{
|
|
|
|
}
|
2014-01-21 19:49:50 +00:00
|
|
|
|
|
|
|
bool MountLoop::exec(QEventLoop::ProcessEventsFlags flags)
|
|
|
|
{
|
|
|
|
return QEventLoop::exec(flags) == 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void MountLoop::failed()
|
|
|
|
{
|
2018-11-06 22:29:39 +00:00
|
|
|
Q_EMIT result(false);
|
2014-01-21 19:49:50 +00:00
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
|
2020-08-06 12:51:31 +01:00
|
|
|
void MountLoop::succeeded()
|
2014-01-21 19:49:50 +00:00
|
|
|
{
|
2018-11-06 22:29:39 +00:00
|
|
|
Q_EMIT result(true);
|
2014-01-21 19:49:50 +00:00
|
|
|
exit(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
void MountLoop::exitWith(bool status)
|
|
|
|
{
|
2018-11-06 22:29:39 +00:00
|
|
|
Q_EMIT result(status);
|
2014-01-21 19:49:50 +00:00
|
|
|
exit(status ? 0 : 1);
|
|
|
|
}
|
2023-07-26 09:15:11 +01:00
|
|
|
|
|
|
|
#include "moc_mountloop.cpp"
|