44 #if defined(__OBJC__) && !defined(__cplusplus)
45 # warning "File built in Objective-C mode (.m), but using Qt requires Objective-C++ (.mm)"
48 #include <QtCore/qnamespace.h>
49 #include <QtCore/qobjectdefs_impl.h>
50 #include <QtCore/qtmetamacros.h>
59 #ifndef QT_NO_META_MACROS
74 #ifndef QT_NO_META_MACROS
75 # define QMETHOD_CODE 0
77 # define QSIGNAL_CODE 2
78 # define QT_PREFIX_CODE(code, a) QT_STRINGIFY(code) #a
79 # define QT_STRINGIFY_METHOD(a) QT_PREFIX_CODE(QMETHOD_CODE, a)
80 # define QT_STRINGIFY_SLOT(a) QT_PREFIX_CODE(QSLOT_CODE, a)
81 # define QT_STRINGIFY_SIGNAL(a) QT_PREFIX_CODE(QSIGNAL_CODE, a)
83 # define QLOCATION "\0" __FILE__ ":" QT_STRINGIFY(__LINE__)
84 # ifndef QT_NO_KEYWORDS
85 # define METHOD(a) qFlagLocation(QT_STRINGIFY_METHOD(a) QLOCATION)
87 # define SLOT(a) qFlagLocation(QT_STRINGIFY_SLOT(a) QLOCATION)
88 # define SIGNAL(a) qFlagLocation(QT_STRINGIFY_SIGNAL(a) QLOCATION)
90 # ifndef QT_NO_KEYWORDS
91 # define METHOD(a) QT_STRINGIFY_METHOD(a)
93 # define SLOT(a) QT_STRINGIFY_SLOT(a)
94 # define SIGNAL(a) QT_STRINGIFY_SIGNAL(a)
98 #define Q_ARG(type, data) QArgument<type >(#type, data)
99 #define Q_RETURN_ARG(type, data) QReturnArgument<type >(#type, data)
108 class QMetaTypeInterface;
120 : _data(aData), _name(aName) {}
121 inline void *
data()
const {
return const_cast<void *
>(_data); }
122 inline const char *
name()
const {
return _name; }
155 template <
typename T>
175 #if !defined(QT_NO_TRANSLATION) || defined(Q_CLANG_QDOC)
176 QString tr(
const char *
s,
const char *
c,
int n = -1)
const;
181 int methodOffset()
const;
182 int enumeratorOffset()
const;
183 int propertyOffset()
const;
184 int classInfoOffset()
const;
186 int constructorCount()
const;
187 int methodCount()
const;
188 int enumeratorCount()
const;
189 int propertyCount()
const;
190 int classInfoCount()
const;
192 int indexOfConstructor(
const char *constructor)
const;
193 int indexOfMethod(
const char *
method)
const;
194 int indexOfSignal(
const char *
signal)
const;
195 int indexOfSlot(
const char *slot)
const;
196 int indexOfEnumerator(
const char *
name)
const;
197 int indexOfProperty(
const char *
name)
const;
198 int indexOfClassInfo(
const char *
name)
const;
207 static bool checkConnectArgs(
const char *
signal,
const char *
method);
215 const QObject *receiver,
int method_index,
219 const QObject *receiver,
int method_index);
220 static bool disconnectOne(
const QObject *
sender,
int signal_index,
221 const QObject *receiver,
int method_index);
223 static void connectSlotsByName(
QObject *
o);
226 static void activate(
QObject *
sender,
int signal_index,
void **argv);
228 static void activate(
QObject *
sender,
int signal_offset,
int local_signal_index,
void **argv);
230 static bool invokeMethod(
QObject *
obj,
const char *member,
258 val4, val5, val6, val7, val8, val9);
275 val3, val4, val5, val6, val7, val8, val9);
291 val1, val2, val3, val4, val5, val6, val7, val8, val9);
295 template<
typename Functor,
typename FunctorReturnType>
297 template<
typename Functor,
typename FunctorReturnType>
302 template <
typename Func>
303 static typename std::enable_if<QtPrivate::FunctionPointer<Func>::IsPointerToMemberFunction
314 template <
typename Func>
315 static typename std::enable_if<QtPrivate::FunctionPointer<Func>::IsPointerToMemberFunction
326 template <
typename Func>
327 static typename std::enable_if<!QtPrivate::FunctionPointer<Func>::IsPointerToMemberFunction
337 template <
typename Func>
338 static typename std::enable_if<!QtPrivate::FunctionPointer<Func>::IsPointerToMemberFunction
348 template <
typename Func>
349 static typename std::enable_if<!QtPrivate::FunctionPointer<Func>::IsPointerToMemberFunction
355 return invokeMethodImpl(
context,
361 template <
typename Func>
362 static typename std::enable_if<!QtPrivate::FunctionPointer<Func>::IsPointerToMemberFunction
367 return invokeMethodImpl(
context,
398 int static_metacall(Call,
int,
void **)
const;
399 static int metacall(
QObject *, Call,
int,
void **);
414 #ifdef QT_NO_DATA_RELOCATION
420 template <const QMetaObject &MO>
static constexpr SuperData link()
421 {
return SuperData(QMetaObject::staticMetaObject<MO>); }
426 {
return SuperData(QMetaObject::staticMetaObject<MO>()); }
452 bool isConnected_helper()
const;
459 operator bool()
const;
483 template <
typename T>
486 enum {
Value =
sizeof(
test(&Object::qt_metacall)) ==
sizeof(
int) };
QArgument(const char *aName, T &aData)
QArgument(const char *aName, const T &aData)
The QByteArray class provides an array of bytes.
The QGenericArgument class is an internal helper class for marshalling arguments.
QGenericArgument(const char *aName=nullptr, const void *aData=nullptr)
const char * name() const
The QGenericReturnArgument class is an internal helper class for marshalling arguments.
QGenericReturnArgument(const char *aName=nullptr, void *aData=nullptr)
The QObject class is the base class of all Qt objects.
QScopedPointer< QObjectData > d_ptr
QReturnArgument(const char *aName, T &aData)
The QString class provides a Unicode character string.
The QTimer class provides repetitive and single-shot timers.
auto it unsigned count const
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char * method
#define QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(Class)
Q_CORE_EXPORT const char * qFlagLocation(const char *method)
void swap(QMetaObject::Connection &lhs, QMetaObject::Connection &rhs) noexcept
GLsizei GLenum GLenum * types
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
const char className[16]
[1]
connect(quitButton, &QPushButton::clicked, &app, &QCoreApplication::quit, Qt::QueuedConnection)
obj metaObject() -> className()
myObject disconnect()
[26]
static char test(int(T::*)(QMetaObject::Call, int, void **))
static int test(int(Object::*)(QMetaObject::Call, int, void **))