[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: extragear/multimedia/amarok/src/databaseimporter/amarok14
From:       "Seb Ruiz" <ruiz () kde ! org>
Date:       2008-12-13 19:41:42
Message-ID: 60ebdd0b0812131129o39c93e84if28c25b9dd70b59f () mail ! gmail ! com
[Download RAW message or body]

On 13/12/2008, Mark Kretschmann <kretschmann@kde.org> wrote:
> SVN commit 896162 by markey:
> 
> New patch from Erik Hovland that attempts to fix the Amarok 1.4 collection
> importer.
> 
> Please test!
> 
> CCBUG: 174269
> 
> M  +18 -1     FastForwardImporterConfig.cpp
> M  +8 -3      FastForwardWorker.cpp
> 
> 
> --- trunk/extragear/multimedia/amarok/src/databaseimporter/amarok14/FastForwardImporterConfig.cpp \
> #896161:896162 @@ -93,7 +93,24 @@
> FastForwardImporterConfig::connectionType() const
> {
> const int index = m_connectionCombo->currentIndex();
> -    return (FastForwardImporter::ConnectionType) m_connectionCombo->itemData( \
> index ).toInt(); +    bool isOK = true;
> +    int connType = FastForwardImporter::SQLite;
> +    if ( index == -1 )
> +        return FastForwardImporter::ConnectionType( connType );
> +
> +    QVariant itemData = m_connectionCombo->itemData( index );
> +    if ( itemData == QVariant::Invalid )
> +        return FastForwardImporter::ConnectionType( connType );
> +
> +    connType = itemData.toInt( &isOK );
> +    if ( !isOK ||
> +         ( connType < FastForwardImporter::SQLite ||
> +           connType > FastForwardImporter::PostgreSQL ) )
> +    {
> +        connType = FastForwardImporter::SQLite;
> +    }


Sorry, I can't fathom how this now works for PSQL database backends.
It will totally fail for psql setups that have non local hosts or non
standard ports, and will most likely try to set the database driver to
sqlite instead of the requested psql.

Can you please explain the rationale behind this patch?

Thanks.


-- 
Seb Ruiz

http://www.sebruiz.net/
http://amarok.kde.org/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic