[vlmc-devel] Library: Update to recent medialibrary API change
Hugo Beauzée-Luyssen
git at videolan.org
Wed Aug 31 18:50:14 CEST 2016
vlmc | branch: medialibrary | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Aug 31 18:49:46 2016 +0200| [5d0034ac37c47d69d3b74ba9de2dd2457cbe6f6c] | committer: Hugo Beauzée-Luyssen
Library: Update to recent medialibrary API change
> https://code.videolan.org/videolan/vlmc/commit/5d0034ac37c47d69d3b74ba9de2dd2457cbe6f6c
---
src/Gui/MainWindow.cpp | 2 +-
src/Library/Library.cpp | 9 +++++++--
src/Library/Library.h | 3 ++-
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
index c56c819..a02fb81 100644
--- a/src/Gui/MainWindow.cpp
+++ b/src/Gui/MainWindow.cpp
@@ -115,7 +115,7 @@ MainWindow::MainWindow( Backend::IBackend* backend, QWidget *parent )
}
});
- connect( Core::instance()->library(), &Library::discoveryStarted, this,
+ connect( Core::instance()->library(), &Library::discoveryProgress, this,
[this](const QString& folder) {
m_ui.statusbar->showMessage( "Discovering " + folder + "...", 2500 );
}, Qt::QueuedConnection );
diff --git a/src/Library/Library.cpp b/src/Library/Library.cpp
index 4489922..5eabf9e 100644
--- a/src/Library/Library.cpp
+++ b/src/Library/Library.cpp
@@ -298,9 +298,14 @@ Library::onTracksDeleted( std::vector<int64_t> )
}
void
-Library::onDiscoveryStarted( const std::string& entryPoint )
+Library::onDiscoveryStarted( const std::string& )
{
- emit discoveryStarted( QString::fromStdString( entryPoint ) );
+}
+
+void
+Library::onDiscoveryProgress( const std::string& entryPoint )
+{
+ emit discoveryProgress( QString::fromStdString( entryPoint ) );
}
void
diff --git a/src/Library/Library.h b/src/Library/Library.h
index 27a9d96..41cd431 100644
--- a/src/Library/Library.h
+++ b/src/Library/Library.h
@@ -101,6 +101,7 @@ private:
virtual void onTracksAdded( std::vector<medialibrary::AlbumTrackPtr> tracks ) override;
virtual void onTracksDeleted( std::vector<int64_t> trackIds ) override;
virtual void onDiscoveryStarted( const std::string& entryPoint ) override;
+ virtual void onDiscoveryProgress( const std::string& entryPoint ) override;
virtual void onDiscoveryCompleted( const std::string& entryPoint ) override;
virtual void onParsingStatsUpdated( uint32_t percent ) override;
@@ -126,7 +127,7 @@ signals:
void cleanStateChanged( bool newState );
void progressUpdated( int percent );
- void discoveryStarted( QString );
+ void discoveryProgress( QString );
void discoveryCompleted( QString );
};
More information about the Vlmc-devel
mailing list