mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-03 06:02:29 -06:00
Coding style clean up
This commit is contained in:
@@ -56,13 +56,13 @@ PowerManagement::~PowerManagement()
|
||||
|
||||
void PowerManagement::setActivityState(bool busy)
|
||||
{
|
||||
if(busy) setBusy();
|
||||
if (busy) setBusy();
|
||||
else setIdle();
|
||||
}
|
||||
|
||||
void PowerManagement::setBusy()
|
||||
{
|
||||
if(m_busy) return;
|
||||
if (m_busy) return;
|
||||
m_busy = true;
|
||||
|
||||
#ifdef Q_WS_WIN
|
||||
@@ -71,13 +71,13 @@ void PowerManagement::setBusy()
|
||||
m_inhibitor->RequestBusy();
|
||||
#elif defined(Q_WS_MAC)
|
||||
IOReturn success = IOPMAssertionCreate(kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn, &m_assertionID);
|
||||
if(success != kIOReturnSuccess) m_busy = false;
|
||||
if (success != kIOReturnSuccess) m_busy = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void PowerManagement::setIdle()
|
||||
{
|
||||
if(!m_busy) return;
|
||||
if (!m_busy) return;
|
||||
m_busy = false;
|
||||
|
||||
#ifdef Q_WS_WIN
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
PowerManagementInhibitor::PowerManagementInhibitor(QObject *parent) : QObject(parent)
|
||||
{
|
||||
if(!QDBusConnection::sessionBus().isConnected())
|
||||
if (!QDBusConnection::sessionBus().isConnected())
|
||||
{
|
||||
qDebug("D-Bus: Could not connect to session bus");
|
||||
m_state = error;
|
||||
@@ -134,7 +134,7 @@ void PowerManagementInhibitor::OnAsyncReply(QDBusPendingCallWatcher *call)
|
||||
{
|
||||
QDBusPendingReply<> reply = *call;
|
||||
|
||||
if(reply.isError())
|
||||
if (reply.isError())
|
||||
{
|
||||
qDebug("D-Bus: Reply: Error: %s", qPrintable(reply.error().message()));
|
||||
m_state = error;
|
||||
@@ -150,7 +150,7 @@ void PowerManagementInhibitor::OnAsyncReply(QDBusPendingCallWatcher *call)
|
||||
{
|
||||
QDBusPendingReply<uint> reply = *call;
|
||||
|
||||
if(reply.isError())
|
||||
if (reply.isError())
|
||||
{
|
||||
qDebug("D-Bus: Reply: Error: %s", qPrintable(reply.error().message()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user