[amarok] src: EngineController: revive a part of Ralf's patch to fix 4 failing tests
Bart Cerneels
bart.cerneels at gmail.com
Sun Jul 15 08:50:07 UTC 2012
I've got a patch ready that removes the codec install code in Amarok.
It's since long ago been implemented in phonon.
I was holding it off till post 2.6 because you never know what it
might break non the less.
Perhaps I should push it and release a second beta just tot test?
On Sat, Jul 14, 2012 at 10:07 PM, Matěj Laitl <matej at laitl.cz> wrote:
> Git commit da92d401b629b75ad539ad84263c1745e88e2166 by Matěj Laitl.
> Committed on 14/07/2012 at 22:04.
> Pushed by laitl into branch 'master'.
>
> EngineController: revive a part of Ralf's patch to fix 4 failing tests
>
> Ralf, you were right, I know no sane way of avoiding if( logger )
> there, so un-revert that part of your patch.
>
> M +12 -4 src/EngineController.cpp
>
> http://commits.kde.org/amarok/da92d401b629b75ad539ad84263c1745e88e2166
>
> diff --git a/src/EngineController.cpp b/src/EngineController.cpp
> index 12f60af..00cff1f 100644
> --- a/src/EngineController.cpp
> +++ b/src/EngineController.cpp
> @@ -294,10 +294,18 @@ EngineController::supportedMimeTypes() //static
> {
> if ( !installDistroCodec() )
> {
> - Amarok::Components::logger()->longMessage(
> - i18n( "<p>Phonon claims it <b>cannot</b> play MP3 files. You may want to examine "
> - "the installation of the backend that phonon uses.</p>"
> - "<p>You may find useful information in the <i>FAQ</i> section of the <i>Amarok Handbook</i>.</p>" ), Amarok::Logger::Error );
> + QString text = i18n(
> + "<p>Phonon claims it <b>cannot</b> play MP3 files. You may want to examine "
> + "the installation of the backend that phonon uses.</p>"
> + "<p>You may find useful information in the <i>FAQ</i> section of the <i>Amarok Handbook</i>.</p>" );
> + // logger is not available at this point in tests; we hesitate to create
> + // logger in 4 tests just because of the next line, so check for it. We cannot
> + // use QApplication::type() != Tty because the tests are GUI-enabled
> + Logger *logger = Amarok::Components::logger();
> + if( logger )
> + logger->longMessage( text, Amarok::Logger::Error );
> + else
> + warning() << text.toLocal8Bit().constData();
> }
> mimeTable << "audio/mp3" << "audio/x-mp3";
> }
More information about the Amarok-devel
mailing list