forked from qt-creator/qt-creator
TaskTree: Preserve the right order of the 0 TimeoutTask
Like it's done for all other TimeoutTasks. Before it was flaky on mac. Change-Id: I2999b1264d313dda5d614d9dbd7ae03b2bf00fb0 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -2728,10 +2728,7 @@ TimeoutTaskAdapter::~TimeoutTaskAdapter()
|
|||||||
|
|
||||||
void TimeoutTaskAdapter::start()
|
void TimeoutTaskAdapter::start()
|
||||||
{
|
{
|
||||||
if (*task() == milliseconds::zero())
|
m_timerId = scheduleTimeout(*task(), this, [this] { m_timerId = {}; emit done(true); });
|
||||||
QTimer::singleShot(0, this, [this] { emit done(true); });
|
|
||||||
else
|
|
||||||
m_timerId = scheduleTimeout(*task(), this, [this] { m_timerId = {}; emit done(true); });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Tasking
|
} // namespace Tasking
|
||||||
|
Reference in New Issue
Block a user