summaryrefslogtreecommitdiffstats
path: root/src/multimedia
diff options
context:
space:
mode:
Diffstat (limited to 'src/multimedia')
-rw-r--r--src/multimedia/base/qmediaserviceprovider.cpp14
-rw-r--r--src/multimedia/qml/qsoundeffect_qsound_p.cpp2
-rw-r--r--src/multimedia/qml/wavedecoder_p.cpp2
3 files changed, 11 insertions, 7 deletions
diff --git a/src/multimedia/base/qmediaserviceprovider.cpp b/src/multimedia/base/qmediaserviceprovider.cpp
index eb6505c..d51d682 100644
--- a/src/multimedia/base/qmediaserviceprovider.cpp
+++ b/src/multimedia/base/qmediaserviceprovider.cpp
@@ -268,7 +268,7 @@ class QPluginServiceProvider : public QMediaServiceProvider
public:
QMediaService* requestService(const QByteArray &type, const QMediaServiceProviderHint &hint)
{
- QString key(type);
+ QString key(QString::fromLatin1(type.constData(),type.length()));
QList<QMediaServiceProviderPlugin *>plugins;
foreach (QObject *obj, loader()->instances(key)) {
@@ -383,7 +383,8 @@ public:
const QStringList& codecs,
int flags) const
{
- QList<QObject*> instances = loader()->instances(serviceType);
+ QList<QObject*> instances = loader()->instances(
+ QString::fromLatin1(serviceType.constData(),serviceType.length()));
if (instances.isEmpty())
return QtMultimedia::NotSupported;
@@ -424,7 +425,8 @@ public:
QStringList supportedMimeTypes(const QByteArray &serviceType, int flags) const
{
- QList<QObject*> instances = loader()->instances(serviceType);
+ QList<QObject*> instances = loader()->instances(
+ QString::fromLatin1(serviceType.constData(),serviceType.length()));
QStringList supportedTypes;
@@ -457,7 +459,8 @@ public:
{
QList<QByteArray> res;
- foreach(QObject *obj, loader()->instances(serviceType)) {
+ foreach(QObject *obj, loader()->instances(
+ QString::fromLatin1(serviceType.constData(),serviceType.length()))) {
QMediaServiceSupportedDevicesInterface *iface =
qobject_cast<QMediaServiceSupportedDevicesInterface*>(obj);
@@ -471,7 +474,8 @@ public:
QString deviceDescription(const QByteArray &serviceType, const QByteArray &device)
{
- foreach(QObject *obj, loader()->instances(serviceType)) {
+ foreach(QObject *obj, loader()->instances(
+ QString::fromLatin1(serviceType.constData(),serviceType.length()))) {
QMediaServiceSupportedDevicesInterface *iface =
qobject_cast<QMediaServiceSupportedDevicesInterface*>(obj);
diff --git a/src/multimedia/qml/qsoundeffect_qsound_p.cpp b/src/multimedia/qml/qsoundeffect_qsound_p.cpp
index 0292d26..df160a9 100644
--- a/src/multimedia/qml/qsoundeffect_qsound_p.cpp
+++ b/src/multimedia/qml/qsoundeffect_qsound_p.cpp
@@ -157,7 +157,7 @@ void QSoundEffectPrivate::setMedia(const QMediaContent &media)
{
m_queued = false;
- if (media.isNull() || media.canonicalUrl().scheme() != "file") {
+ if (media.isNull() || media.canonicalUrl().scheme() != QLatin1String("file")) {
m_media = QMediaContent();
return;
}
diff --git a/src/multimedia/qml/wavedecoder_p.cpp b/src/multimedia/qml/wavedecoder_p.cpp
index b7d6101..f2277ae 100644
--- a/src/multimedia/qml/wavedecoder_p.cpp
+++ b/src/multimedia/qml/wavedecoder_p.cpp
@@ -122,7 +122,7 @@ void WaveDecoder::handleData()
else {
int bps = qFromLittleEndian<quint16>(header.wave.bitsPerSample);
- format.setCodec("audio/pcm");
+ format.setCodec(QLatin1String("audio/pcm"));
format.setSampleType(bps == 8 ? QAudioFormat::UnSignedInt : QAudioFormat::SignedInt);
format.setByteOrder(QAudioFormat::LittleEndian);
format.setFrequency(qFromLittleEndian<quint32>(header.wave.sampleRate));