Skip to content

Commit

Permalink
COMP: Fix -Wdeprecated-declarations related to QProcess::pid()
Browse files Browse the repository at this point in the history
This commit fixes warnings like the following:

  /path/to/CTK/Libs/CommandLineModules/Backend/LocalProcess/ctkCmdLineModuleProcessWatcher.cpp:104:26: warning: ‘Q_PID QProcess::pid() const’ is deprecated: Use processId() instead [-Wdeprecated-declarations]
    104 |   if (::kill(process.pid(), SIGSTOP))
        |                          ^
  • Loading branch information
jcfr authored and jamesobutler committed Jun 3, 2023
1 parent 7548615 commit 2acba97
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@ void ctkCmdLineModuleProcessWatcher::pauseProcess()
if (processPaused || !futureInterface.isPaused()) return;

#ifdef Q_OS_UNIX
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
if (::kill(process.processId(), SIGSTOP))
#else
if (::kill(process.pid(), SIGSTOP))
#endif
{
// error
futureInterface.setPaused(false);
Expand All @@ -119,7 +123,11 @@ void ctkCmdLineModuleProcessWatcher::resumeProcess()
if (!processPaused) return;

#ifdef Q_OS_UNIX
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
if(::kill(process.processId(), SIGCONT))
#else
if(::kill(process.pid(), SIGCONT))
#endif
{
// error
futureInterface.setPaused(true);
Expand Down

0 comments on commit 2acba97

Please sign in to comment.