From 1369e838eb36d52c5fd2b388bc674a8a72d2bc15 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Tue, 26 Jun 2012 08:19:39 -0400 Subject: [PATCH] Revert "See if this fixes lfranchi's assert" This reverts commit e6af7b03d79abc75441f1e116ddad988907f3dc1. Conflicts: src/libtomahawk/database/DatabaseImpl.cpp --- src/libtomahawk/database/DatabaseImpl.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libtomahawk/database/DatabaseImpl.cpp b/src/libtomahawk/database/DatabaseImpl.cpp index 37af484f0..051df69a5 100644 --- a/src/libtomahawk/database/DatabaseImpl.cpp +++ b/src/libtomahawk/database/DatabaseImpl.cpp @@ -328,9 +328,10 @@ DatabaseImpl::artistId( const QString& name_orig, bool autoCreate ) int id = 0; QString sortname = DatabaseImpl::sortname( name_orig ); - QString queryString = QString( "SELECT id FROM artist WHERE sortname = '%1'" ).arg( TomahawkSqlQuery::escape( sortname ) ); TomahawkSqlQuery query = newquery(); - query.exec( queryString ); + query.prepare( "SELECT id FROM artist WHERE sortname = ?" ); + query.addBindValue( sortname ); + query.exec(); if ( query.next() ) { id = query.value( 0 ).toInt();