From 22e2800e9e35cc3d74d22b4285ba5b51484e7432 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sun, 12 Jun 2011 06:19:03 +0200 Subject: [PATCH] * Fixed two bugs I introduced with my last commit. --- src/libtomahawk/database/databasecommand_resolve.cpp | 2 +- src/libtomahawk/database/databaseimpl.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libtomahawk/database/databasecommand_resolve.cpp b/src/libtomahawk/database/databasecommand_resolve.cpp index 5908f4ada..053283b47 100644 --- a/src/libtomahawk/database/databasecommand_resolve.cpp +++ b/src/libtomahawk/database/databasecommand_resolve.cpp @@ -173,7 +173,7 @@ DatabaseCommand_Resolve::resolve( DatabaseImpl* lib ) float score = how_similar( m_query, result ); result->setScore( score ); - if ( m_query->fullTextQuery().isEmpty() && score < MINSCORE ) + if ( score < MINSCORE ) continue; result->setCollection( s->collection() ); diff --git a/src/libtomahawk/database/databaseimpl.cpp b/src/libtomahawk/database/databaseimpl.cpp index d5409859c..d8c21b024 100644 --- a/src/libtomahawk/database/databaseimpl.cpp +++ b/src/libtomahawk/database/databaseimpl.cpp @@ -50,7 +50,7 @@ DatabaseImpl::DatabaseImpl( const QString& dbname, Database* parent ) bool schemaUpdated = false; int version = getDatabaseVersion( dbname ); - if ( version != CURRENT_SCHEMA_VERSION ) + if ( version > 0 && version != CURRENT_SCHEMA_VERSION ) { QString newname = QString( "%1.v%2" ).arg( dbname ).arg( version ); qDebug() << endl << "****************************" << endl; @@ -87,7 +87,8 @@ DatabaseImpl::DatabaseImpl( const QString& dbname, Database* parent ) throw "failed to open db"; // TODO } - schemaUpdated = updateSchema( 0 ); + if ( version < 0 ) + schemaUpdated = updateSchema( 0 ); } TomahawkSqlQuery query = newquery();