QGraphicsFrameCaptureMetal: silence deprecation warnings

StringBuilder has deprecated support for char[], using wide string will
also avoid run-time unicode conversions.

Change-Id: Iff865463fb255acfa55224393807ece9ecb818b4
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
(cherry picked from commit d86224250322550169dd72bb04987a73aca74e69)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Tim Blechmann 2024-10-02 16:46:35 +08:00 committed by Qt Cherry-pick Bot
parent 3946e7af6f
commit d12327bc3c

View File

@ -157,7 +157,9 @@ void QGraphicsFrameCaptureMetal::openCapture()
void QGraphicsFrameCaptureMetal::updateCaptureFileName() void QGraphicsFrameCaptureMetal::updateCaptureFileName()
{ {
m_traceURL = QUrl::fromLocalFile(m_capturePath + "/" + m_capturePrefix + "_" + QString::number(frameNumber) + ".gputrace").toNSURL(); m_traceURL = QUrl::fromLocalFile(m_capturePath + u"/" + m_capturePrefix + u"_"
+ QString::number(frameNumber) + u".gputrace")
.toNSURL();
// We need to remove the trace file if it already existed else MTLCaptureManager // We need to remove the trace file if it already existed else MTLCaptureManager
// will fail to. // will fail to.
if ([NSFileManager.defaultManager fileExistsAtPath:m_traceURL.path]) if ([NSFileManager.defaultManager fileExistsAtPath:m_traceURL.path])