diff options
author | mich <mich@FreeBSD.org> | 2005-10-13 23:27:48 +0800 |
---|---|---|
committer | mich <mich@FreeBSD.org> | 2005-10-13 23:27:48 +0800 |
commit | 1f58f0810d3a11c019b2882d6519fddbcd1ca276 (patch) | |
tree | cdf47cac472dfbd404a523e374c77ca4f0b9130c /audio/amarok-kde4 | |
parent | 38fbc14505b643754ede44501ab3b9c88fdd6996 (diff) | |
download | freebsd-ports-gnome-1f58f0810d3a11c019b2882d6519fddbcd1ca276.tar.gz freebsd-ports-gnome-1f58f0810d3a11c019b2882d6519fddbcd1ca276.tar.zst freebsd-ports-gnome-1f58f0810d3a11c019b2882d6519fddbcd1ca276.zip |
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" ) ) |