summaryrefslogtreecommitdiffstats
path: root/src/network/kernel/qnetworkinterface_winrt.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/network/kernel/qnetworkinterface_winrt.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/network/kernel/qnetworkinterface_winrt.cpp')
-rw-r--r--src/network/kernel/qnetworkinterface_winrt.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/network/kernel/qnetworkinterface_winrt.cpp b/src/network/kernel/qnetworkinterface_winrt.cpp
index 6a814c85d4..48a96928a8 100644
--- a/src/network/kernel/qnetworkinterface_winrt.cpp
+++ b/src/network/kernel/qnetworkinterface_winrt.cpp
@@ -114,11 +114,11 @@ static QList<QNetworkInterfacePrivate *> interfaceListing()
|| (type == HostNameType_Ipv6 && hostInfo.prefixLength > 128))
continue;
- HSTRING name;
- hostName->get_CanonicalName(&name);
+ HString name;
+ hostName->get_CanonicalName(name.GetAddressOf());
hostName->Release();
UINT32 length;
- PCWSTR rawString = WindowsGetStringRawBuffer(name, &length);
+ PCWSTR rawString = name.GetRawBuffer(&length);
hostInfo.address = QString::fromWCharArray(rawString, length);
hostList << hostInfo;