mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 10:55:32 +08:00
Ref T260, changed to const QObject
This commit is contained in:
committed by
Roland Winklmeier
parent
e1421622b1
commit
6e908db52e
@@ -16,14 +16,14 @@
|
|||||||
|
|
||||||
namespace BlackMisc
|
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, Q_FUNC_INFO, "missing QObject");
|
||||||
Q_ASSERT_X(toBeTested->thread(), Q_FUNC_INFO, "missing thread");
|
Q_ASSERT_X(toBeTested->thread(), Q_FUNC_INFO, "missing thread");
|
||||||
return (QThread::currentThread() == toBeTested->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, Q_FUNC_INFO, "missing QObject");
|
||||||
Q_ASSERT_X(toBeTested->thread(), Q_FUNC_INFO, "missing thread");
|
Q_ASSERT_X(toBeTested->thread(), Q_FUNC_INFO, "missing thread");
|
||||||
|
|||||||
@@ -29,11 +29,11 @@ namespace BlackMisc
|
|||||||
|
|
||||||
//! Is the current thread the QObject's thread?
|
//! Is the current thread the QObject's thread?
|
||||||
//! \remarks can be used as ASSERT check for threaded objects
|
//! \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?
|
//! Is the application thread the QObject's thread?
|
||||||
//! \remarks can be used as ASSERT check for threaded objects
|
//! \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?
|
//! Is the current thread the Application thread?
|
||||||
//! \remarks can be used as ASSERT check for threaded objects
|
//! \remarks can be used as ASSERT check for threaded objects
|
||||||
|
|||||||
Reference in New Issue
Block a user