Fix macos build
This commit is contained in:
@@ -32,7 +32,7 @@
|
|||||||
MacScreensaver::MacScreensaver() : assertion_id_(0) {}
|
MacScreensaver::MacScreensaver() : assertion_id_(0) {}
|
||||||
|
|
||||||
void MacScreensaver::Inhibit() {
|
void MacScreensaver::Inhibit() {
|
||||||
CFStringRef assertion_type = (Utilities::GetMacVersion() >= 7) ? kLionDisplayAssertion : kIOPMAssertionTypeNoDisplaySleep;
|
CFStringRef assertion_type = (Utilities::GetMacOsVersion() >= 7) ? kLionDisplayAssertion : kIOPMAssertionTypeNoDisplaySleep;
|
||||||
|
|
||||||
IOPMAssertionCreateWithName(
|
IOPMAssertionCreateWithName(
|
||||||
assertion_type,
|
assertion_type,
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ void GlobalShortcuts::Unregister() {
|
|||||||
|
|
||||||
bool GlobalShortcuts::IsMacAccessibilityEnabled() const {
|
bool GlobalShortcuts::IsMacAccessibilityEnabled() const {
|
||||||
#ifdef Q_OS_MACOS
|
#ifdef Q_OS_MACOS
|
||||||
if (macos_backend_) return static_cast<GlobalShortcutBackendMacOS*>(macos_backend_)->IsAccessibilityEnabled();
|
if (system_backend_) return static_cast<GlobalShortcutBackendMacOS*>(system_backend_)->IsAccessibilityEnabled();
|
||||||
else return false;
|
else return false;
|
||||||
#else
|
#else
|
||||||
return true;
|
return true;
|
||||||
@@ -175,7 +175,7 @@ bool GlobalShortcuts::IsMacAccessibilityEnabled() const {
|
|||||||
|
|
||||||
void GlobalShortcuts::ShowMacAccessibilityDialog() {
|
void GlobalShortcuts::ShowMacAccessibilityDialog() {
|
||||||
#ifdef Q_OS_MACOS
|
#ifdef Q_OS_MACOS
|
||||||
if (macos_backend_) static_cast<GlobalShortcutBackendMacOS*>(macos_backend_)->ShowAccessibilityDialog();
|
if (system_backend_) static_cast<GlobalShortcutBackendMacOS*>(system_backend_)->ShowAccessibilityDialog();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -85,8 +85,8 @@ GlobalShortcutsSettingsPage::~GlobalShortcutsSettingsPage() { delete ui_; }
|
|||||||
bool GlobalShortcutsSettingsPage::IsEnabled() const {
|
bool GlobalShortcutsSettingsPage::IsEnabled() const {
|
||||||
|
|
||||||
#ifdef Q_OS_MACOS
|
#ifdef Q_OS_MACOS
|
||||||
qLog(Debug) << Utilities::GetMacVersion();
|
qLog(Debug) << Utilities::GetMacOsVersion();
|
||||||
if (Utilities::GetMacVersion() < 6) { // Leopard and earlier.
|
if (Utilities::GetMacOsVersion() < 6) { // Leopard and earlier.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user