no-thread: add QProcess config check
Disable QGraphicsFrameCapture for the no-thread (and no-process) configuration. Change-Id: I7767098efff78338a763ff192512d484cd300c1d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>bb10
parent
3fc1951f41
commit
13bb9fcdae
|
|
@ -27,7 +27,7 @@ QGraphicsFrameCaptureMetal::QGraphicsFrameCaptureMetal()
|
|||
|
||||
QGraphicsFrameCaptureMetal::~QGraphicsFrameCaptureMetal()
|
||||
{
|
||||
#ifdef Q_OS_MACOS
|
||||
#if defined(Q_OS_MACOS) && QT_CONFIG(process)
|
||||
if (m_process) {
|
||||
m_process->terminate();
|
||||
delete m_process;
|
||||
|
|
@ -131,7 +131,10 @@ bool QGraphicsFrameCaptureMetal::isCapturing() const
|
|||
|
||||
void QGraphicsFrameCaptureMetal::openCapture()
|
||||
{
|
||||
#ifdef Q_OS_MACOS
|
||||
#if defined(Q_OS_MACOS)
|
||||
#if !QT_CONFIG(process)
|
||||
qFatal("QGraphicsFrameCapture requires QProcess on macOS");
|
||||
#else
|
||||
if (!initialized()) {
|
||||
qCWarning(lcGraphicsFrameCapture) << "Capturing on Metal was not initialized. Can not open XCode with a valid capture.";
|
||||
return;
|
||||
|
|
@ -148,6 +151,7 @@ void QGraphicsFrameCaptureMetal::openCapture()
|
|||
m_process->kill();
|
||||
m_process->start();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void QGraphicsFrameCaptureMetal::updateCaptureFileName()
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public:
|
|||
|
||||
private:
|
||||
void updateCaptureFileName();
|
||||
#ifdef Q_OS_MACOS
|
||||
#if defined(Q_OS_MACOS) && QT_CONFIG(process)
|
||||
QProcess *m_process = nullptr;
|
||||
#endif
|
||||
MTLCaptureManager *m_captureManager = nullptr;
|
||||
|
|
|
|||
Loading…
Reference in New Issue