mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
fix codestyle and use C++11 keywords
This commit is contained in:
parent
970525cfd4
commit
b69b50c6c6
@ -28,7 +28,7 @@ public:
|
||||
ScreenLockListener(QWidget* parent = nullptr);
|
||||
~ScreenLockListener();
|
||||
|
||||
Q_SIGNALS:
|
||||
signals:
|
||||
void screenLocked();
|
||||
|
||||
private:
|
||||
|
@ -63,25 +63,25 @@ ScreenLockListenerDBus::ScreenLockListenerDBus(QWidget *parent):
|
||||
void ScreenLockListenerDBus::gnomeSessionStatusChanged(uint status)
|
||||
{
|
||||
if (status != 0) {
|
||||
Q_EMIT screenLocked();
|
||||
emit screenLocked();
|
||||
}
|
||||
}
|
||||
|
||||
void ScreenLockListenerDBus::logindPrepareForSleep(bool beforeSleep)
|
||||
{
|
||||
if (beforeSleep) {
|
||||
Q_EMIT screenLocked();
|
||||
emit screenLocked();
|
||||
}
|
||||
}
|
||||
|
||||
void ScreenLockListenerDBus::unityLocked()
|
||||
{
|
||||
Q_EMIT screenLocked();
|
||||
emit screenLocked();
|
||||
}
|
||||
|
||||
void ScreenLockListenerDBus::freedesktopScreenSaver(bool status)
|
||||
{
|
||||
if (status) {
|
||||
Q_EMIT screenLocked();
|
||||
emit screenLocked();
|
||||
}
|
||||
}
|
@ -27,7 +27,7 @@ class ScreenLockListenerDBus : public ScreenLockListenerPrivate
|
||||
public:
|
||||
explicit ScreenLockListenerDBus(QWidget *parent = 0);
|
||||
|
||||
private Q_SLOTS:
|
||||
private slots:
|
||||
void gnomeSessionStatusChanged(uint status);
|
||||
void logindPrepareForSleep(bool beforeSleep);
|
||||
void unityLocked();
|
||||
|
@ -59,5 +59,5 @@ ScreenLockListenerMac::ScreenLockListenerMac(QWidget* parent)
|
||||
|
||||
void ScreenLockListenerMac::onSignalReception()
|
||||
{
|
||||
Q_EMIT screenLocked();
|
||||
emit screenLocked();
|
||||
}
|
||||
|
@ -36,11 +36,9 @@ ScreenLockListenerPrivate* ScreenLockListenerPrivate::instance(QWidget* parent)
|
||||
#if defined(Q_OS_OSX)
|
||||
Q_UNUSED(parent);
|
||||
return ScreenLockListenerMac::instance();
|
||||
#endif
|
||||
#if defined(Q_OS_LINUX)
|
||||
#elif defined(Q_OS_LINUX)
|
||||
return new ScreenLockListenerDBus(parent);
|
||||
#endif
|
||||
#if defined(Q_OS_WIN)
|
||||
#elif defined(Q_OS_WIN)
|
||||
return new ScreenLockListenerWin(parent);
|
||||
#endif
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ public:
|
||||
protected:
|
||||
ScreenLockListenerPrivate(QWidget* parent = 0);
|
||||
|
||||
Q_SIGNALS:
|
||||
signals:
|
||||
void screenLocked();
|
||||
};
|
||||
|
||||
|
@ -67,22 +67,22 @@ bool ScreenLockListenerWin::nativeEventFilter(const QByteArray& eventType, void*
|
||||
if (setting != nullptr && setting->PowerSetting == GUID_LIDSWITCH_STATE_CHANGE) {
|
||||
const DWORD* state = reinterpret_cast<const DWORD*>(&setting->Data);
|
||||
if (*state == 0) {
|
||||
Q_EMIT screenLocked();
|
||||
emit screenLocked();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} else if (m->wParam == PBT_APMSUSPEND) {
|
||||
Q_EMIT screenLocked();
|
||||
emit screenLocked();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (m->message == WM_WTSSESSION_CHANGE) {
|
||||
if (m->wParam == WTS_CONSOLE_DISCONNECT) {
|
||||
Q_EMIT screenLocked();
|
||||
emit screenLocked();
|
||||
return true;
|
||||
}
|
||||
if (m->wParam == WTS_SESSION_LOCK) {
|
||||
Q_EMIT screenLocked();
|
||||
emit screenLocked();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user