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:
Klaus Basan
2015-12-05 16:39:54 +01:00
parent 66ff1803cf
commit 8f85c54989
24 changed files with 90 additions and 45 deletions

View File

@@ -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());
}