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

Alexandre Janniaux git at videolan.org
Thu Feb 13 12:03:41 CET 2020


vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Tue Jan 28 15:48:14 2020 +0100| [5672d50cc9abc629b34094e5c40c07d201fe7273] | committer: Jean-Baptiste Kempf

qt: player_controller: use unique_ptr instead of QScopedPtr

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5672d50cc9abc629b34094e5c40c07d201fe7273
---

 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 724232062b..b129b49171 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 */



More information about the vlc-commits mailing list