Skip to content

qt: renderer_manager: fix struct/class mismatch

The class was declared with the class keyword in the header file, but defined with the struct keyword in the source file to make the internal data public, leading to the following warning:

../../../../modules/gui/qt/util/renderer_manager.cpp:58:1: warning: 'RendererManagerPrivate' defined as a struct here but previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]
58 | struct RendererManagerPrivate
| ^
../../../../modules/gui/qt/util/renderer_manager.hpp:24:1: note: did you mean struct here?
24 | class RendererManagerPrivate;
| ^~~~~
| struct

The keyword class was preferred everywhere despite the whole class being public, because Q_DECLARE_PRIVATE uses the class keyword. Changing it to struct would have led to the following warning:

util/../../../../../modules/gui/qt/util/renderer_manager.hpp:81:5: warning: class 'RendererManagerPrivate' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]
   81 |     Q_DECLARE_PRIVATE(RendererManager);
      |     ^
/opt/homebrew/lib/QtCore.framework/Headers/qtclasshelpermacros.h:93:12: note: expanded from macro 'Q_DECLARE_PRIVATE'
   93 |     friend class Class##Private;
      |            ^
util/../../../../../modules/gui/qt/util/renderer_manager.hpp:24:8: note: previous use is here
   24 | struct RendererManagerPrivate;
      |        ^

Merge request reports

Loading