mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Styling + CFNotificationName -> CFStringRef
This commit is contained in:
parent
533136fb0e
commit
970525cfd4
@ -32,8 +32,9 @@ ScreenLockListenerMac* ScreenLockListenerMac::instance()
|
||||
return m_ptr;
|
||||
}
|
||||
|
||||
void ScreenLockListenerMac::notificationCenterCallBack(CFNotificationCenterRef /*center*/, void */*observer*/,
|
||||
CFNotificationName /*name*/, const void */*object*/, CFDictionaryRef /*userInfo*/)
|
||||
void ScreenLockListenerMac::notificationCenterCallBack(CFNotificationCenterRef, void*,
|
||||
CFStringRef, const void*,
|
||||
CFDictionaryRef)
|
||||
{
|
||||
instance()->onSignalReception();
|
||||
}
|
||||
@ -48,12 +49,12 @@ ScreenLockListenerMac::ScreenLockListenerMac(QWidget* parent)
|
||||
return;
|
||||
}
|
||||
|
||||
CFNotificationCenterAddObserver(
|
||||
distCenter,
|
||||
this, &ScreenLockListenerMac::notificationCenterCallBack,
|
||||
screenIsLockedSignal,
|
||||
nullptr,
|
||||
CFNotificationSuspensionBehaviorDeliverImmediately);
|
||||
CFNotificationCenterAddObserver(distCenter,
|
||||
this,
|
||||
&ScreenLockListenerMac::notificationCenterCallBack,
|
||||
screenIsLockedSignal,
|
||||
nullptr,
|
||||
CFNotificationSuspensionBehaviorDeliverImmediately);
|
||||
}
|
||||
|
||||
void ScreenLockListenerMac::onSignalReception()
|
||||
|
@ -29,8 +29,9 @@ class ScreenLockListenerMac: public ScreenLockListenerPrivate {
|
||||
|
||||
public:
|
||||
static ScreenLockListenerMac* instance();
|
||||
static void notificationCenterCallBack(CFNotificationCenterRef /*center*/, void */*observer*/,
|
||||
CFNotificationName /*name*/, const void */*object*/, CFDictionaryRef /*userInfo*/);
|
||||
static void notificationCenterCallBack(CFNotificationCenterRef center, void* observer,
|
||||
CFStringRef name, const void* object,
|
||||
CFDictionaryRef userInfo);
|
||||
|
||||
private:
|
||||
ScreenLockListenerMac(QWidget* parent = nullptr);
|
||||
|
@ -57,7 +57,7 @@ ScreenLockListenerWin::~ScreenLockListenerWin()
|
||||
}
|
||||
}
|
||||
|
||||
bool ScreenLockListenerWin::nativeEventFilter(const QByteArray &eventType, void* message, long *)
|
||||
bool ScreenLockListenerWin::nativeEventFilter(const QByteArray& eventType, void* message, long*)
|
||||
{
|
||||
if (eventType == "windows_generic_MSG" || eventType == "windows_dispatcher_MSG") {
|
||||
MSG* m = static_cast<MSG*>(message);
|
||||
|
@ -29,7 +29,7 @@ class ScreenLockListenerWin : public ScreenLockListenerPrivate, public QAbstract
|
||||
public:
|
||||
explicit ScreenLockListenerWin(QWidget* parent = 0);
|
||||
~ScreenLockListenerWin();
|
||||
virtual bool nativeEventFilter(const QByteArray &eventType, void* message, long *) override;
|
||||
virtual bool nativeEventFilter(const QByteArray &eventType, void* message, long*) override;
|
||||
|
||||
private:
|
||||
void* m_powerNotificationHandle ;
|
||||
|
Loading…
Reference in New Issue
Block a user