mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 11:20:22 +02:00
* Add logging to debug SearchWidget's performance better.
This commit is contained in:
@@ -200,6 +200,8 @@ SearchWidget::jumpToCurrentTrack()
|
|||||||
void
|
void
|
||||||
SearchWidget::onResultsFound( const QList<Tomahawk::result_ptr>& results )
|
SearchWidget::onResultsFound( const QList<Tomahawk::result_ptr>& results )
|
||||||
{
|
{
|
||||||
|
tDebug() << Q_FUNC_INFO;
|
||||||
|
|
||||||
QList<Tomahawk::artist_ptr> artists;
|
QList<Tomahawk::artist_ptr> artists;
|
||||||
QList<Tomahawk::album_ptr> albums;
|
QList<Tomahawk::album_ptr> albums;
|
||||||
QList<Tomahawk::query_ptr> queries;
|
QList<Tomahawk::query_ptr> queries;
|
||||||
@@ -229,6 +231,8 @@ SearchWidget::onResultsFound( const QList<Tomahawk::result_ptr>& results )
|
|||||||
void
|
void
|
||||||
SearchWidget::onAlbumsFound( const QList<Tomahawk::album_ptr>& albums )
|
SearchWidget::onAlbumsFound( const QList<Tomahawk::album_ptr>& albums )
|
||||||
{
|
{
|
||||||
|
tDebug() << Q_FUNC_INFO;
|
||||||
|
|
||||||
foreach ( const Tomahawk::album_ptr& album, albums )
|
foreach ( const Tomahawk::album_ptr& album, albums )
|
||||||
{
|
{
|
||||||
int distance = TomahawkUtils::levenshtein( m_search, album->name() );
|
int distance = TomahawkUtils::levenshtein( m_search, album->name() );
|
||||||
@@ -249,6 +253,8 @@ SearchWidget::onAlbumsFound( const QList<Tomahawk::album_ptr>& albums )
|
|||||||
void
|
void
|
||||||
SearchWidget::onArtistsFound( const QList<Tomahawk::artist_ptr>& artists )
|
SearchWidget::onArtistsFound( const QList<Tomahawk::artist_ptr>& artists )
|
||||||
{
|
{
|
||||||
|
tDebug() << Q_FUNC_INFO;
|
||||||
|
|
||||||
foreach ( const Tomahawk::artist_ptr& artist, artists )
|
foreach ( const Tomahawk::artist_ptr& artist, artists )
|
||||||
{
|
{
|
||||||
int distance = TomahawkUtils::levenshtein( m_search, artist->name() );
|
int distance = TomahawkUtils::levenshtein( m_search, artist->name() );
|
||||||
@@ -269,6 +275,8 @@ SearchWidget::onArtistsFound( const QList<Tomahawk::artist_ptr>& artists )
|
|||||||
void
|
void
|
||||||
SearchWidget::onQueryFinished()
|
SearchWidget::onQueryFinished()
|
||||||
{
|
{
|
||||||
|
tDebug() << Q_FUNC_INFO;
|
||||||
|
|
||||||
m_artistsModel->finishLoading();
|
m_artistsModel->finishLoading();
|
||||||
m_albumsModel->finishLoading();
|
m_albumsModel->finishLoading();
|
||||||
m_resultsModel->finishLoading();
|
m_resultsModel->finishLoading();
|
||||||
@@ -278,6 +286,8 @@ SearchWidget::onQueryFinished()
|
|||||||
void
|
void
|
||||||
SearchWidget::updateArtists()
|
SearchWidget::updateArtists()
|
||||||
{
|
{
|
||||||
|
tDebug() << Q_FUNC_INFO;
|
||||||
|
|
||||||
QList< Tomahawk::artist_ptr > sortedArtists;
|
QList< Tomahawk::artist_ptr > sortedArtists;
|
||||||
QList< float > floats = m_artists.keys();
|
QList< float > floats = m_artists.keys();
|
||||||
qSort( floats.begin(), floats.end() );
|
qSort( floats.begin(), floats.end() );
|
||||||
@@ -295,6 +305,8 @@ SearchWidget::updateArtists()
|
|||||||
void
|
void
|
||||||
SearchWidget::updateAlbums()
|
SearchWidget::updateAlbums()
|
||||||
{
|
{
|
||||||
|
tDebug() << Q_FUNC_INFO;
|
||||||
|
|
||||||
QList< Tomahawk::album_ptr > sortedAlbums;
|
QList< Tomahawk::album_ptr > sortedAlbums;
|
||||||
QList< float > floats = m_albums.keys();
|
QList< float > floats = m_albums.keys();
|
||||||
qSort( floats.begin(), floats.end() );
|
qSort( floats.begin(), floats.end() );
|
||||||
|
Reference in New Issue
Block a user