mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 15:25:35 +08:00
refs #538, Formatting, minor tweaks, comments
* new slot syntax in ATC station component * formatting, comments * tab order * utility function for severity in status message * null checks in threadutils * invalidKey function in datastore * changed data object keys (cached objets) * added missing value object compare cases * renamed timer in context network * finder function for model list * renamed getContainer to container (as it is just a reference)
This commit is contained in:
@@ -24,13 +24,15 @@ namespace BlackMisc
|
||||
bool CThreadUtils::isApplicationThreadObjectThread(QObject *toBeTested)
|
||||
{
|
||||
Q_ASSERT_X(toBeTested, Q_FUNC_INFO, "missing QObject");
|
||||
if (!toBeTested) { return false; }
|
||||
if (!toBeTested->thread()) { return false; }
|
||||
if (!toBeTested || !toBeTested->thread()) { return false; }
|
||||
if (!QCoreApplication::instance() || !QCoreApplication::instance()->thread()) { return false; }
|
||||
return (QCoreApplication::instance()->thread() == toBeTested->thread());
|
||||
}
|
||||
|
||||
bool CThreadUtils::isCurrentThreadApplicationThread()
|
||||
{
|
||||
if (!QCoreApplication::instance()) { return false; }
|
||||
if (!QCoreApplication::instance()->thread()) { return false; }
|
||||
return (QCoreApplication::instance()->thread() == QThread::currentThread());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user