From 7c279d779b32eb61987fc7d4f1143a1eaa1a1bde Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 7 Jul 2016 12:36:33 +0200 Subject: QWindowsTabletSupport: fix new[]/delete mismatch QScopedPointer deletes with delete, but a pointer returned from new[] needs to be deleted with delete[]. Fix by using QVarLengthArray instead of QScopedPointer(new TCHAR[]). Change-Id: I2f1f252379a9ac1ee919901b5efcec9cec31261e Reviewed-by: Friedemann Kleint --- src/plugins/platforms/windows/qwindowstabletsupport.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms') diff --git a/src/plugins/platforms/windows/qwindowstabletsupport.cpp b/src/plugins/platforms/windows/qwindowstabletsupport.cpp index 222551a86f..87f3eff409 100644 --- a/src/plugins/platforms/windows/qwindowstabletsupport.cpp +++ b/src/plugins/platforms/windows/qwindowstabletsupport.cpp @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include @@ -227,7 +227,7 @@ QString QWindowsTabletSupport::description() const const unsigned size = m_winTab32DLL.wTInfo(WTI_INTERFACE, IFC_WINTABID, 0); if (!size) return QString(); - QScopedPointer winTabId(new TCHAR[size + 1]); + QVarLengthArray winTabId(size + 1); m_winTab32DLL.wTInfo(WTI_INTERFACE, IFC_WINTABID, winTabId.data()); WORD implementationVersion = 0; m_winTab32DLL.wTInfo(WTI_INTERFACE, IFC_IMPLVERSION, &implementationVersion); -- cgit v1.2.3