fix: opaque-pointer declarations need qmetatype include and single ownership

The scripted Q_DECLARE_OPAQUE_POINTER sweep missed the QtCore/qmetatype.h
include (cascade of stdlib errors) and declared a few types in two headers
(redefinition of IsPointerDeclaredOpaque). Include qmetatype.h everywhere
and declare each handle in exactly one header.
This commit is contained in:
2026-08-02 18:25:52 +08:00
parent 824e352da1
commit 393b650fb4
14 changed files with 13 additions and 6 deletions
+1
View File
@@ -325,6 +325,7 @@ OAKENGINE_API OakAudioParams *oakengine_audio_processor_output_params(
#ifdef __cplusplus #ifdef __cplusplus
} }
#include <QtCore/qmetatype.h>
Q_DECLARE_OPAQUE_POINTER(OakEngineAudioProcessor *) Q_DECLARE_OPAQUE_POINTER(OakEngineAudioProcessor *)
#endif #endif
+1
View File
@@ -292,6 +292,7 @@ OAKENGINE_API int oakengine_color_transform_job_set_processor(
#ifdef __cplusplus #ifdef __cplusplus
} }
#include <QtCore/qmetatype.h>
Q_DECLARE_OPAQUE_POINTER(OakEngineColorManager *) Q_DECLARE_OPAQUE_POINTER(OakEngineColorManager *)
Q_DECLARE_OPAQUE_POINTER(OakEngineColorProcessor *) Q_DECLARE_OPAQUE_POINTER(OakEngineColorProcessor *)
Q_DECLARE_OPAQUE_POINTER(OakEngineColorConfig *) Q_DECLARE_OPAQUE_POINTER(OakEngineColorConfig *)
+1
View File
@@ -500,6 +500,7 @@ oakengine_encoding_start_audio_recording(const OakEngineEncodingParams *params,
#ifdef __cplusplus #ifdef __cplusplus
} }
#include <QtCore/qmetatype.h>
Q_DECLARE_OPAQUE_POINTER(OakEngineEncodingParams *) Q_DECLARE_OPAQUE_POINTER(OakEngineEncodingParams *)
#endif #endif
+1
View File
@@ -511,6 +511,7 @@ OAKENGINE_API int oakengine_footage_invalidate(OakEngineFootage *self);
#ifdef __cplusplus #ifdef __cplusplus
} }
#include <QtCore/qmetatype.h>
Q_DECLARE_OPAQUE_POINTER(OakEngineFootage *) Q_DECLARE_OPAQUE_POINTER(OakEngineFootage *)
#endif #endif
-3
View File
@@ -2087,9 +2087,6 @@ oakengine_node_get_video_frame_cache(const OakEngineNode *self);
Q_DECLARE_OPAQUE_POINTER(OakEngineNode *) Q_DECLARE_OPAQUE_POINTER(OakEngineNode *)
Q_DECLARE_OPAQUE_POINTER(OakEngineKeyframe *) Q_DECLARE_OPAQUE_POINTER(OakEngineKeyframe *)
Q_DECLARE_OPAQUE_POINTER(OakEngineNodeDragger *) Q_DECLARE_OPAQUE_POINTER(OakEngineNodeDragger *)
Q_DECLARE_OPAQUE_POINTER(OakEngineFrameCache *)
Q_DECLARE_OPAQUE_POINTER(OakEngineThumbnailCache *)
Q_DECLARE_OPAQUE_POINTER(OakEngineWaveformCache *)
#endif #endif
#endif /* OAKENGINE_NODE_H */ #endif /* OAKENGINE_NODE_H */
+1
View File
@@ -213,6 +213,7 @@ OAKENGINE_API int oakengine_playback_last_error(
#ifdef __cplusplus #ifdef __cplusplus
} }
#include <QtCore/qmetatype.h>
Q_DECLARE_OPAQUE_POINTER(OakEnginePlayback *) Q_DECLARE_OPAQUE_POINTER(OakEnginePlayback *)
#endif #endif
+1
View File
@@ -246,6 +246,7 @@ OAKENGINE_API void oakengine_preview_request_free(
#ifdef __cplusplus #ifdef __cplusplus
} }
#include <QtCore/qmetatype.h>
Q_DECLARE_OPAQUE_POINTER(OakEnginePreviewRequest *) Q_DECLARE_OPAQUE_POINTER(OakEnginePreviewRequest *)
#endif #endif
+1 -2
View File
@@ -339,8 +339,7 @@ OAKENGINE_API int oakengine_project_set_color_reference_space(
#ifdef __cplusplus #ifdef __cplusplus
} }
Q_DECLARE_OPAQUE_POINTER(OakEngineNode *) #include <QtCore/qmetatype.h>
Q_DECLARE_OPAQUE_POINTER(OakEnginePlaybackCache *)
Q_DECLARE_OPAQUE_POINTER(OakEngineProject *) Q_DECLARE_OPAQUE_POINTER(OakEngineProject *)
Q_DECLARE_OPAQUE_POINTER(OakEngineSequence *) Q_DECLARE_OPAQUE_POINTER(OakEngineSequence *)
#endif #endif
+1
View File
@@ -245,6 +245,7 @@ OAKENGINE_API void oakengine_audio_free(OakEngineAudioBuffer *self);
#ifdef __cplusplus #ifdef __cplusplus
} }
#include <QtCore/qmetatype.h>
Q_DECLARE_OPAQUE_POINTER(OakEngineRenderer *) Q_DECLARE_OPAQUE_POINTER(OakEngineRenderer *)
Q_DECLARE_OPAQUE_POINTER(OakEngineFrame *) Q_DECLARE_OPAQUE_POINTER(OakEngineFrame *)
Q_DECLARE_OPAQUE_POINTER(OakEngineAudioBuffer *) Q_DECLARE_OPAQUE_POINTER(OakEngineAudioBuffer *)
+1
View File
@@ -249,6 +249,7 @@ OAKENGINE_API int oakengine_clipboard_foreach_connection(
#ifdef __cplusplus #ifdef __cplusplus
} }
#include <QtCore/qmetatype.h>
Q_DECLARE_OPAQUE_POINTER(OakEngineClipboard *) Q_DECLARE_OPAQUE_POINTER(OakEngineClipboard *)
Q_DECLARE_OPAQUE_POINTER(OakEngineMarker *) Q_DECLARE_OPAQUE_POINTER(OakEngineMarker *)
#endif #endif
+1
View File
@@ -288,6 +288,7 @@ oakengine_task_save_get_project(OakEngineTask *task);
#ifdef __cplusplus #ifdef __cplusplus
} }
#include <QtCore/qmetatype.h>
Q_DECLARE_OPAQUE_POINTER(OakEngineTask *) Q_DECLARE_OPAQUE_POINTER(OakEngineTask *)
#endif #endif
+1 -1
View File
@@ -1312,10 +1312,10 @@ oakengine_clip_get_connected_viewer(const OakEngineBlock *clip);
// Qt6 on some toolchains requires complete types in meta-type instantiations // Qt6 on some toolchains requires complete types in meta-type instantiations
// (e.g. QList<OakEngineBlock*> in TimelinePanel signals); declare the handles // (e.g. QList<OakEngineBlock*> in TimelinePanel signals); declare the handles
// opaque instead of pulling the engine definitions into the public header. // opaque instead of pulling the engine definitions into the public header.
#include <QtCore/qmetatype.h>
Q_DECLARE_OPAQUE_POINTER(OakEngineBlock *) Q_DECLARE_OPAQUE_POINTER(OakEngineBlock *)
Q_DECLARE_OPAQUE_POINTER(OakEngineClip *) Q_DECLARE_OPAQUE_POINTER(OakEngineClip *)
Q_DECLARE_OPAQUE_POINTER(OakEngineMarkerList *) Q_DECLARE_OPAQUE_POINTER(OakEngineMarkerList *)
Q_DECLARE_OPAQUE_POINTER(OakEngineMarker *)
Q_DECLARE_OPAQUE_POINTER(OakEngineWorkarea *) Q_DECLARE_OPAQUE_POINTER(OakEngineWorkarea *)
Q_DECLARE_OPAQUE_POINTER(OakEngineTrack *) Q_DECLARE_OPAQUE_POINTER(OakEngineTrack *)
Q_DECLARE_OPAQUE_POINTER(OakEngineTrackList *) Q_DECLARE_OPAQUE_POINTER(OakEngineTrackList *)
+1
View File
@@ -162,6 +162,7 @@ OAKENGINE_API int oakengine_traverse_transform(
#ifdef __cplusplus #ifdef __cplusplus
} }
#include <QtCore/qmetatype.h>
Q_DECLARE_OPAQUE_POINTER(OakEngineTraverseDb *) Q_DECLARE_OPAQUE_POINTER(OakEngineTraverseDb *)
#endif #endif
+1
View File
@@ -440,6 +440,7 @@ OAKENGINE_API int oakengine_waveform_cache_get_summary(
#ifdef __cplusplus #ifdef __cplusplus
} }
#include <QtCore/qmetatype.h>
Q_DECLARE_OPAQUE_POINTER(OakEnginePlaybackCache *) Q_DECLARE_OPAQUE_POINTER(OakEnginePlaybackCache *)
Q_DECLARE_OPAQUE_POINTER(OakEngineFrameCache *) Q_DECLARE_OPAQUE_POINTER(OakEngineFrameCache *)
Q_DECLARE_OPAQUE_POINTER(OakEngineThumbnailCache *) Q_DECLARE_OPAQUE_POINTER(OakEngineThumbnailCache *)