[Amarok] Fix database import from Amarok 1.4 for Postgres.
Seb Ruiz
ruiz at kde.org
Mon Oct 12 00:43:29 CEST 2009
2009/10/11 Mark Kretschmann <kretschmann at kde.org>:
> commit f8d604e3c9111db376337fd0b20129162ed28f51
> Author: Mark Kretschmann <kretschmann at kde.org>
> AuthorDate: Sun Oct 11 11:58:53 2009 +0200
> Commit: Mark Kretschmann <kretschmann at kde.org>
> CommitDate: Sun Oct 11 11:58:53 2009 +0200
>
> Fix database import from Amarok 1.4 for Postgres.
>
> Patch by Anderson <amg1127 at cefetrs.tche.br>. Please test :)
>
> @Seb: Do you think the patch is OK?
Yes, the patch looks good. I wonder if this helps any of those mysql
import problems.
>
> BUG: 209175
>
> diff --git a/src/databaseimporter/amarok14/FastForwardWorker.cpp b/src/databaseimporter/amarok14/FastForwardWorker.cpp
> index c0addf6..8900b38 100644
> --- a/src/databaseimporter/amarok14/FastForwardWorker.cpp
> +++ b/src/databaseimporter/amarok14/FastForwardWorker.cpp
> @@ -137,11 +137,7 @@ FastForwardWorker::run()
> "ORDER BY lastmountpoint, S.url" );
> QSqlQuery query( sql, db );
>
> - const bool queried = query.exec();
> -
> - debug() << "exec()" << queried << "active?" << query.isActive() << "size:" << query.size();
> -
> - if( !queried || query.lastError().isValid() )
> + if( query.lastError().isValid() )
> {
> QString errorMsg = i18n( "Could not execute import query: %1", db.lastError().text() );
> error() << "Error executing import query:" << errorMsg;
> @@ -150,6 +146,8 @@ FastForwardWorker::run()
> return;
> }
>
> + debug() << "active?" << query.isActive() << "size:" << query.size();
> +
> QMap<Meta::TrackPtr,QString> tracksForInsert;
>
> for( int c = 0; query.next(); c++ )
>
>
>
--
Seb Ruiz
http://www.sebruiz.net/
http://amarok.kde.org/
More information about the Amarok-devel
mailing list