Ref T260, changed to const QObject

This commit is contained in:
Klaus Basan
2018-04-07 04:17:21 +02:00
committed by Roland Winklmeier
parent e1421622b1
commit 6e908db52e
2 changed files with 4 additions and 4 deletions

View File

@@ -16,14 +16,14 @@
namespace BlackMisc
{
bool CThreadUtils::isCurrentThreadObjectThread(QObject *toBeTested)
bool CThreadUtils::isCurrentThreadObjectThread(const QObject *toBeTested)
{
Q_ASSERT_X(toBeTested, Q_FUNC_INFO, "missing QObject");
Q_ASSERT_X(toBeTested->thread(), Q_FUNC_INFO, "missing thread");
return (QThread::currentThread() == toBeTested->thread());
}
bool CThreadUtils::isApplicationThreadObjectThread(QObject *toBeTested)
bool CThreadUtils::isApplicationThreadObjectThread(const QObject *toBeTested)
{
Q_ASSERT_X(toBeTested, Q_FUNC_INFO, "missing QObject");
Q_ASSERT_X(toBeTested->thread(), Q_FUNC_INFO, "missing thread");

View File

@@ -29,11 +29,11 @@ namespace BlackMisc
//! Is the current thread the QObject's thread?
//! \remarks can be used as ASSERT check for threaded objects
static bool isCurrentThreadObjectThread(QObject *toBeTested);
static bool isCurrentThreadObjectThread(const QObject *toBeTested);
//! Is the application thread the QObject's thread?
//! \remarks can be used as ASSERT check for threaded objects
static bool isApplicationThreadObjectThread(QObject *toBeTested);
static bool isApplicationThreadObjectThread(const QObject *toBeTested);
//! Is the current thread the Application thread?
//! \remarks can be used as ASSERT check for threaded objects