[vlc-commits] [Git][videolan/vlc][master] qt: renderer_manager: fix struct/class mismatch
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sat Nov 9 16:57:43 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
7e269398 by Alexandre Janniaux at 2024-11-09T15:58:49+00:00
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;
| ^
- - - - -
1 changed file:
- modules/gui/qt/util/renderer_manager.cpp
Changes:
=====================================
modules/gui/qt/util/renderer_manager.cpp
=====================================
@@ -55,8 +55,9 @@ struct ItemEntry
bool currentScan = true;
};
-struct RendererManagerPrivate
+class RendererManagerPrivate
{
+public:
RendererManagerPrivate(RendererManager* pub, qt_intf_t* const intf, vlc_player_t* const player)
: p_intf(intf)
, m_player(player)
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/7e269398132d1e2d8382e3b86ea322a13146ca79
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/7e269398132d1e2d8382e3b86ea322a13146ca79
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list