diff options
Diffstat (limited to 'src/corelib/global/qlogging.cpp')
| -rw-r--r-- | src/corelib/global/qlogging.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 97c7e70e386..26d50af3a30 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -1938,7 +1938,7 @@ static void win_outputDebugString_helper(const QString &message) if (message.length() <= maxOutputStringLength) { OutputDebugString(reinterpret_cast<const wchar_t *>(message.utf16())); } else { - wchar_t *messagePart = new wchar_t[maxOutputStringLength + 1]; + wchar_t messagePart[maxOutputStringLength + 1]; for (qsizetype i = 0; i < message.length(); i += maxOutputStringLength) { const qsizetype length = qMin(message.length() - i, maxOutputStringLength); const qsizetype len = QStringView{message}.mid(i, length).toWCharArray(messagePart); @@ -1946,7 +1946,6 @@ static void win_outputDebugString_helper(const QString &message) messagePart[len] = 0; OutputDebugString(messagePart); } - delete[] messagePart; } } |
