[vlc-commits] qt: use QUrl::FullyEncoded to convert QUrl to string in NetworkMediaModel
Pierre Lamot
git at videolan.org
Fri Jan 24 11:37:58 CET 2020
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Mon Jan 20 14:23:27 2020 +0100| [5c60406671fd868b52956841a4b64d2cc5ba1c43] | committer: Thomas Guillem
qt: use QUrl::FullyEncoded to convert QUrl to string in NetworkMediaModel
QUrl::None doesn't encode space, thus generate illformed URL
this patch follows up "qt: fix url encoding of medialibrary endpoints"
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5c60406671fd868b52956841a4b64d2cc5ba1c43
---
modules/gui/qt/network/networkmediamodel.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/gui/qt/network/networkmediamodel.cpp b/modules/gui/qt/network/networkmediamodel.cpp
index a7e96a2ac7..c2561e1620 100644
--- a/modules/gui/qt/network/networkmediamodel.cpp
+++ b/modules/gui/qt/network/networkmediamodel.cpp
@@ -114,9 +114,9 @@ bool NetworkMediaModel::setData( const QModelIndex& idx, const QVariant& value,
return false;
int res;
if ( enabled )
- res = vlc_ml_add_folder( m_ml, qtu( m_items[idx.row()].mainMrl.toString( QUrl::None ) ) );
+ res = vlc_ml_add_folder( m_ml, qtu( m_items[idx.row()].mainMrl.toString( QUrl::FullyEncoded ) ) );
else
- res = vlc_ml_remove_folder( m_ml, qtu( m_items[idx.row()].mainMrl.toString( QUrl::None ) ) );
+ res = vlc_ml_remove_folder( m_ml, qtu( m_items[idx.row()].mainMrl.toString( QUrl::FullyEncoded ) ) );
m_items[idx.row()].indexed = enabled;
emit dataChanged(idx, idx, { NETWORK_INDEXED });
return res == VLC_SUCCESS;
@@ -370,7 +370,7 @@ void NetworkMediaModel::refreshMediaList( MediaSourcePtr mediaSource,
if ( item.canBeIndexed == true )
{
- if ( vlc_ml_is_indexed( m_ml, qtu( item.mainMrl.toString( QUrl::None ) ),
+ if ( vlc_ml_is_indexed( m_ml, qtu( item.mainMrl.toString( QUrl::FullyEncoded ) ),
&item.indexed ) != VLC_SUCCESS )
item.indexed = false;
}
More information about the vlc-commits
mailing list