Other: fix bug in login screen <-> main window transition. [skip ci]
Other: fixed bug with split mode toggle. [skip ci] Other: fix QML warnings. [skip ci] Other: fix showMainWindow gRPC event binding. [skip ci]. QML Fixes [skip ci] Other: wait for EventStreamReader thread to finish on exit. Other: made BridgeMonitor generic, as ProcessMonitor. [skip ci]
This commit is contained in:
@ -108,6 +108,26 @@ bool Overseer::isFinished() const
|
||||
}
|
||||
|
||||
|
||||
//****************************************************************************************************************************************************
|
||||
/// \param timeoutMs The timeout after which the function should return false if the event stream reader is not finished. if -1 one, the function
|
||||
/// never times out.
|
||||
/// \return false if and only if the timeout delay was reached.
|
||||
//****************************************************************************************************************************************************
|
||||
bool Overseer::wait(qint32 timeoutMs) const
|
||||
{
|
||||
QElapsedTimer timer;
|
||||
timer.start();
|
||||
|
||||
while (!this->isFinished()) {
|
||||
if ((timeoutMs >= 0) && (timer.elapsed() > timeoutMs))
|
||||
return false;
|
||||
QThread::msleep(10);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//****************************************************************************************************************************************************
|
||||
/// \return The worker.
|
||||
//****************************************************************************************************************************************************
|
||||
|
||||
@ -41,6 +41,7 @@ public: // member functions.
|
||||
Overseer &operator=(Overseer const &) = delete; ///< Disabled assignment operator.
|
||||
Overseer &operator=(Overseer &&) = delete; ///< Disabled move assignment operator.
|
||||
bool isFinished() const; ///< Check if the worker is finished.
|
||||
bool wait(qint32 timeoutMs) const; ///< Wait for the worker to finish.
|
||||
Worker *worker() const; ///< Return worker.
|
||||
|
||||
public slots:
|
||||
|
||||
Reference in New Issue
Block a user