summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qlocale_win.cpp
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@digia.com>2014-05-23 17:16:54 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-06-03 09:55:30 +0200
commit6b9a9a01e289381ea915ac43595c6c5da0db73b4 (patch)
tree68f460051ea2e42af8b5d6c7331ad5218cc1e68c /src/corelib/tools/qlocale_win.cpp
parent69e2d3b3e96bb1fa553acb5cd867267d1596c314 (diff)
remove HSTRING instances
HSTRING needs to be released or handles will be leaked. Instead use HString which takes care of resource management on its own. Task-Number: QTBUG-38115 Change-Id: I2c767776c1f22f45acd8dd77b693f30d63d894b9 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Diffstat (limited to 'src/corelib/tools/qlocale_win.cpp')
-rw-r--r--src/corelib/tools/qlocale_win.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/tools/qlocale_win.cpp b/src/corelib/tools/qlocale_win.cpp
index 1690dd83ee..4c44016fdf 100644
--- a/src/corelib/tools/qlocale_win.cpp
+++ b/src/corelib/tools/qlocale_win.cpp
@@ -663,10 +663,10 @@ QVariant QSystemLocalePrivate::uiLanguages()
unsigned int size;
languageList->get_Size(&size);
for (unsigned int i = 0; i < size; ++i) {
- HSTRING language;
- languageList->GetAt(i, &language);
+ HString language;
+ languageList->GetAt(i, language.GetAddressOf());
UINT32 length;
- PCWSTR rawString = WindowsGetStringRawBuffer(language, &length);
+ PCWSTR rawString = language.GetRawBuffer(&length);
result << QString::fromWCharArray(rawString, length);
}
#else // !Q_OS_WINPHONE