File indexing completed on 2024-04-14 04:51:50

0001 /**
0002  * SPDX-FileCopyrightText: 2014 Samoilenko Yuri <kinnalru@gmail.com>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005  */
0006 
0007 #include "mountloop.h"
0008 
0009 MountLoop::MountLoop()
0010     : QEventLoop()
0011 {
0012 }
0013 
0014 bool MountLoop::exec(QEventLoop::ProcessEventsFlags flags)
0015 {
0016     return QEventLoop::exec(flags) == 0;
0017 }
0018 
0019 void MountLoop::failed()
0020 {
0021     Q_EMIT result(false);
0022     exit(1);
0023 }
0024 
0025 void MountLoop::succeeded()
0026 {
0027     Q_EMIT result(true);
0028     exit(0);
0029 }
0030 
0031 void MountLoop::exitWith(bool status)
0032 {
0033     Q_EMIT result(status);
0034     exit(status ? 0 : 1);
0035 }
0036 
0037 #include "moc_mountloop.cpp"