parent
054fd962a1
commit
a57d947a33
|
@ -42,6 +42,7 @@
|
|||
|
||||
#ifdef Q_OS_DARWIN
|
||||
# include "core/mac_startup.h"
|
||||
# include "CoreServices/CoreServices.h"
|
||||
#endif
|
||||
|
||||
#include <boost/scoped_array.hpp>
|
||||
|
@ -283,6 +284,14 @@ QString GetConfigPath(ConfigPath config) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef Q_OS_DARWIN
|
||||
qint32 GetMacVersion() {
|
||||
SInt32 minor_version;
|
||||
Gestalt(gestaltSystemVersionMinor, &minor_version);
|
||||
return minor_version;
|
||||
}
|
||||
#endif // Q_OS_DARWIN
|
||||
|
||||
void OpenInFileBrowser(const QList<QUrl>& urls) {
|
||||
QSet<QString> dirs;
|
||||
|
||||
|
|
|
@ -79,6 +79,9 @@ namespace Utilities {
|
|||
Path_LocalSpotifyBlob,
|
||||
};
|
||||
QString GetConfigPath(ConfigPath config);
|
||||
|
||||
// Returns the minor version of OS X (ie. 6 for Snow Leopard, 7 for Lion).
|
||||
qint32 GetMacVersion();
|
||||
}
|
||||
|
||||
class ScopedWCharArray {
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
#include "globalshortcutssettingspage.h"
|
||||
#include "ui_globalshortcutssettingspage.h"
|
||||
#include "core/globalshortcuts.h"
|
||||
#include "core/logging.h"
|
||||
#include "core/utilities.h"
|
||||
#include "ui/iconloader.h"
|
||||
#include "ui/settingsdialog.h"
|
||||
|
||||
|
@ -56,7 +58,8 @@ GlobalShortcutsSettingsPage::~GlobalShortcutsSettingsPage() {
|
|||
|
||||
bool GlobalShortcutsSettingsPage::IsEnabled() const {
|
||||
#ifdef Q_OS_MAC
|
||||
if (QSysInfo::MacintoshVersion != QSysInfo::MV_SNOWLEOPARD) {
|
||||
qLog(Debug) << Utilities::GetMacVersion();
|
||||
if (Utilities::GetMacVersion() < 6) { // Leopard and earlier.
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue