Remove use of some deprecated code and cleanup other macOS code

This commit is contained in:
Jonas Kvinge
2019-08-06 20:31:54 +02:00
parent 20766c1feb
commit 4a934c9dab
11 changed files with 147 additions and 93 deletions

36
src/core/mac_utilities.mm Normal file
View File

@@ -0,0 +1,36 @@
/*
* Strawberry Music Player
* Copyright 2019, Jonas Kvinge <jonas@jkvinge.net>
*
* Strawberry is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Strawberry is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "config.h"
#include <QtGlobal>
#import <Foundation/Foundation.h>
#import <Foundation/NSProcessInfo.h>
namespace Utilities {
qint32 GetMacOsVersion() {
NSOperatingSystemVersion version = [ [NSProcessInfo processInfo] operatingSystemVersion];
return version.minorVersion;
}
} // namespace Utilities