Replace deprecated macro

Q_OS_MAC is deprecated and the replacement is Q_OS_MACOS.
This commit is contained in:
Chocobo1
2019-09-05 20:11:33 +08:00
parent ef8b37f7fa
commit 0d5b0b9542
37 changed files with 159 additions and 159 deletions

View File

@@ -30,11 +30,11 @@
#include <QtGlobal>
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC)) && defined(QT_DBUS_LIB)
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)) && defined(QT_DBUS_LIB)
#include "powermanagement_x11.h"
#endif
#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
#include <IOKit/pwr_mgt/IOPMLib.h>
#endif
@@ -46,7 +46,7 @@ PowerManagement::PowerManagement(QObject *parent)
: QObject(parent)
, m_busy(false)
{
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC)) && defined(QT_DBUS_LIB)
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)) && defined(QT_DBUS_LIB)
m_inhibitor = new PowerManagementInhibitor(this);
#endif
}
@@ -70,9 +70,9 @@ void PowerManagement::setBusy()
#ifdef Q_OS_WIN
SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED);
#elif (defined(Q_OS_UNIX) && !defined(Q_OS_MAC)) && defined(QT_DBUS_LIB)
#elif (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)) && defined(QT_DBUS_LIB)
m_inhibitor->requestBusy();
#elif defined(Q_OS_MAC)
#elif defined(Q_OS_MACOS)
IOReturn success = IOPMAssertionCreateWithName(kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn
, tr("qBittorrent is active").toCFString(), &m_assertionID);
if (success != kIOReturnSuccess)
@@ -87,9 +87,9 @@ void PowerManagement::setIdle()
#ifdef Q_OS_WIN
SetThreadExecutionState(ES_CONTINUOUS);
#elif (defined(Q_OS_UNIX) && !defined(Q_OS_MAC)) && defined(QT_DBUS_LIB)
#elif (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)) && defined(QT_DBUS_LIB)
m_inhibitor->requestIdle();
#elif defined(Q_OS_MAC)
#elif defined(Q_OS_MACOS)
IOPMAssertionRelease(m_assertionID);
#endif
}