From 659d463b8f3b6d46e3760de3b6828fe11fb96912 Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Wed, 19 Jan 2011 18:31:38 +0000 Subject: Switch default Phonon backend on Symbian from Helix to MMF If both plugins are present on a device, the MMF backend is now loaded by default. Task-number: QT-4472 Reviewed-by: Justin McPherson (cherry picked from commit 808de6fd2f9835c28986b86de829579196b6163d) --- src/3rdparty/phonon/phonon/factory.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/3rdparty/phonon/phonon/factory.cpp b/src/3rdparty/phonon/phonon/factory.cpp index 2785dff..b5e565b 100644 --- a/src/3rdparty/phonon/phonon/factory.cpp +++ b/src/3rdparty/phonon/phonon/factory.cpp @@ -137,21 +137,15 @@ bool FactoryPrivate::createBackend() QStringList plugins(dir.entryList(QDir::Files)); #ifdef Q_OS_SYMBIAN - /* On Symbian OS we might have two plugins, one which uses Symbian - * MMF framework("mmf"), and one which uses Real Networks's - * Helix("hxphonon"). We prefer the latter because it's more - * sophisticated, so we make sure the Helix backend is attempted - * to be loaded first, and the MMF backend is used for backup. */ - { - const int helix = plugins.indexOf(QLatin1String("hxphonon")); - if (helix != -1) - plugins.move(helix, 0); - } + static const QString preferredPluginName = QLatin1String("phonon_mmf"); + const int preferredPluginIndex = plugins.indexOf(preferredPluginName + ".qtplugin"); + if (preferredPluginIndex != -1) + plugins.move(preferredPluginIndex, 0); #endif const QStringList files = dir.entryList(QDir::Files); - for (int i = 0; i < files.count(); ++i) { - QPluginLoader pluginLoader(libPath + files.at(i)); + for (int i = 0; i < plugins.count(); ++i) { + QPluginLoader pluginLoader(libPath + plugins.at(i)); if (!pluginLoader.load()) { pDebug() << Q_FUNC_INFO << " load failed:" << pluginLoader.errorString(); -- cgit v0.12