qtmobility/src/multimedia/audio/qaudiodevicefactory.cpp
changeset 15 1f895d8a5b2b
parent 14 6fbed849b4f4
--- a/qtmobility/src/multimedia/audio/qaudiodevicefactory.cpp	Wed Jun 23 19:08:38 2010 +0300
+++ b/qtmobility/src/multimedia/audio/qaudiodevicefactory.cpp	Tue Jul 06 15:12:50 2010 +0300
@@ -44,7 +44,7 @@
 #include "qaudiosystem.h"
 #include "qaudiosystemplugin.h"
 
-#include <private/qfactoryloader_p.h>
+#include "qaudiopluginloader_p.h"
 #include "qaudiodevicefactory_p.h"
 
 #ifndef QT_NO_AUDIO_BACKEND
@@ -70,7 +70,7 @@
 QT_BEGIN_NAMESPACE
 
 #if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
-Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
+Q_GLOBAL_STATIC_WITH_ARGS(QAudioPluginLoader, audioLoader,
         (QAudioSystemFactoryInterface_iid, QLatin1String("/audio"), Qt::CaseInsensitive))
 #endif
 
@@ -146,9 +146,8 @@
 #endif
 
 #if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
-    QFactoryLoader* l = loader();
-
-    foreach (QString const& key, l->keys()) {
+    QAudioPluginLoader* l = audioLoader();
+    foreach (const QString& key, l->keys()) {
         QAudioSystemFactoryInterface* plugin = qobject_cast<QAudioSystemFactoryInterface*>(l->instance(key));
         if (plugin) {
             foreach (QByteArray const& handle, plugin->availableDevices(mode))
@@ -165,7 +164,7 @@
 QAudioDeviceInfo QAudioDeviceFactory::defaultInputDevice()
 {
 #if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
-    QAudioSystemFactoryInterface* plugin = qobject_cast<QAudioSystemFactoryInterface*>(loader()->instance(QLatin1String("default")));
+    QAudioSystemFactoryInterface* plugin = qobject_cast<QAudioSystemFactoryInterface*>(audioLoader()->instance(QLatin1String("default")));
 
     if (plugin) {
         QList<QByteArray> list = plugin->availableDevices(QAudio::AudioInput);
@@ -185,7 +184,7 @@
 QAudioDeviceInfo QAudioDeviceFactory::defaultOutputDevice()
 {
 #if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
-    QAudioSystemFactoryInterface* plugin = qobject_cast<QAudioSystemFactoryInterface*>(loader()->instance(QLatin1String("default")));
+    QAudioSystemFactoryInterface* plugin = qobject_cast<QAudioSystemFactoryInterface*>(audioLoader()->instance(QLatin1String("default")));
 
     if (plugin) {
         QList<QByteArray> list = plugin->availableDevices(QAudio::AudioOutput);
@@ -215,7 +214,7 @@
 
 #if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
     QAudioSystemFactoryInterface* plugin =
-        qobject_cast<QAudioSystemFactoryInterface*>(loader()->instance(realm));
+        qobject_cast<QAudioSystemFactoryInterface*>(audioLoader()->instance(realm));
 
     if (plugin)
         rc = plugin->createDeviceInfo(handle, mode);
@@ -249,7 +248,7 @@
 #endif
 #if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
     QAudioSystemFactoryInterface* plugin =
-        qobject_cast<QAudioSystemFactoryInterface*>(loader()->instance(deviceInfo.realm()));
+        qobject_cast<QAudioSystemFactoryInterface*>(audioLoader()->instance(deviceInfo.realm()));
 
     if (plugin) {
         QAbstractAudioInput* p = plugin->createInput(deviceInfo.handle());
@@ -277,7 +276,7 @@
 
 #if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
     QAudioSystemFactoryInterface* plugin =
-        qobject_cast<QAudioSystemFactoryInterface*>(loader()->instance(deviceInfo.realm()));
+        qobject_cast<QAudioSystemFactoryInterface*>(audioLoader()->instance(deviceInfo.realm()));
 
     if (plugin) {
         QAbstractAudioOutput* p = plugin->createOutput(deviceInfo.handle());