1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-05 08:32:42 +02:00

* Assert when trying to setup a query without artist or track.

This commit is contained in:
Christian Muehlhaeuser 2012-06-26 23:14:43 +02:00
parent 9b09cbd11e
commit 937908766c

View File

@ -82,6 +82,9 @@ PlaybackLog::PlaybackLog( const PlaybackLog& other )
query_ptr
Query::get( const QString& artist, const QString& track, const QString& album, const QID& qid, bool autoResolve )
{
Q_ASSERT( !artist.trimmed().isEmpty() );
Q_ASSERT( !track.trimmed().isEmpty() );
if ( qid.isEmpty() )
autoResolve = false;
@ -98,6 +101,8 @@ Query::get( const QString& artist, const QString& track, const QString& album, c
query_ptr
Query::get( const QString& query, const QID& qid )
{
Q_ASSERT( !query.trimmed().isEmpty() );
query_ptr q = query_ptr( new Query( query, qid ), &QObject::deleteLater );
q->setWeakRef( q.toWeakRef() );