aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMiguel Costa <miguel.costa@qt.io>2025-08-03 16:54:28 +0200
committerMiguel Costa <miguel.costa@qt.io>2025-08-08 12:36:46 +0000
commitf627fae758fcb32f4258eaf96b7c48f19464184d (patch)
tree99045b245821c7f589767d6540fe95b0e59667a1 /include
parent6fda49698d5e811d4e12fc9750ef2e716dda86d6 (diff)
Fix runtime errors in Release configHEADdev
The Stats() function of the adapter is only available in Debug. The native API must also reflect this. Change-Id: I79a4b34ab49e983562244ffcd7197167fbc8adc3 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
Diffstat (limited to 'include')
-rw-r--r--include/qdotnetadapter.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/qdotnetadapter.h b/include/qdotnetadapter.h
index adabaa7..be7676b 100644
--- a/include/qdotnetadapter.h
+++ b/include/qdotnetadapter.h
@@ -108,7 +108,9 @@ public:
host->resolveFunction(QDOTNETADAPTER_DELEGATE(FreeTypeRef));
host->resolveFunction(QDOTNETADAPTER_DELEGATE(AddInterfaceProxy));
host->resolveFunction(QDOTNETADAPTER_DELEGATE(SetInterfaceMethod));
+#ifndef QT_NO_DEBUG
host->resolveFunction(QDOTNETADAPTER_DELEGATE(Stats));
+#endif
host->resolveFunction(QDOTNETADAPTER_DELEGATE(GetObject));
host->resolveFunction(QDOTNETADAPTER_DELEGATE(Reset));
@@ -309,6 +311,7 @@ public:
callback, cleanUp, context);
}
+#ifndef QT_NO_DEBUG
struct Stats
{
qint32 refCount;
@@ -331,6 +334,7 @@ public:
--s.refCount;
return s;
}
+#endif
void *object(const QDotNetRef &obj, const QString &path)
{
@@ -366,7 +370,9 @@ private:
mutable QDotNetFunction<void *, QString, void *, void *> fnAddInterfaceProxy;
mutable QDotNetFunction<void, QDotNetRef, QString, qint32, QList<QDotNetParameter>,
void *, void *, void *> fnSetInterfaceMethod;
+#ifndef QT_NO_DEBUG
mutable QDotNetFunction<void, qint32 *, qint32 *, qint32 *> fnStats;
+#endif
mutable QDotNetFunction<void *, QDotNetRef, QString> fnGetObject;
mutable QDotNetFunction<void> fnReset;