Support ownership transfer to non smoke wrapped QObjects & cleanup C++ to Lisp translation.
src/lib/qt-smoke.cpp
Sun Aug 2 13:15:21 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Support ownership transfer to non smoke wrapped QObjects & cleanup C++ to Lisp translation.
--- old-qt.gui/src/lib/qt-smoke.cpp 2014-10-30 07:44:35.000000000 +0100
+++ new-qt.gui/src/lib/qt-smoke.cpp 2014-10-30 07:44:35.000000000 +0100
@@ -14,7 +14,7 @@
*
* @param callback the callback
*
- * @return @c true on success and @c false when the callback table is full.
+ * @return @c true on success and @c false otherwise
*/
CL_SMOKE_QT_EXPORT int
qt_smoke_register_event_notify(void* callback)
@@ -25,4 +25,20 @@
reinterpret_cast<qInternalCallback>(callback));
}
+/** Returns the most specific QMetaObject of the QObject instance @a object.
+ * Used to determine the actual class of an object. Smoke can not be used since it calls the
+ * metaObject() of the class the method was called for.
+ *
+ * @param object A QObject
+ *
+ * @return QMetaObject
+ */
+CL_SMOKE_QT_EXPORT void*
+qt_smoke_meta_object(void* object)
+{
+ Q_ASSERT(object);
+ static_cast<QObject*>(object)->metaObject();
+}
+
+
} // extern "C"