mirror of
https://github.com/c0re100/qBittorrent-Enhanced-Edition.git
synced 2025-01-09 04:18:39 +08:00
Merge pull request #9073 from Chocobo1/apple
Replace deprecated function on macOS
This commit is contained in:
commit
4100282673
@ -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…
Reference in New Issue
Block a user