Sonde v1.1.0
Embeddable Model Context Protocol server for Qt applications
Loading...
Searching...
No Matches
threadcheck_p.h
Go to the documentation of this file.
1#pragma once
2
6
7#include <sonde/sonde_core_export.h>
8
9#include <QtCore/qglobal.h>
10
11QT_BEGIN_NAMESPACE
12class QObject;
13QT_END_NAMESPACE
14
15namespace Sonde::Detail {
16
20SONDE_CORE_EXPORT bool checkGuiThread(const char *function);
21
24SONDE_CORE_EXPORT bool checkObjectThread(const QObject *owner, const char *function);
25
26} // namespace Sonde::Detail
27
29#define SONDE_CHECK_THREAD(owner) ::Sonde::Detail::checkObjectThread(owner, Q_FUNC_INFO)
31#define SONDE_CHECK_GUI_THREAD() ::Sonde::Detail::checkGuiThread(Q_FUNC_INFO)
bool checkGuiThread(const char *function)
Whether this is the GUI thread (the application object's).
Definition threadcheck.cpp:11
bool checkObjectThread(const QObject *owner, const char *function)
Whether this is owner's thread.
Definition threadcheck.cpp:24