From a8010e2bb4cc4c78d7d3c94a1776fe6a8b2806cc Mon Sep 17 00:00:00 2001 From: Stefan Derkits Date: Wed, 9 Jan 2013 16:23:41 +0100 Subject: [PATCH] don't compare any user visible strings --- .../playlist/dynamic/echonest/EchonestControl.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libtomahawk/playlist/dynamic/echonest/EchonestControl.cpp b/src/libtomahawk/playlist/dynamic/echonest/EchonestControl.cpp index e2fd388e3..61d25aaa1 100644 --- a/src/libtomahawk/playlist/dynamic/echonest/EchonestControl.cpp +++ b/src/libtomahawk/playlist/dynamic/echonest/EchonestControl.cpp @@ -551,8 +551,8 @@ Tomahawk::EchonestControl::updateData() m_matchString = match->currentText(); m_matchData = match->itemData( match->currentIndex() ).toString(); - QString songType = combo->currentText().toLower(); - if ( match->currentText() == "is not" ) + QString songType = combo->itemData( combo->currentIndex() ).toString(); + if ( match->currentIndex() == 1 ) songType.append( ":false" ); m_data.first = Echonest::DynamicPlaylist::SongType; @@ -904,8 +904,8 @@ Tomahawk::EchonestControl::calculateSummary() Q_ASSERT( !m_match.isNull() ); Q_ASSERT( qobject_cast< QComboBox* >( m_match.data() ) ); - QString isOrIsNot = qobject_cast< QComboBox* >( m_match.data() )->currentText().toLower(); - if ( isOrIsNot == "is" ) + QComboBox* combo = qobject_cast< QComboBox* >( m_match.data() ); + if ( combo->currentIndex() == 0 ) summary = tr( "where song type is %1" ).arg( text ); else summary = tr( "where song type is not %1" ).arg( text );