Browse Source

Replace deprecated function on macOS

Closes #8993.
adaptive-webui-19844
Chocobo1 7 years ago
parent
commit
0073f2c8ab
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  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