diff options
author | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2011-01-19 18:31:38 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2011-01-20 10:35:20 (GMT) |
commit | 659d463b8f3b6d46e3760de3b6828fe11fb96912 (patch) | |
tree | c3e156d448abfc8031c76215d07fca0d636bb57c | |
parent | fa9363b60c38e2a80d738bd0d95f5795b7a19119 (diff) | |
download | Qt-659d463b8f3b6d46e3760de3b6828fe11fb96912.zip Qt-659d463b8f3b6d46e3760de3b6828fe11fb96912.tar.gz Qt-659d463b8f3b6d46e3760de3b6828fe11fb96912.tar.bz2 |
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)
-rw-r--r-- | src/3rdparty/phonon/phonon/factory.cpp | 18 |
1 files 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(); |