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.

Pick-to: 6.8
Change-Id: Iff865463fb255acfa55224393807ece9ecb818b4
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
  • Loading branch information
timblechmann committed Oct 8, 2024
1 parent 9b481a7 commit d862242
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 d862242

Please sign in to comment.