Replace deprecated macro

Q_OS_MAC is deprecated and the replacement is Q_OS_MACOS.
This commit is contained in:
Chocobo1 2019-09-05 20:11:33 +08:00
parent ef8b37f7fa
commit 0d5b0b9542
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
37 changed files with 159 additions and 159 deletions

View file

@ -35,7 +35,7 @@
#include <QLocale>
#include <QRegExp>
#include <QtGlobal>
#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
#include <QThreadStorage>
#endif
@ -139,7 +139,7 @@ int Utils::String::naturalCompare(const QString &left, const QString &right, con
// provide a single `NaturalCompare` instance for easy use
// https://doc.qt.io/qt-5/threads-reentrancy.html
if (caseSensitivity == Qt::CaseSensitive) {
#ifdef Q_OS_MAC // workaround for Apple xcode: https://stackoverflow.com/a/29929949
#ifdef Q_OS_MACOS // workaround for Apple xcode: https://stackoverflow.com/a/29929949
static QThreadStorage<NaturalCompare> nCmp;
if (!nCmp.hasLocalData())
nCmp.setLocalData(NaturalCompare(Qt::CaseSensitive));
@ -150,7 +150,7 @@ int Utils::String::naturalCompare(const QString &left, const QString &right, con
#endif
}
#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
static QThreadStorage<NaturalCompare> nCmp;
if (!nCmp.hasLocalData())
nCmp.setLocalData(NaturalCompare(Qt::CaseInsensitive));