qwindowsdirect2dintegration.cpp: replace QVector with QVarLengthArray

QVector was used as just RAII for local array. It's inefficient usage
of CoW type. So use QVarLengthArray instead.

Change-Id: I494ecc49af9049569a65e258581137bad3ce7dc7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
Anton Kudryavtsev 2016-10-19 12:59:18 +03:00 committed by Anton Kudryavtsev
parent bdcc9d4e73
commit 26ac91c832

View File

@ -52,6 +52,8 @@
#include <QtGui/qpa/qwindowsysteminterface.h>
#include <QtEventDispatcherSupport/private/qwindowsguieventdispatcher_p.h>
#include <QVarLengthArray>
QT_BEGIN_NAMESPACE
class QWindowsDirect2DEventDispatcher : public QWindowsGuiEventDispatcher
@ -106,7 +108,7 @@ public:
if (_tcscat_s(filename, bufSize, __TEXT("\\d2d1.dll")) == 0) {
DWORD versionInfoSize = GetFileVersionInfoSize(filename, NULL);
if (versionInfoSize) {
QVector<BYTE> info(versionInfoSize);
QVarLengthArray<BYTE> info(versionInfoSize);
if (GetFileVersionInfo(filename, NULL, versionInfoSize, info.data())) {
UINT size;
DWORD *fi;