[vlc-commits] [Git][videolan/vlc][master] qml: set `reuseItems` property declaratively in KeyNavigableListView

2024-04-30 Thread Jean-Baptiste Kempf (@jbk)


Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
b96588cc by Fatih Uzunoglu at 2024-04-30T08:54:58+00:00
qml: set `reuseItems` property declaratively in KeyNavigableListView

- - - - -


1 changed file:

- modules/gui/qt/widgets/qml/KeyNavigableListView.qml


Changes:

=
modules/gui/qt/widgets/qml/KeyNavigableListView.qml
=
@@ -83,6 +83,8 @@ ListView {
 
 boundsBehavior: Flickable.StopAtBounds
 
+reuseItems: true
+
 section.property: ""
 section.criteria: ViewSection.FullString
 section.delegate: sectionHeading
@@ -91,13 +93,6 @@ ListView {
 
 // Events
 
-Component.onCompleted: {
-if (typeof root.reuseItems === "boolean") {
-// Qt 5.15 feature, on by default here:
-root.reuseItems = true
-}
-}
-
 // NOTE: We always want a valid 'currentIndex' by default.
 onCountChanged: if (count && currentIndex === -1) currentIndex = 0
 



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/b96588ccc935e5a6cd9c2c7fd07d1beec7825f7e
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] [Git][videolan/vlc][master] qt: fix URL deserialization in VLCAcessImageProvider

2024-04-30 Thread Jean-Baptiste Kempf (@jbk)


Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
82db96fa by Pierre Lamot at 2024-04-30T06:15:02+00:00
qt: fix URL deserialization in VLCAcessImageProvider

characters as `?` or `` remained encoded and were causing access issue for
artwork from services discoveries such as jamendo

- - - - -


1 changed file:

- modules/gui/qt/util/vlcaccess_image_provider.cpp


Changes:

=
modules/gui/qt/util/vlcaccess_image_provider.cpp
=
@@ -158,7 +158,7 @@ QQuickImageResponse* 
VLCAccessImageProvider::requestImageResponse(const QString&
 if (!query.hasQueryItem(PATH_KEY))
 return nullptr;
 
-QString vlcurl = query.queryItemValue(PATH_KEY, QUrl::FullyEncoded);
+QString vlcurl = query.queryItemValue(PATH_KEY, QUrl::FullyDecoded);
 return new VLCAccessImageResponse(QUrl::fromEncoded(vlcurl.toUtf8()), 
requestedSize, postProcessCb);
 }
 



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/82db96fad087e005a8190c90b8bf862265af7c7e

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/82db96fad087e005a8190c90b8bf862265af7c7e
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] [Git][videolan/vlc][master] qt: ensure network models aren't as cachable too early

2024-04-30 Thread Jean-Baptiste Kempf (@jbk)


Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
2212ef87 by Pierre Lamot at 2024-04-30T05:41:15+00:00
qt: ensure network models arent as cachable too early

most network models are loaded asynchronously, if the cache is built right after
the model initialisation, data isnt loaded yet and the first model version 
is
built on an empty list, which can lead to a transitory state where the view
assumes its not loading anymore and that no data is present

- - - - -


8 changed files:

- modules/gui/qt/Makefile.am
- modules/gui/qt/meson.build
- modules/gui/qt/network/networkdevicemodel.cpp
- modules/gui/qt/network/networkmediamodel.cpp
- modules/gui/qt/network/networksourcesmodel.cpp
- modules/gui/qt/network/servicesdiscoverymodel.cpp
- modules/gui/qt/network/standardpathmodel.cpp
- + modules/gui/qt/util/locallistbasemodel.hpp


Changes:

=
modules/gui/qt/Makefile.am
=
@@ -308,6 +308,7 @@ libqt_plugin_la_SOURCES = \
util/listcache.hxx util/listcache.hpp \
util/listcacheloader.hpp \
util/locallistcacheloader.hpp \
+   util/locallistbasemodel.hpp \
util/navigation_history.cpp util/navigation_history.hpp \
util/item_key_event_filter.cpp \
util/item_key_event_filter.hpp \


