diff options
author | Michael Landin <mich@FreeBSD.org> | 2005-10-13 15:27:48 +0000 |
---|---|---|
committer | Michael Landin <mich@FreeBSD.org> | 2005-10-13 15:27:48 +0000 |
commit | 2b28f08dcc3868aa21a43152e6820c043a1445ef (patch) | |
tree | 0ac6967aacc7e714ef28a46d8de35a809d718fff /audio/amarok-kde4 | |
parent | . Make this port build and install correctly on amd64 (and hopefully on (diff) |
o add patch to fix user-defined smart playlists with pgsql enabled.
- patch also submitted & committed upstream
Diffstat (limited to 'audio/amarok-kde4')
-rw-r--r-- | audio/amarok-kde4/files/patch-amarok_src_smartplaylisteditor.cpp | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/audio/amarok-kde4/files/patch-amarok_src_smartplaylisteditor.cpp b/audio/amarok-kde4/files/patch-amarok_src_smartplaylisteditor.cpp new file mode 100644 index 000000000000..6ac0b57a2114 --- /dev/null +++ b/audio/amarok-kde4/files/patch-amarok_src_smartplaylisteditor.cpp @@ -0,0 +1,54 @@ + +$FreeBSD$ + +--- amarok/src/smartplaylisteditor.cpp.orig ++++ amarok/src/smartplaylisteditor.cpp +@@ -387,9 +387,9 @@ + joins += " INNER JOIN statistics ON statistics.url=tags.url"; + } + if ( !criteriaListStr.isEmpty() ) +- whereStr = QString(" WHERE (%1) AND %2 = \"(*ExpandString*)\"").arg(criteriaListStr).arg(field); ++ whereStr = QString(" WHERE (%1) AND %2 = '(*ExpandString*)'").arg(criteriaListStr).arg(field); + else +- whereStr = QString("WHERE %1 = \"(*ExpandString*)\"").arg(field); ++ whereStr = QString("WHERE %1 = '(*ExpandString*)'").arg(field); + m_expandQuery = "SELECT album.name, artist.name, genre.name, tags.title, year.name, " + "tags.comment, tags.track, tags.bitrate, tags.length, tags.samplerate, tags.url" + " FROM " + joins + whereStr + orderStr + limitStr + ";"; +@@ -614,16 +614,16 @@ + + + if( criteria == i18n("contains") ) +- searchCriteria += " LIKE \"%" + value + "%\""; ++ searchCriteria += " LIKE '%" + value + "%'"; + else if( criteria == i18n("does not contain") ) +- searchCriteria += " NOT LIKE \"%" + value + "%\""; ++ searchCriteria += " NOT LIKE '%" + value + "%'"; + else if( criteria == i18n("is") ) { + if( m_currentValueType == Date ) + searchCriteria += " BETWEEN "; + else + searchCriteria += " = "; + if( m_currentValueType == String || m_currentValueType == AutoCompletionString ) +- value.prepend("\"").append("\""); ++ value.prepend("'").append("'"); + searchCriteria += value; + if (field=="statistics.playcounter" && value=="0") { + searchCriteria += " OR statistics.playcounter IS NULL"; +@@ -635,13 +635,13 @@ + else + searchCriteria += " <> "; + if( m_currentValueType == String || m_currentValueType == AutoCompletionString ) +- value.prepend("\"").append("\""); ++ value.prepend("'").append("'"); + searchCriteria += value; + } + else if( criteria == i18n("starts with") ) +- searchCriteria += " LIKE \"" + value + "%\""; ++ searchCriteria += " LIKE '" + value + "%'"; + else if( criteria == i18n("ends with") ) +- searchCriteria += " LIKE \"%" + value + "\""; ++ searchCriteria += " LIKE '%" + value + "'"; + else if( criteria == i18n("is greater than") || criteria == i18n("is after") ) + searchCriteria += " > " + value; + else if( criteria == i18n("is smaller than") || criteria == i18n("is before" ) ) |