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 <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
f8dc769655
commit
7c279d779b
@ -47,7 +47,7 @@
|
||||
#include <QtGui/QGuiApplication>
|
||||
#include <QtGui/QWindow>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QScopedArrayPointer>
|
||||
#include <QtCore/QVarLengthArray>
|
||||
#include <QtCore/QtMath>
|
||||
|
||||
#include <private/qguiapplication_p.h>
|
||||
@ -227,7 +227,7 @@ QString QWindowsTabletSupport::description() const
|
||||
const unsigned size = m_winTab32DLL.wTInfo(WTI_INTERFACE, IFC_WINTABID, 0);
|
||||
if (!size)
|
||||
return QString();
|
||||
QScopedPointer<TCHAR> winTabId(new TCHAR[size + 1]);
|
||||
QVarLengthArray<TCHAR> winTabId(size + 1);
|
||||
m_winTab32DLL.wTInfo(WTI_INTERFACE, IFC_WINTABID, winTabId.data());
|
||||
WORD implementationVersion = 0;
|
||||
m_winTab32DLL.wTInfo(WTI_INTERFACE, IFC_IMPLVERSION, &implementationVersion);
|
||||
|
Loading…
Reference in New Issue
Block a user