$OpenBSD: patch-src_mkvtoolnix-gui_jobs_program_runner_unix_program_runner_cpp,v 1.1 2018/08/18 06:47:58 rsadowski Exp $

Index: src/mkvtoolnix-gui/jobs/program_runner/unix_program_runner.cpp
--- src/mkvtoolnix-gui/jobs/program_runner/unix_program_runner.cpp.orig
+++ src/mkvtoolnix-gui/jobs/program_runner/unix_program_runner.cpp
@@ -1,26 +1,26 @@
 #include "common/common_pch.h"
 
-#if defined(SYS_LINUX)
+#if defined(SYS_LINUX) || defined(SYS_BSD)
 
 #include <QDebug>
 #include <QProcess>
 
 #include "common/list_utils.h"
 #include "common/qt.h"
-#include "mkvtoolnix-gui/jobs/program_runner/linux_program_runner.h"
+#include "mkvtoolnix-gui/jobs/program_runner/unix_program_runner.h"
 
 namespace mtx { namespace gui { namespace Jobs {
 
-LinuxProgramRunner::LinuxProgramRunner()
+UnixProgramRunner::UnixProgramRunner()
   : ProgramRunner{}
 {
 }
 
-LinuxProgramRunner::~LinuxProgramRunner() {
+UnixProgramRunner::~UnixProgramRunner() {
 }
 
 bool
-LinuxProgramRunner::isRunProgramTypeSupported(Util::Settings::RunProgramType type) {
+UnixProgramRunner::isRunProgramTypeSupported(Util::Settings::RunProgramType type) {
   if (ProgramRunner::isRunProgramTypeSupported(type))
     return true;
 
@@ -28,35 +28,35 @@ LinuxProgramRunner::isRunProgramTypeSupported(Util::Se
 }
 
 void
-LinuxProgramRunner::shutDownComputer(Util::Settings::RunProgramConfig &) {
-  qDebug() << "LinuxProgramRunner::shutDownComputer: about to shut down the computer via systemctl";
+UnixProgramRunner::shutDownComputer(Util::Settings::RunProgramConfig &) {
+  qDebug() << "UnixProgramRunner::shutDownComputer: about to shut down the computer via systemctl";
 
   auto result = QProcess::execute("systemctl poweroff");
 
   if (result == 0)
     return;
 
-  qDebug() << "LinuxProgramRunner::shutDownComputer: 'systemctl poweroff' failed:" << result;
+  qDebug() << "UnixProgramRunner::shutDownComputer: 'systemctl poweroff' failed:" << result;
 }
 
 void
-LinuxProgramRunner::hibernateOrSleepComputer(bool hibernate) {
+UnixProgramRunner::hibernateOrSleepComputer(bool hibernate) {
   auto action = Q(hibernate ? "hibernate" : "suspend");
-  qDebug() << "LinuxProgramRunner::hibernateOrSleepComputer: about to" << action << "the computer via systemctl";
+  qDebug() << "UnixProgramRunner::hibernateOrSleepComputer: about to" << action << "the computer via systemctl";
 
   auto result = QProcess::execute(Q("systemctl %1").arg(action));
 
   if (result != 0)
-    qDebug() << "LinuxProgramRunner::hibernateOrSleepComputer: 'systemctl" << action << "' failed:" << result;
+    qDebug() << "UnixProgramRunner::hibernateOrSleepComputer: 'systemctl" << action << "' failed:" << result;
 }
 
 void
-LinuxProgramRunner::hibernateComputer(Util::Settings::RunProgramConfig &) {
+UnixProgramRunner::hibernateComputer(Util::Settings::RunProgramConfig &) {
   hibernateOrSleepComputer(true);
 }
 
 void
-LinuxProgramRunner::sleepComputer(Util::Settings::RunProgramConfig &) {
+UnixProgramRunner::sleepComputer(Util::Settings::RunProgramConfig &) {
   hibernateOrSleepComputer(false);
 }
 
