1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 07:18:08 +00:00

Replace deprecated function on macOS

Closes #8993.
This commit is contained in:
Chocobo1 2018-06-09 13:47:28 +08:00
parent da87c2d9ae
commit 0073f2c8ab
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C

View File

@ -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