[vlc-devel] [PATCH] qt: player_controller: use unique_ptr instead of QScopedPtr

Alexandre Janniaux ajanni at videolabs.io
Thu Feb 13 12:14:04 CET 2020


Hi,

It seems this patch is not correct on the CI environment.

https://jenkins.videolan.org/job/vlc-continuous/job/vlc-cont-debian-x86_64/7564/console

It might be because of Qt 5.12 implementation which is
different from mine (Qt 5.14 archlinux). Sorry for the
inconvenience on the CI.

I will try to find why later, please ignore this patch
for now.

Regards,
--
Alexandre Janniaux
Videolabs

On Tue, Jan 28, 2020 at 03:48:14PM +0100, Alexandre Janniaux wrote:
> ---
>  modules/gui/qt/player/player_controller.cpp | 2 +-
>  modules/gui/qt/player/player_controller.hpp | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/modules/gui/qt/player/player_controller.cpp b/modules/gui/qt/player/player_controller.cpp
> index b7e39086e9..4a2b0fd077 100644
> --- a/modules/gui/qt/player/player_controller.cpp
> +++ b/modules/gui/qt/player/player_controller.cpp
> @@ -1024,7 +1024,7 @@ PlayerControllerPrivate::PlayerControllerPrivate(PlayerController *playercontrol
>
>  PlayerController::PlayerController( intf_thread_t *_p_intf )
>      : QObject(NULL)
> -    , d_ptr( new PlayerControllerPrivate(this, _p_intf) )
> +    , d_ptr { std::make_unique<PlayerControllerPrivate>(this, _p_intf) }
>  {
>      /* Audio Menu */
>      menusAudioMapper = new QSignalMapper(this);
> diff --git a/modules/gui/qt/player/player_controller.hpp b/modules/gui/qt/player/player_controller.hpp
> index 3c792b47a9..54165f1449 100644
> --- a/modules/gui/qt/player/player_controller.hpp
> +++ b/modules/gui/qt/player/player_controller.hpp
> @@ -432,7 +432,7 @@ private slots:
>
>  private:
>      Q_DECLARE_PRIVATE(PlayerController)
> -    QScopedPointer<PlayerControllerPrivate> d_ptr;
> +    std::unique_ptr<PlayerControllerPrivate> d_ptr;
>      QSignalMapper *menusAudioMapper; //used by VLCMenuBar
>
>      /* updateArt gui request */
> --
> 2.25.0


More information about the vlc-devel mailing list