API nit: Use Util::AsyncOnObject everywhere instead of QTimer::singleShot

This is just to make the API easier to follow. Also cleaned up
AsyncOnObject to not default to caarse timer unless the interval is
>2000 msec.

Also we use QMetaObject::invokeMethod() directly by default if the
AsyncOnObjectCall() has when_ms <= 0 (default).

This should have no real observable change on app behavior other than
being a code cleanup & nit.
This commit is contained in:
Calin Culianu 2026-08-03 23:45:42 -05:00
parent 92fd99fee8
commit eba8431a0b
No known key found for this signature in database
GPG key ID: 21810A542031C02C
9 changed files with 27 additions and 19 deletions

View file

@ -780,7 +780,7 @@ Log::~Log()
}
// Fatal should signal a quit even here
if (level == Logger::Level::Fatal && qApp) {
QTimer::singleShot(0, qApp, []{ qApp->quit(); });
Util::AsyncOnObject(qApp, []{ qApp->quit(); });
}
}
}