summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-02-16 17:23:18 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-02-16 18:10:38 (GMT)
commitd590fc729e3afaedf181da58f8b685d7597040da (patch)
tree446692610d5d85733074042115118a556f39c0e3 /src/3rdparty
parente6b629f3ebc1d530218f01a735275e56bf474a18 (diff)
downloadQt-d590fc729e3afaedf181da58f8b685d7597040da.zip
Qt-d590fc729e3afaedf181da58f8b685d7597040da.tar.gz
Qt-d590fc729e3afaedf181da58f8b685d7597040da.tar.bz2
optimization: get rid of QString::fromUtf16() usage, part 2
QString::fromUtf16() is slow - it does a BOM check and optionally byte swapping, which is utterly irrelevant when converting internal data structures which are raw utf16 in host byte order. so replace it with QString::fromUnicode() where possible (which seems to be everywhere). the reasoning is the same as in commit e0fda52f, so not getting further reviews. Reviewed-by: denis Reviewed-by: joao
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/phonon/ds9/mediagraph.cpp12
-rw-r--r--src/3rdparty/phonon/waveout/mediaobject.cpp2
2 files changed, 7 insertions, 7 deletions
diff --git a/src/3rdparty/phonon/ds9/mediagraph.cpp b/src/3rdparty/phonon/ds9/mediagraph.cpp
index a467dd7..3e7a68b 100644
--- a/src/3rdparty/phonon/ds9/mediagraph.cpp
+++ b/src/3rdparty/phonon/ds9/mediagraph.cpp
@@ -379,7 +379,7 @@ namespace Phonon
FILTER_INFO info;
filter->QueryFilterInfo(&info);
#ifdef GRAPH_DEBUG
- qDebug() << "removeFilter" << QString::fromUtf16(info.achName);
+ qDebug() << "removeFilter" << QString((const QChar *)info.achName);
#endif
if (info.pGraph) {
info.pGraph->Release();
@@ -875,7 +875,7 @@ namespace Phonon
{
FILTER_INFO info;
filter->QueryFilterInfo(&info);
- qDebug() << Q_FUNC_INFO << QString::fromUtf16(info.achName);
+ qDebug() << Q_FUNC_INFO << QString((const QChar *)info.achName);
if (info.pGraph) {
info.pGraph->Release();
}
@@ -921,7 +921,7 @@ namespace Phonon
{
FILTER_INFO info;
filter->QueryFilterInfo(&info);
- qDebug() << "found a decoder filter" << QString::fromUtf16(info.achName);
+ qDebug() << "found a decoder filter" << QString((const QChar *)info.achName);
if (info.pGraph) {
info.pGraph->Release();
}
@@ -937,7 +937,7 @@ namespace Phonon
{
FILTER_INFO info;
filter->QueryFilterInfo(&info);
- qDebug() << Q_FUNC_INFO << QString::fromUtf16(info.achName);
+ qDebug() << Q_FUNC_INFO << QString((const QChar *)info.achName);
if (info.pGraph) {
info.pGraph->Release();
}
@@ -956,7 +956,7 @@ namespace Phonon
{
FILTER_INFO info;
filter->QueryFilterInfo(&info);
- qDebug() << Q_FUNC_INFO << QString::fromUtf16(info.achName);
+ qDebug() << Q_FUNC_INFO << QString((const QChar *)info.achName);
if (info.pGraph) {
info.pGraph->Release();
}
@@ -990,7 +990,7 @@ namespace Phonon
{
FILTER_INFO info;
filter->QueryFilterInfo(&info);
- qDebug() << "found a demuxer filter" << QString::fromUtf16(info.achName);
+ qDebug() << "found a demuxer filter" << QString((const QChar *)info.achName);
if (info.pGraph) {
info.pGraph->Release();
}
diff --git a/src/3rdparty/phonon/waveout/mediaobject.cpp b/src/3rdparty/phonon/waveout/mediaobject.cpp
index db71942..08af4ee 100644
--- a/src/3rdparty/phonon/waveout/mediaobject.cpp
+++ b/src/3rdparty/phonon/waveout/mediaobject.cpp
@@ -50,7 +50,7 @@ namespace Phonon
{
ushort b[256];
waveOutGetErrorText(error, (LPWSTR)b, 256);
- return QString::fromUtf16(b);
+ return QString((const QChar *)b);
}
class WorkerThread : public QThread