Skip to content
Snippets Groups Projects
Commit 7e269398 authored by Alexandre Janniaux's avatar Alexandre Janniaux Committed by Steve Lhomme
Browse files

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;
          |        ^
parent f9b455e7
No related branches found
No related tags found
1 merge request!6281qt: renderer_manager: fix struct/class mismatch
Pipeline #532225 passed with stage
in 50 minutes and 48 seconds
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment