mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 03:40:16 +02:00
* Assert when trying to setup a query without artist or track.
This commit is contained in:
@@ -82,6 +82,9 @@ PlaybackLog::PlaybackLog( const PlaybackLog& other )
|
|||||||
query_ptr
|
query_ptr
|
||||||
Query::get( const QString& artist, const QString& track, const QString& album, const QID& qid, bool autoResolve )
|
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() )
|
if ( qid.isEmpty() )
|
||||||
autoResolve = false;
|
autoResolve = false;
|
||||||
|
|
||||||
@@ -98,6 +101,8 @@ Query::get( const QString& artist, const QString& track, const QString& album, c
|
|||||||
query_ptr
|
query_ptr
|
||||||
Query::get( const QString& query, const QID& qid )
|
Query::get( const QString& query, const QID& qid )
|
||||||
{
|
{
|
||||||
|
Q_ASSERT( !query.trimmed().isEmpty() );
|
||||||
|
|
||||||
query_ptr q = query_ptr( new Query( query, qid ), &QObject::deleteLater );
|
query_ptr q = query_ptr( new Query( query, qid ), &QObject::deleteLater );
|
||||||
q->setWeakRef( q.toWeakRef() );
|
q->setWeakRef( q.toWeakRef() );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user