Replace use of deprecated Q_OS_MACX in favor of Q_OS_MACOS
Change-Id: I1059d56f67be28a4cc1a66b744e81df6d0b5d00d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
4f952aaea1
commit
e255146183
@ -2386,7 +2386,7 @@ bool QProcess::startDetached(const QString &program,
|
|||||||
}
|
}
|
||||||
|
|
||||||
QT_BEGIN_INCLUDE_NAMESPACE
|
QT_BEGIN_INCLUDE_NAMESPACE
|
||||||
#if defined(Q_OS_MACX)
|
#if defined(Q_OS_MACOS)
|
||||||
# include <crt_externs.h>
|
# include <crt_externs.h>
|
||||||
# define environ (*_NSGetEnviron())
|
# define environ (*_NSGetEnviron())
|
||||||
#elif defined(QT_PLATFORM_UIKIT)
|
#elif defined(QT_PLATFORM_UIKIT)
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include "qvariant.h"
|
#include "qvariant.h"
|
||||||
|
|
||||||
#if defined(Q_OS_MACX)
|
#if defined(Q_OS_MACOS)
|
||||||
#include <QtCore/private/qcore_mac_p.h>
|
#include <QtCore/private/qcore_mac_p.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1073,7 +1073,7 @@ int QKeySequencePrivate::decodeString(QString accel, QKeySequence::SequenceForma
|
|||||||
if (nativeText) {
|
if (nativeText) {
|
||||||
gmodifs = globalModifs();
|
gmodifs = globalModifs();
|
||||||
if (gmodifs->isEmpty()) {
|
if (gmodifs->isEmpty()) {
|
||||||
#if defined(Q_OS_MACX)
|
#if defined(Q_OS_MACOS)
|
||||||
const bool dontSwap = qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta);
|
const bool dontSwap = qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta);
|
||||||
if (dontSwap)
|
if (dontSwap)
|
||||||
*gmodifs << QModifKeyName(Qt::META, QChar(kCommandUnicode));
|
*gmodifs << QModifKeyName(Qt::META, QChar(kCommandUnicode));
|
||||||
@ -1115,7 +1115,7 @@ int QKeySequencePrivate::decodeString(QString accel, QKeySequence::SequenceForma
|
|||||||
modifs += *gmodifs; // Test non-translated ones last
|
modifs += *gmodifs; // Test non-translated ones last
|
||||||
|
|
||||||
QString sl = accel;
|
QString sl = accel;
|
||||||
#if defined(Q_OS_MACX)
|
#if defined(Q_OS_MACOS)
|
||||||
for (int i = 0; i < modifs.size(); ++i) {
|
for (int i = 0; i < modifs.size(); ++i) {
|
||||||
const QModifKeyName &mkf = modifs.at(i);
|
const QModifKeyName &mkf = modifs.at(i);
|
||||||
if (sl.contains(mkf.name)) {
|
if (sl.contains(mkf.name)) {
|
||||||
@ -1170,7 +1170,7 @@ int QKeySequencePrivate::decodeString(QString accel, QKeySequence::SequenceForma
|
|||||||
|
|
||||||
int fnum = 0;
|
int fnum = 0;
|
||||||
if (accelRef.length() == 1) {
|
if (accelRef.length() == 1) {
|
||||||
#if defined(Q_OS_MACX)
|
#if defined(Q_OS_MACOS)
|
||||||
int qtKey = qtkeyForMacSymbol(accelRef.at(0));
|
int qtKey = qtkeyForMacSymbol(accelRef.at(0));
|
||||||
if (qtKey != -1) {
|
if (qtKey != -1) {
|
||||||
ret |= qtKey;
|
ret |= qtKey;
|
||||||
@ -1242,7 +1242,7 @@ QString QKeySequencePrivate::encodeString(int key, QKeySequence::SequenceFormat
|
|||||||
if (key == -1 || key == Qt::Key_unknown)
|
if (key == -1 || key == Qt::Key_unknown)
|
||||||
return s;
|
return s;
|
||||||
|
|
||||||
#if defined(Q_OS_MACX)
|
#if defined(Q_OS_MACOS)
|
||||||
if (nativeText) {
|
if (nativeText) {
|
||||||
// On OS X the order (by default) is Meta, Alt, Shift, Control.
|
// On OS X the order (by default) is Meta, Alt, Shift, Control.
|
||||||
// If the AA_MacDontSwapCtrlAndMeta is enabled, then the order
|
// If the AA_MacDontSwapCtrlAndMeta is enabled, then the order
|
||||||
@ -1321,7 +1321,7 @@ QString QKeySequencePrivate::keyName(int key, QKeySequence::SequenceFormat forma
|
|||||||
: QString::fromLatin1("F%1").arg(key - Qt::Key_F1 + 1);
|
: QString::fromLatin1("F%1").arg(key - Qt::Key_F1 + 1);
|
||||||
} else if (key) {
|
} else if (key) {
|
||||||
int i=0;
|
int i=0;
|
||||||
#if defined(Q_OS_MACX)
|
#if defined(Q_OS_MACOS)
|
||||||
if (nativeText) {
|
if (nativeText) {
|
||||||
QChar ch = qt_macSymbolForQtKey(key);
|
QChar ch = qt_macSymbolForQtKey(key);
|
||||||
if (!ch.isNull())
|
if (!ch.isNull())
|
||||||
@ -1331,7 +1331,7 @@ QString QKeySequencePrivate::keyName(int key, QKeySequence::SequenceFormat forma
|
|||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#if defined(Q_OS_MACX)
|
#if defined(Q_OS_MACOS)
|
||||||
NonSymbol:
|
NonSymbol:
|
||||||
#endif
|
#endif
|
||||||
while (i < numKeyNames) {
|
while (i < numKeyNames) {
|
||||||
|
@ -608,7 +608,7 @@ QIconEngine *QPlatformTheme::createIconEngine(const QString &iconName) const
|
|||||||
return new QIconLoaderEngine(iconName);
|
return new QIconLoaderEngine(iconName);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(Q_OS_MACX)
|
#if defined(Q_OS_MACOS)
|
||||||
static inline int maybeSwapShortcut(int shortcut)
|
static inline int maybeSwapShortcut(int shortcut)
|
||||||
{
|
{
|
||||||
if (qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta)) {
|
if (qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta)) {
|
||||||
@ -661,7 +661,7 @@ QList<QKeySequence> QPlatformTheme::keyBindings(QKeySequence::StandardKey key) c
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
uint shortcut =
|
uint shortcut =
|
||||||
#if defined(Q_OS_MACX)
|
#if defined(Q_OS_MACOS)
|
||||||
maybeSwapShortcut(it->shortcut);
|
maybeSwapShortcut(it->shortcut);
|
||||||
#else
|
#else
|
||||||
it->shortcut;
|
it->shortcut;
|
||||||
|
@ -102,7 +102,7 @@ Q_GLOBAL_STATIC(QNetworkAccessFtpBackendFactory, ftpBackend)
|
|||||||
Q_GLOBAL_STATIC(QNetworkAccessDebugPipeBackendFactory, debugpipeBackend)
|
Q_GLOBAL_STATIC(QNetworkAccessDebugPipeBackendFactory, debugpipeBackend)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(Q_OS_MACX)
|
#if defined(Q_OS_MACOS)
|
||||||
bool getProxyAuth(const QString& proxyHostname, const QString &scheme, QString& username, QString& password)
|
bool getProxyAuth(const QString& proxyHostname, const QString &scheme, QString& username, QString& password)
|
||||||
{
|
{
|
||||||
OSStatus err;
|
OSStatus err;
|
||||||
|
@ -83,7 +83,7 @@ class QSslContext;
|
|||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
#if defined(Q_OS_MACX)
|
#if defined(Q_OS_MACOS)
|
||||||
typedef CFDataRef (*PtrSecCertificateCopyData)(SecCertificateRef);
|
typedef CFDataRef (*PtrSecCertificateCopyData)(SecCertificateRef);
|
||||||
typedef OSStatus (*PtrSecTrustSettingsCopyCertificates)(int, CFArrayRef*);
|
typedef OSStatus (*PtrSecTrustSettingsCopyCertificates)(int, CFArrayRef*);
|
||||||
typedef OSStatus (*PtrSecTrustCopyAnchorCertificates)(CFArrayRef*);
|
typedef OSStatus (*PtrSecTrustCopyAnchorCertificates)(CFArrayRef*);
|
||||||
|
@ -114,7 +114,7 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(Q_OS_MACX)
|
#if defined(Q_OS_MACOS)
|
||||||
#include <IOKit/pwr_mgt/IOPMLib.h>
|
#include <IOKit/pwr_mgt/IOPMLib.h>
|
||||||
#include <mach/task.h>
|
#include <mach/task.h>
|
||||||
#include <mach/mach_init.h>
|
#include <mach/mach_init.h>
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
#include "qstyle.h"
|
#include "qstyle.h"
|
||||||
#include "qstyleoption.h"
|
#include "qstyleoption.h"
|
||||||
#include "qvarlengtharray.h"
|
#include "qvarlengtharray.h"
|
||||||
#if defined(Q_OS_MACX)
|
#if defined(Q_OS_MACOS)
|
||||||
#include <QtCore/QMetaMethod>
|
#include <QtCore/QMetaMethod>
|
||||||
#include <QtGui/QGuiApplication>
|
#include <QtGui/QGuiApplication>
|
||||||
#include <qpa/qplatformnativeinterface.h>
|
#include <qpa/qplatformnativeinterface.h>
|
||||||
@ -579,7 +579,7 @@ public:
|
|||||||
void _q_updateButtonStates();
|
void _q_updateButtonStates();
|
||||||
void _q_handleFieldObjectDestroyed(QObject *);
|
void _q_handleFieldObjectDestroyed(QObject *);
|
||||||
void setStyle(QStyle *style);
|
void setStyle(QStyle *style);
|
||||||
#ifdef Q_OS_MACX
|
#ifdef Q_OS_MACOS
|
||||||
static QPixmap findDefaultBackgroundPixmap();
|
static QPixmap findDefaultBackgroundPixmap();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1382,7 +1382,7 @@ bool QWizardPrivate::ensureButton(QWizard::WizardButton which) const
|
|||||||
if (style != QApplication::style()) // Propagate style
|
if (style != QApplication::style()) // Propagate style
|
||||||
pushButton->setStyle(style);
|
pushButton->setStyle(style);
|
||||||
pushButton->setObjectName(object_name_for_button(which));
|
pushButton->setObjectName(object_name_for_button(which));
|
||||||
#ifdef Q_OS_MACX
|
#ifdef Q_OS_MACOS
|
||||||
pushButton->setAutoDefault(false);
|
pushButton->setAutoDefault(false);
|
||||||
#endif
|
#endif
|
||||||
pushButton->hide();
|
pushButton->hide();
|
||||||
@ -1740,7 +1740,7 @@ void QWizardPrivate::setStyle(QStyle *style)
|
|||||||
it.value()->setStyle(style);
|
it.value()->setStyle(style);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_OS_MACX
|
#ifdef Q_OS_MACOS
|
||||||
|
|
||||||
QPixmap QWizardPrivate::findDefaultBackgroundPixmap()
|
QPixmap QWizardPrivate::findDefaultBackgroundPixmap()
|
||||||
{
|
{
|
||||||
@ -2871,7 +2871,7 @@ QPixmap QWizard::pixmap(WizardPixmap which) const
|
|||||||
{
|
{
|
||||||
Q_D(const QWizard);
|
Q_D(const QWizard);
|
||||||
Q_ASSERT(uint(which) < NPixmaps);
|
Q_ASSERT(uint(which) < NPixmaps);
|
||||||
#ifdef Q_OS_MACX
|
#ifdef Q_OS_MACOS
|
||||||
if (which == BackgroundPixmap && d->defaultPixmaps[BackgroundPixmap].isNull())
|
if (which == BackgroundPixmap && d->defaultPixmaps[BackgroundPixmap].isNull())
|
||||||
d->defaultPixmaps[BackgroundPixmap] = d->findDefaultBackgroundPixmap();
|
d->defaultPixmaps[BackgroundPixmap] = d->findDefaultBackgroundPixmap();
|
||||||
#endif
|
#endif
|
||||||
|
@ -60,7 +60,7 @@ static const qreal kSingleStepScaleMin = 0.1;
|
|||||||
QGesture *QPanGestureRecognizer::create(QObject *target)
|
QGesture *QPanGestureRecognizer::create(QObject *target)
|
||||||
{
|
{
|
||||||
if (target && target->isWidgetType()) {
|
if (target && target->isWidgetType()) {
|
||||||
#if (defined(Q_OS_MACX) || defined(Q_OS_WIN)) && !defined(QT_NO_NATIVE_GESTURES)
|
#if (defined(Q_OS_MACOS) || defined(Q_OS_WIN)) && !defined(QT_NO_NATIVE_GESTURES)
|
||||||
// for scroll areas on Windows and OS X we want to use native gestures instead
|
// for scroll areas on Windows and OS X we want to use native gestures instead
|
||||||
if (!qobject_cast<QAbstractScrollArea *>(target->parent()))
|
if (!qobject_cast<QAbstractScrollArea *>(target->parent()))
|
||||||
static_cast<QWidget *>(target)->setAttribute(Qt::WA_AcceptTouchEvents);
|
static_cast<QWidget *>(target)->setAttribute(Qt::WA_AcceptTouchEvents);
|
||||||
|
@ -87,7 +87,7 @@ public:
|
|||||||
// On mac we want a standard blue color used when the system palette is used
|
// On mac we want a standard blue color used when the system palette is used
|
||||||
bool isMacSystemPalette(const QPalette &pal) const {
|
bool isMacSystemPalette(const QPalette &pal) const {
|
||||||
Q_UNUSED(pal);
|
Q_UNUSED(pal);
|
||||||
#if defined(Q_OS_MACX)
|
#if defined(Q_OS_MACOS)
|
||||||
const QPalette *themePalette = QGuiApplicationPrivate::platformTheme()->palette();
|
const QPalette *themePalette = QGuiApplicationPrivate::platformTheme()->palette();
|
||||||
if (themePalette && themePalette->color(QPalette::Normal, QPalette::Highlight) ==
|
if (themePalette && themePalette->color(QPalette::Normal, QPalette::Highlight) ==
|
||||||
pal.color(QPalette::Normal, QPalette::Highlight) &&
|
pal.color(QPalette::Normal, QPalette::Highlight) &&
|
||||||
|
@ -3024,7 +3024,7 @@ void tst_QSettings::isWritable()
|
|||||||
QSettings s3(format, QSettings::SystemScope, "foo.org", "Something Different");
|
QSettings s3(format, QSettings::SystemScope, "foo.org", "Something Different");
|
||||||
|
|
||||||
if (s1.status() == QSettings::NoError && s1.contains("foo")) {
|
if (s1.status() == QSettings::NoError && s1.contains("foo")) {
|
||||||
#if defined(Q_OS_MACX)
|
#if defined(Q_OS_MACOS)
|
||||||
QVERIFY(s1.isWritable());
|
QVERIFY(s1.isWritable());
|
||||||
if (format == QSettings::NativeFormat) {
|
if (format == QSettings::NativeFormat) {
|
||||||
QVERIFY(!s2.isWritable());
|
QVERIFY(!s2.isWritable());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user