[vlc-commits] [Git][videolan/vlc][master] qt: remove obsolete qt version checks

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Apr 25 01:07:56 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
6554e5e6 by Fatih Uzunoglu at 2023-04-25T00:51:47+00:00
qt: remove obsolete qt version checks

- - - - -


3 changed files:

- modules/gui/qt/player/player_controller_p.hpp
- modules/gui/qt/playlist/playlist_controller_p.hpp
- modules/gui/qt/playlist/playlist_model_p.hpp


Changes:

=====================================
modules/gui/qt/player/player_controller_p.hpp
=====================================
@@ -58,12 +58,7 @@ public:
     void callAsync(Fun&& fun)
     {
         Q_Q(PlayerController);
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
         QMetaObject::invokeMethod(q, std::forward<Fun>(fun), Qt::QueuedConnection, nullptr);
-#else
-        QObject src;
-        QObject::connect(&src, &QObject::destroyed, q, std::forward<Fun>(fun), Qt::QueuedConnection);
-#endif
     }
 
 public:


=====================================
modules/gui/qt/playlist/playlist_controller_p.hpp
=====================================
@@ -42,12 +42,7 @@ public:
     inline void callAsync(Fun&& fun)
     {
         Q_Q(PlaylistControllerModel);
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
         QMetaObject::invokeMethod(q, std::forward<Fun>(fun), Qt::QueuedConnection, nullptr);
-#else
-        QObject src;
-        QObject::connect(&src, &QObject::destroyed, q, std::forward<Fun>(fun), Qt::QueuedConnection);
-#endif
     }
 
     //playlist


=====================================
modules/gui/qt/playlist/playlist_model_p.hpp
=====================================
@@ -41,12 +41,7 @@ public:
     inline void callAsync(Fun&& fun)
     {
         Q_Q(PlaylistListModel);
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
         QMetaObject::invokeMethod(q, std::forward<Fun>(fun), Qt::QueuedConnection, nullptr);
-#else
-        QObject src;
-        QObject::connect(&src, &QObject::destroyed, q, std::forward<Fun>(fun), Qt::QueuedConnection);
-#endif
     }
 
     void onItemsReset(const QVector<PlaylistItem>& items);



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/6554e5e610cd36f8f8811b8949c41e5c038cf324

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/6554e5e610cd36f8f8811b8949c41e5c038cf324
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