[vlc-commits] [Git][videolan/vlc][master] qt: improve entry point formatting

Hugo Beauzée-Luyssen (@chouquette) gitlab at videolan.org
Mon Apr 18 16:24:27 UTC 2022



Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC


Commits:
b7b5fd49 by Prince Gupta at 2022-04-18T16:11:05+00:00
qt: improve entry point formatting

- - - - -


1 changed file:

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


Changes:

=====================================
modules/gui/qt/medialibrary/medialib.cpp
=====================================
@@ -380,10 +380,14 @@ void MediaLib::onMediaLibraryEvent( void* data, const vlc_ml_event_t* event )
         }
         case VLC_ML_EVENT_DISCOVERY_PROGRESS:
         {
-            QString entryPoint{ event->discovery_progress.psz_entry_point };
-            QMetaObject::invokeMethod(self, [self, entryPoint]() {
-                self->m_discoveryEntryPoint = entryPoint;
-                self->emit discoveryEntryPointChanged(entryPoint);
+            const QUrl entryPoint{ event->discovery_progress.psz_entry_point };
+            const QString entryPointStr = entryPoint.isLocalFile()
+                                              ? entryPoint.toLocalFile()
+                                              : entryPoint.toDisplayString();
+
+            QMetaObject::invokeMethod(self, [self, entryPointStr]() {
+                self->m_discoveryEntryPoint = entryPointStr;
+                self->emit discoveryEntryPointChanged(entryPointStr);
             });
             break;
         }



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

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