Browse Source

Merge pull request #9073 from Chocobo1/apple

Replace deprecated function on macOS
adaptive-webui-19844
Mike Tzou 7 years ago committed by GitHub
parent
commit
4100282673
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/gui/powermanagement/powermanagement.cpp

3
src/gui/powermanagement/powermanagement.cpp

@ -73,7 +73,8 @@ void PowerManagement::setBusy() @@ -73,7 +73,8 @@ void PowerManagement::setBusy()
#elif (defined(Q_OS_UNIX) && !defined(Q_OS_MAC)) && defined(QT_DBUS_LIB)
m_inhibitor->requestBusy();
#elif defined(Q_OS_MAC)
IOReturn success = IOPMAssertionCreate(kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn, &m_assertionID);
IOReturn success = IOPMAssertionCreateWithName(kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn
, tr("qBittorrent is active").toCFString(), &m_assertionID);
if (success != kIOReturnSuccess)
m_busy = false;
#endif

Loading…
Cancel
Save