summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-08-21 14:33:56 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-08-21 14:56:04 (GMT)
commit46b19b8aae5b7004bd9272fc4606ffad1038d6ac (patch)
tree6d450470442d4a724c4cf8f8ecee411f5700b273
parent8bee3c3710a0133b26f8a681f5af23f4679200b0 (diff)
downloadQt-46b19b8aae5b7004bd9272fc4606ffad1038d6ac.zip
Qt-46b19b8aae5b7004bd9272fc4606ffad1038d6ac.tar.gz
Qt-46b19b8aae5b7004bd9272fc4606ffad1038d6ac.tar.bz2
Phonon compile fix for mingw
-rw-r--r--src/3rdparty/phonon/ds9/backend.cpp6
-rw-r--r--src/3rdparty/phonon/ds9/effect.cpp4
-rw-r--r--src/3rdparty/phonon/ds9/mediagraph.cpp10
-rw-r--r--src/3rdparty/phonon/ds9/mediaobject.cpp2
-rw-r--r--src/3rdparty/phonon/ds9/qbasefilter.cpp2
5 files changed, 12 insertions, 12 deletions
diff --git a/src/3rdparty/phonon/ds9/backend.cpp b/src/3rdparty/phonon/ds9/backend.cpp
index 2c56af7..6007020 100644
--- a/src/3rdparty/phonon/ds9/backend.cpp
+++ b/src/3rdparty/phonon/ds9/backend.cpp
@@ -157,7 +157,7 @@ namespace Phonon
while (S_OK == enumMon->Next(1, mon.pparam(), 0)) {
LPOLESTR str = 0;
mon->GetDisplayName(0,0,&str);
- const QString name = QString::fromUtf16((unsigned short*)str);
+ const QString name = QString::fromWCharArray(str);
ComPointer<IMalloc> alloc;
::CoGetMalloc(1, alloc.pparam());
alloc->Free(str);
@@ -216,7 +216,7 @@ namespace Phonon
LPOLESTR str = 0;
HRESULT hr = mon->GetDisplayName(0,0, &str);
if (SUCCEEDED(hr)) {
- QString name = QString::fromUtf16((unsigned short*)str);
+ QString name = QString::fromWCharArray(str);
ComPointer<IMalloc> alloc;
::CoGetMalloc(1, alloc.pparam());
alloc->Free(str);
@@ -231,7 +231,7 @@ namespace Phonon
WCHAR name[80]; // 80 is clearly stated in the MSDN doc
HRESULT hr = ::DMOGetName(m_audioEffects[index], name);
if (SUCCEEDED(hr)) {
- ret["name"] = QString::fromUtf16((unsigned short*)name);
+ ret["name"] = QString::fromWCharArray(name);
}
}
break;
diff --git a/src/3rdparty/phonon/ds9/effect.cpp b/src/3rdparty/phonon/ds9/effect.cpp
index 104a3c1..ebe976b 100644
--- a/src/3rdparty/phonon/ds9/effect.cpp
+++ b/src/3rdparty/phonon/ds9/effect.cpp
@@ -82,7 +82,7 @@ namespace Phonon
current += wcslen(current) + 1; //skip the name
current += wcslen(current) + 1; //skip the unit
for(; *current; current += wcslen(current) + 1) {
- values.append( QString::fromUtf16((unsigned short*)current) );
+ values.append( QString::fromWCharArray(current) );
}
}
//FALLTHROUGH
@@ -107,7 +107,7 @@ namespace Phonon
Phonon::EffectParameter::Hints hint = info.mopCaps == MP_CAPS_CURVE_INVSQUARE ?
Phonon::EffectParameter::LogarithmicHint : Phonon::EffectParameter::Hints(0);
- const QString n = QString::fromUtf16((unsigned short*)name);
+ const QString n = QString::fromWCharArray(name);
ret.append(Phonon::EffectParameter(i, n, hint, def, min, max, values));
::CoTaskMemFree(name); //let's free the memory
}
diff --git a/src/3rdparty/phonon/ds9/mediagraph.cpp b/src/3rdparty/phonon/ds9/mediagraph.cpp
index c0cc321..a467dd7 100644
--- a/src/3rdparty/phonon/ds9/mediagraph.cpp
+++ b/src/3rdparty/phonon/ds9/mediagraph.cpp
@@ -1008,27 +1008,27 @@ namespace Phonon
BSTR str;
HRESULT hr = mediaContent->get_AuthorName(&str);
if (SUCCEEDED(hr)) {
- ret.insert(QLatin1String("ARTIST"), QString::fromUtf16((const unsigned short*)str));
+ ret.insert(QLatin1String("ARTIST"), QString::fromWCharArray(str));
SysFreeString(str);
}
hr = mediaContent->get_Title(&str);
if (SUCCEEDED(hr)) {
- ret.insert(QLatin1String("TITLE"), QString::fromUtf16((const unsigned short*)str));
+ ret.insert(QLatin1String("TITLE"), QString::fromWCharArray(str));
SysFreeString(str);
}
hr = mediaContent->get_Description(&str);
if (SUCCEEDED(hr)) {
- ret.insert(QLatin1String("DESCRIPTION"), QString::fromUtf16((const unsigned short*)str));
+ ret.insert(QLatin1String("DESCRIPTION"), QString::fromWCharArray(str));
SysFreeString(str);
}
hr = mediaContent->get_Copyright(&str);
if (SUCCEEDED(hr)) {
- ret.insert(QLatin1String("COPYRIGHT"), QString::fromUtf16((const unsigned short*)str));
+ ret.insert(QLatin1String("COPYRIGHT"), QString::fromWCharArray(str));
SysFreeString(str);
}
hr = mediaContent->get_MoreInfoText(&str);
if (SUCCEEDED(hr)) {
- ret.insert(QLatin1String("MOREINFO"), QString::fromUtf16((const unsigned short*)str));
+ ret.insert(QLatin1String("MOREINFO"), QString::fromWCharArray(str));
SysFreeString(str);
}
}
diff --git a/src/3rdparty/phonon/ds9/mediaobject.cpp b/src/3rdparty/phonon/ds9/mediaobject.cpp
index 314a7be..39fcaa0 100644
--- a/src/3rdparty/phonon/ds9/mediaobject.cpp
+++ b/src/3rdparty/phonon/ds9/mediaobject.cpp
@@ -818,7 +818,7 @@ namespace Phonon
WCHAR buffer[MAX_ERROR_TEXT_LEN];
if (getErrorText && getErrorText(hr, buffer, MAX_ERROR_TEXT_LEN)) {
- m_errorString = QString::fromUtf16(buffer);
+ m_errorString = QString::fromWCharArray(buffer);
} else {
m_errorString = QString::fromLatin1("Unknown error");
}
diff --git a/src/3rdparty/phonon/ds9/qbasefilter.cpp b/src/3rdparty/phonon/ds9/qbasefilter.cpp
index 34b7660..78b8b8f 100644
--- a/src/3rdparty/phonon/ds9/qbasefilter.cpp
+++ b/src/3rdparty/phonon/ds9/qbasefilter.cpp
@@ -358,7 +358,7 @@ namespace Phonon
{
QMutexLocker locker(&m_mutex);
m_graph = graph;
- m_name = QString::fromUtf16((const unsigned short*)name);
+ m_name = QString::fromWCharArray(name);
return S_OK;
}