9 #include <QCoreApplication>
18 return QThread::currentThread() == toBeTested->thread();
25 std::ostringstream oss;
26 oss << std::this_thread::get_id();
27 const QThread *thread = QThread::currentThread();
28 const QString
id = QString::fromStdString(oss.str());
29 return QStringLiteral(
"%1 (%2) prio %3").arg(
id).arg(thread->objectName()).arg(thread->priority());
static bool thisIsMainThread()
Is the current thread the application thread?
static QString currentThreadInfo()
Info about current thread, for debug messages.
static bool isInThisThread(const QObject *toBeTested)
Is the current thread the object's thread?
Free functions in swift::misc.