1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-13 17:43:59 +02:00

* Reimplement QLabel's clear() in QueryLabel.

This commit is contained in:
Christian Muehlhaeuser
2014-08-25 13:14:25 +02:00
parent 150938503e
commit 1ae3222ceb
2 changed files with 16 additions and 5 deletions

View File

@@ -144,11 +144,7 @@ QueryLabel::text() const
void
QueryLabel::setText( const QString& text )
{
m_result.clear();
m_query.clear();
m_artist.clear();
m_album.clear();
clear();
QLabel::setText( m_text );
m_text = text;
@@ -160,6 +156,20 @@ QueryLabel::setText( const QString& text )
}
void
QueryLabel::clear()
{
m_type = None;
m_result.clear();
m_query.clear();
m_artist.clear();
m_album.clear();
QLabel::clear();
}
void
QueryLabel::onResultChanged()
{

View File

@@ -70,6 +70,7 @@ public:
void init();
public slots:
void clear();
void setText( const QString& text );
void setResult( const Tomahawk::result_ptr& result );
void setQuery( const Tomahawk::query_ptr& query );