Skip to content

Commit

Permalink
QGraphicsFrameCaptureMetal: silence deprecation warnings
Browse files Browse the repository at this point in the history
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 d862242)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
  • Loading branch information
timblechmann authored and Qt Cherry-pick Bot committed Oct 9, 2024
1 parent 3946e7a commit d12327b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gui/util/qgraphicsframecapturemetal.mm
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@

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
// will fail to.
if ([NSFileManager.defaultManager fileExistsAtPath:m_traceURL.path])
Expand Down

0 comments on commit d12327b

Please sign in to comment.