=
modules/gui/qt/meson.build
=
@@ -129,6 +129,7 @@ moc_headers = files(
 'util/keyhelper.hpp',
 'util/listcache.hpp',
 'util/locallistcacheloader.hpp',
+'util/locallistbasemodel.hpp',
 'util/navigation_history.hpp',
 'util/item_key_event_filter.hpp',
 'util/effects_image_provider.hpp',
@@ -692,4 +693,3 @@ if qt6_dep.found()
 'dependencies': [qt6_dep, qt_extra_deps],
 }
 endif
-


=
modules/gui/qt/network/networkdevicemodel.cpp
=
@@ -28,8 +28,7 @@
 #include "playlist/playlist_controller.hpp"
 
 #include "util/shared_input_item.hpp"
-#include "util/base_model_p.hpp"
-#include "util/locallistcacheloader.hpp"
+#include "util/locallistbasemodel.hpp"
 
 namespace
 {
@@ -158,17 +157,16 @@ bool ListCache::compareItems(const 
NetworkDeviceItemPtr& a
 // NetworkDeviceModelPrivate
 
 class NetworkDeviceModelPrivate
-: public BaseModelPrivateT
-, public LocalListCacheLoader::ModelSource
+: public LocalListBaseModelPrivate
 {
 Q_DECLARE_PUBLIC(NetworkDeviceModel)
 public:
 NetworkDeviceModelPrivate(NetworkDeviceModel * pub)
-: BaseModelPrivateT(pub)
+: LocalListBaseModelPrivate(pub)
 , m_items(0, NetworkDeviceItemHash{}, NetworkDeviceItemEqual{})
 {}
 
-NetworkDeviceModelLoader::ItemCompare getSortFunction() const
+NetworkDeviceModelLoader::ItemCompare getSortFunction() const override
 {
 if (m_sortCriteria == "mrl")
 {
@@ -186,13 +184,6 @@ public:
 }
 }
 
-std::unique_ptr> createLoader() 
const override
-{
-return std::make_unique(
-this, m_searchPattern,
-getSortFunction());
-}
-
 bool initializeModel() override
 {
 Q_Q(NetworkDeviceModel);
@@ -240,6 +231,11 @@ public:
 return false;
 m_listeners.push_back( std::move( l ) );
 }
+
+//service discovery don't notify preparse end
+m_loading = false;
+emit q->loadingChanged();
+
 return m_listeners.empty() == false;
 }
 
@@ -293,7 +289,7 @@ public:
 
 if (dataChanged)
 {
-m_modelRevision += 1;
+m_revision += 1;
 invalidateCache();
 }
 }
@@ -336,17 +332,12 @@ public:
 }
 if (dataChanged)
 {
-m_modelRevision += 1;
+m_revision += 1;
 invalidateCache();
 }
 }
 
 public: //LocalListCacheLoader::ModelSource
-size_t getModelRevision() const override
-{
-return m_modelRevision;
-}
-
 std::vector getModelData(const QString& pattern) 
const override
 {
 std::vector items;
@@ -369,7 +360,6 @@ public: //LocalListCacheLoader::ModelSource
 }
 
 public:
-size_t m_modelRevision = 0;
 NetworkDeviceItemSet m_items;
 std::vector> m_listeners;
 };


=
modules/gui/qt/network/networkmediamodel.cpp
=
@@ -21,8 +21,7 @@
 
 #include "maininterface/mainctx.hpp"
 
-#include "util/base_model_p.hpp"
-#include "util/locallistcacheloader.hpp"
+#include "util/locallistbasemodel.hpp"
 
 #include "playlist/media.hpp"
 #include "playlist/playlist_controller.hpp"
@@ -75,14 +74,13 @@ bool ListCache::compareItems(const 
NetworkMediaItemPtr& a,
 // NetworkMediaModelPrivate
 
 class NetworkMediaModelPrivate
-: public BaseModelPrivateT
-, public LocalListCacheLoader::ModelSource
+: public LocalListBaseModelPrivate
 {