Exit even loop if KAuth job finishes with error.
This commit is contained in:
parent
e3aae714a2
commit
9218b55c57
|
@ -78,6 +78,7 @@ void CoreBackendManager::startExternalCommandHelper()
|
|||
QEventLoop loop;
|
||||
auto exitLoop = [&] () {loop.exit();};
|
||||
auto conn = QObject::connect(job(), &KAuth::ExecuteJob::newData, exitLoop);
|
||||
QObject::connect(job(), &KJob::finished, [=] () { if(job()->error()) exitLoop(); } );
|
||||
loop.exec();
|
||||
QObject::disconnect(conn);
|
||||
|
||||
|
|
Loading…
Reference in New Issue