[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: Re: [Amarok] Fix regression for exclusive users of QDesktopServ
From: Maximilian Kossick <maximilian.kossick () googlemail ! com>
Date: 2010-01-16 9:22:52
Message-ID: c3d78d91001160122n1bb575b9ie2cfc7d377bb7a5b () mail ! gmail ! com
[Download RAW message or body]
It's still broken. Use MusicLocation is not actually written to amarokrc.
On Fri, Jan 15, 2010 at 11:03 PM, Rick W. Chen <stuffcorpse@archlinux.us> wrote:
> commit 7a5449127bfc0f8c47d8e3dae038bad7b4957af0
> Author: Rick W. Chen <stuffcorpse@archlinux.us>
> AuthorDate: Sat Jan 16 10:58:38 2010 +1300
> Commit: Rick W. Chen <stuffcorpse@archlinux.us>
> CommitDate: Sat Jan 16 10:58:38 2010 +1300
>
> Fix regression for exclusive users of QDesktopServices::MusicLocation
>
> "the commit e969888134b686 breaks if an existing amarok user never used
> anything but the MusicLocation" -- maxx_k.
>
> diff --git a/src/App.cpp b/src/App.cpp
> index fb1e0ff..586d80f 100644
> --- a/src/App.cpp
> +++ b/src/App.cpp
> @@ -793,11 +793,14 @@ App::continueInit()
> );
> }
>
> + KConfigGroup folderConf = Amarok::config( "Collection Folders" );
> + bool useMusicLocation( false );
> switch( result )
> {
> case KMessageBox::Yes:
> MountPointManager::instance()->setCollectionFolders( QStringList() << musicDir );
> CollectionManager::instance()->startFullScan();
> + useMusicLocation = true;
> break;
>
> case KMessageBox::No:
> @@ -807,6 +810,7 @@ App::continueInit()
> default:
> break;
> }
> + folderConf.writeEntry( "Use MusicLocation", useMusicLocation );
> config.writeEntry( "First Run", false );
> }
> }
> diff --git a/src/MountPointManager.cpp b/src/MountPointManager.cpp
> index 021d178..b46539d 100644
> --- a/src/MountPointManager.cpp
> +++ b/src/MountPointManager.cpp
> @@ -365,6 +365,20 @@ MountPointManager::collectionFolders()
> result.append( absPath );
> }
> }
> +
> + // For users who were using QDesktopServices::MusicLocation exclusively up
> + // to v2.2.2, which did not store the location into config.
> + if( result.isEmpty() && folders.readEntry( "Use MusicLocation", false ) )
> + {
> + const KUrl musicUrl = QDesktopServices::storageLocation( QDesktopServices::MusicLocation );
> + const QString musicDir = musicUrl.toLocalFile( KUrl::RemoveTrailingSlash );
> + const QDir dir( musicDir );
> + if( dir.exists() && dir.isReadable() )
> + {
> + result << musicDir;
> + setCollectionFolders( result );
> + }
> + }
> return result;
> }
>
>
>
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic