[vlc-commits] [Git][videolan/vlc][master] 2 commits: mlbasemodel: add missing override

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Feb 6 07:05:30 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
392131fa by Alexandre Janniaux at 2024-02-06T06:28:46+00:00
mlbasemodel: add missing override

Fix the following warnings on clang 16.0.6:

    ../../../../modules/gui/qt/medialibrary/mlbasemodel.cpp:60:10: warning: 'validateCache' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
        void validateCache() const
             ^
    ../../../../modules/gui/qt/util/base_model_p.hpp:128:10: note: overridden virtual function is here
        void validateCache() const override;
         ^

- - - - -
37bf8806 by Alexandre Janniaux at 2024-02-06T06:28:46+00:00
mlbasemodel: remove unused `this` capture

Fixes the following warnings on clang 16.0.6:

    ../../../../modules/gui/qt/medialibrary/mlbasemodel.cpp:473:10: warning: lambda capture 'this' is not used [-Wunused-lambda-capture]
            [this, cb](quint64 taskId, Ctx& ctx)
             ^~~~~
    ../../../../modules/gui/qt/medialibrary/mlbasemodel.cpp:495:10: warning: lambda capture 'this' is not used [-Wunused-lambda-capture]
            [this, cb](quint64 taskId, Ctx& ctx)
             ^~~~~
    ../../../../modules/gui/qt/medialibrary/mlbasemodel.cpp:511:10: warning: lambda capture 'this' is not used [-Wunused-lambda-capture]
            [this, offset, limit, op = m_op]
             ^~~~~
    ../../../../modules/gui/qt/medialibrary/mlbasemodel.cpp:518:10: warning: lambda capture 'this' is not used [-Wunused-lambda-capture]
            [this, cb](quint64 taskId, Ctx& ctx) {
             ^~~~~
    ../../../../modules/gui/qt/medialibrary/mlbasemodel.cpp:592:10: warning: lambda capture 'this' is not used [-Wunused-lambda-capture]
            [this, cb](qint64 taskId, Ctx& ctx) {
             ^~~~~

- - - - -


1 changed file:

- modules/gui/qt/medialibrary/mlbasemodel.cpp


Changes:

=====================================
modules/gui/qt/medialibrary/mlbasemodel.cpp
=====================================
@@ -57,7 +57,7 @@ public:
         : Parent(pub)
     {}
 
-    void validateCache() const
+    void validateCache() const override
     {
         Q_Q(const MLBaseModel);
 
@@ -470,7 +470,7 @@ size_t MLListCacheLoader::countTask(std::function<void(size_t taskId, size_t cou
             ctx.count = op->count(ml, &query);
         },
         //UI thread
-        [this, cb](quint64 taskId, Ctx& ctx)
+        [cb](quint64 taskId, Ctx& ctx)
         {
             cb(taskId,  ctx.count);
         });
@@ -492,7 +492,7 @@ size_t MLListCacheLoader::loadTask(size_t offset, size_t limit,
             ctx.list = op->load(ml, &query);
         },
         //UI thread
-        [this, cb](quint64 taskId, Ctx& ctx)
+        [cb](quint64 taskId, Ctx& ctx)
         {
             cb(taskId, ctx.list);
         });
@@ -508,14 +508,14 @@ size_t MLListCacheLoader::countAndLoadTask(size_t offset, size_t limit,
 
     return m_medialib->runOnMLThread<Ctx>(this,
         //ML thread
-        [this, offset, limit, op = m_op]
+        [offset, limit, op = m_op]
         (vlc_medialibrary_t* ml, Ctx& ctx) {
             auto query = op->getQueryParams(offset, limit);
             ctx.list = op->load(ml, &query);
             ctx.maximumCount = op->count(ml, &query);
         },
         //UI thread
-        [this, cb](quint64 taskId, Ctx& ctx) {
+        [cb](quint64 taskId, Ctx& ctx) {
             cb(taskId,  ctx.maximumCount, ctx.list);
         });
 }
@@ -589,7 +589,7 @@ size_t MLListCacheLoader::loadItemByIdTask(MLItemId itemId, std::function<void (
             ctx.item = op->loadItemById(ml, itemId);
         },
         //UI thread
-        [this, cb](qint64 taskId, Ctx& ctx) {
+        [cb](qint64 taskId, Ctx& ctx) {
             if (!ctx.item)
                 return;
             cb(taskId, std::move(ctx.item));



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/f72c06c4ffe9cb614d66971e853ac29e17d98a3c...37bf8806dcd6b4f04cf3f0a0cc21470c801e9980

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/f72c06c4ffe9cb614d66971e853ac29e17d98a3c...37bf8806dcd6b4f04cf3f0a0cc21470c801e9980
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