mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Fix CApplication::processEventsFor so it can be used in samples/unit tests
This commit is contained in:
committed by
Mathew Sutcliffe
parent
769e3a0e29
commit
a993ccd1c1
@@ -712,7 +712,8 @@ namespace BlackCore
|
||||
|
||||
void CApplication::processEventsFor(int milliseconds)
|
||||
{
|
||||
if (CApplication::instance()->isShuttingDown()) { return; }
|
||||
// sApp check allows to use in test cases without sApp
|
||||
if (sApp && sApp->isShuttingDown()) { return; }
|
||||
QEventLoop eventLoop;
|
||||
QTimer::singleShot(milliseconds, &eventLoop, &QEventLoop::quit);
|
||||
eventLoop.exec();
|
||||
|
||||
Reference in New Issue
Block a user