summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/network/torrent/mainwindow.cpp2
-rw-r--r--examples/widgets/desktop/systray/window.cpp2
-rw-r--r--examples/widgets/mainwindows/mainwindow/mainwindow.cpp4
-rw-r--r--examples/widgets/richtext/textedit/textedit.cpp2
-rw-r--r--examples/widgets/tools/settingseditor/mainwindow.cpp4
-rw-r--r--src/corelib/global/qglobal.cpp2
-rw-r--r--src/corelib/io/qfilesystemengine_unix.cpp2
-rw-r--r--src/corelib/io/qfilesystemwatcher.cpp4
-rw-r--r--src/corelib/io/qfilesystemwatcher_fsevents.mm2
-rw-r--r--src/corelib/io/qlockfile_unix.cpp4
-rw-r--r--src/corelib/kernel/qcore_mac.mm4
-rw-r--r--src/corelib/kernel/qeventdispatcher_cf.mm2
-rw-r--r--src/corelib/text/qcollator_p.h4
-rw-r--r--src/gui/kernel/qguiapplication.cpp2
-rw-r--r--src/gui/kernel/qkeysequence.cpp2
-rw-r--r--src/gui/kernel/qplatformdialoghelper.cpp2
-rw-r--r--src/gui/kernel/qwindowsysteminterface.cpp4
-rw-r--r--src/gui/opengl/qopengl.cpp2
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp2
-rw-r--r--src/network/ssl/qsslsocket_mac.cpp2
-rw-r--r--src/network/ssl/qsslsocket_mac_shared.cpp8
-rw-r--r--src/platformsupport/clipboard/qmacmime.mm2
-rw-r--r--src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm2
-rw-r--r--src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h2
-rw-r--r--src/testlib/qtestblacklist.cpp2
-rw-r--r--src/testlib/qtestcase.cpp2
-rw-r--r--src/testlib/qxctestlogger.mm2
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp2
-rw-r--r--src/widgets/itemviews/qabstractitemview.cpp4
-rw-r--r--src/widgets/kernel/qapplication.cpp2
-rw-r--r--src/widgets/kernel/qgesturemanager.cpp6
-rw-r--r--src/widgets/kernel/qwidgetwindow.cpp4
-rw-r--r--src/widgets/widgets/qabstractscrollarea.cpp2
-rw-r--r--src/widgets/widgets/qcombobox.cpp6
-rw-r--r--src/widgets/widgets/qmainwindow.cpp10
-rw-r--r--src/widgets/widgets/qmenu.cpp6
-rw-r--r--src/widgets/widgets/qmenu.h2
-rw-r--r--src/widgets/widgets/qmenu_p.h2
-rw-r--r--src/widgets/widgets/qtabbar.cpp4
-rw-r--r--src/widgets/widgets/qtoolbar.cpp12
-rw-r--r--src/widgets/widgets/qtoolbar_p.h4
-rw-r--r--src/widgets/widgets/qtoolbarlayout.cpp4
-rw-r--r--tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp4
-rw-r--r--tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp2
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp78
-rw-r--r--tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp2
-rw-r--r--tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp2
-rw-r--r--tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp2
48 files changed, 117 insertions, 117 deletions
diff --git a/examples/network/torrent/mainwindow.cpp b/examples/network/torrent/mainwindow.cpp
index 331fa12944..c343ee81b9 100644
--- a/examples/network/torrent/mainwindow.cpp
+++ b/examples/network/torrent/mainwindow.cpp
@@ -183,7 +183,7 @@ MainWindow::MainWindow(QWidget *parent)
bottomBar->addWidget((uploadLimitLabel = new QLabel(tr("0 KB/s"))));
uploadLimitLabel->setFixedSize(QSize(fm.horizontalAdvance(tr("99999 KB/s")), fm.lineSpacing()));
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
setUnifiedTitleAndToolBarOnMac(true);
#endif
diff --git a/examples/widgets/desktop/systray/window.cpp b/examples/widgets/desktop/systray/window.cpp
index e30166beac..9cfe651669 100644
--- a/examples/widgets/desktop/systray/window.cpp
+++ b/examples/widgets/desktop/systray/window.cpp
@@ -111,7 +111,7 @@ void Window::setVisible(bool visible)
//! [2]
void Window::closeEvent(QCloseEvent *event)
{
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
if (!event->spontaneous() || !isVisible()) {
return;
}
diff --git a/examples/widgets/mainwindows/mainwindow/mainwindow.cpp b/examples/widgets/mainwindows/mainwindow/mainwindow.cpp
index 4ba180f312..717c75b166 100644
--- a/examples/widgets/mainwindows/mainwindow/mainwindow.cpp
+++ b/examples/widgets/mainwindows/mainwindow/mainwindow.cpp
@@ -120,7 +120,7 @@ void MainWindow::actionTriggered(QAction *action)
void MainWindow::setupToolBar()
{
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
setUnifiedTitleAndToolBarOnMac(true);
#endif
@@ -178,7 +178,7 @@ void MainWindow::setupMenuBar()
for (int i = 0; i < toolBars.count(); ++i)
toolBarMenu->addMenu(toolBars.at(i)->toolbarMenu());
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
toolBarMenu->addSeparator();
action = toolBarMenu->addAction(tr("Unified"));
diff --git a/examples/widgets/richtext/textedit/textedit.cpp b/examples/widgets/richtext/textedit/textedit.cpp
index c9173bcb99..cf3eb47ad8 100644
--- a/examples/widgets/richtext/textedit/textedit.cpp
+++ b/examples/widgets/richtext/textedit/textedit.cpp
@@ -96,7 +96,7 @@ const QString rsrcPath = ":/images/win";
TextEdit::TextEdit(QWidget *parent)
: QMainWindow(parent)
{
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
setUnifiedTitleAndToolBarOnMac(true);
#endif
setWindowTitle(QCoreApplication::applicationName());
diff --git a/examples/widgets/tools/settingseditor/mainwindow.cpp b/examples/widgets/tools/settingseditor/mainwindow.cpp
index ccca16ffcd..225a396f91 100644
--- a/examples/widgets/tools/settingseditor/mainwindow.cpp
+++ b/examples/widgets/tools/settingseditor/mainwindow.cpp
@@ -157,10 +157,10 @@ void MainWindow::createActions()
QAction *openIniFileAct = fileMenu->addAction(tr("Open I&NI File..."), this, &MainWindow::openIniFile);
openIniFileAct->setShortcut(tr("Ctrl+N"));
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
QAction *openPropertyListAct = fileMenu->addAction(tr("Open Apple &Property List..."), this, &MainWindow::openPropertyList);
openPropertyListAct->setShortcut(tr("Ctrl+P"));
-#endif // Q_OS_OSX
+#endif // Q_OS_MACOS
#ifdef Q_OS_WIN
QAction *openRegistryPathAct = fileMenu->addAction(tr("Open Windows &Registry Path..."), this, &MainWindow::openRegistryPath);
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 0f7ba8580e..62c6e64abb 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -2101,7 +2101,7 @@ QT_WARNING_DISABLE_DEPRECATED
QSysInfo::MacVersion QSysInfo::macVersion()
{
const auto version = QOperatingSystemVersion::current();
-#if defined(Q_OS_OSX)
+#if defined(Q_OS_MACOS)
return QSysInfo::MacVersion(Q_MV_OSX(version.majorVersion(), version.minorVersion()));
#elif defined(Q_OS_IOS)
return QSysInfo::MacVersion(Q_MV_IOS(version.majorVersion(), version.minorVersion()));
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index eaf4e2d9af..67cff7c68c 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -69,7 +69,7 @@
# include <CoreFoundation/CFBundle.h>
#endif
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
#include <CoreServices/CoreServices.h>
#endif
diff --git a/src/corelib/io/qfilesystemwatcher.cpp b/src/corelib/io/qfilesystemwatcher.cpp
index 86c8963cb6..96d9210c1c 100644
--- a/src/corelib/io/qfilesystemwatcher.cpp
+++ b/src/corelib/io/qfilesystemwatcher.cpp
@@ -58,7 +58,7 @@
# include "qfilesystemwatcher_inotify_p.h"
#elif defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD) || defined(QT_PLATFORM_UIKIT)
# include "qfilesystemwatcher_kqueue_p.h"
-#elif defined(Q_OS_OSX)
+#elif defined(Q_OS_MACOS)
# include "qfilesystemwatcher_fsevents_p.h"
#endif
@@ -79,7 +79,7 @@ QFileSystemWatcherEngine *QFileSystemWatcherPrivate::createNativeEngine(QObject
return QInotifyFileSystemWatcherEngine::create(parent);
#elif defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD) || defined(QT_PLATFORM_UIKIT)
return QKqueueFileSystemWatcherEngine::create(parent);
-#elif defined(Q_OS_OSX)
+#elif defined(Q_OS_MACOS)
return QFseventsFileSystemWatcherEngine::create(parent);
#else
Q_UNUSED(parent);
diff --git a/src/corelib/io/qfilesystemwatcher_fsevents.mm b/src/corelib/io/qfilesystemwatcher_fsevents.mm
index 6194bf7c71..e039559ea3 100644
--- a/src/corelib/io/qfilesystemwatcher_fsevents.mm
+++ b/src/corelib/io/qfilesystemwatcher_fsevents.mm
@@ -199,7 +199,7 @@ void QFseventsFileSystemWatcherEngine::processEvent(ConstFSEventStreamRef stream
const FSEventStreamEventFlags eventFlags[],
const FSEventStreamEventId eventIds[])
{
-#if defined(Q_OS_OSX)
+#if defined(Q_OS_MACOS)
Q_UNUSED(streamRef);
bool needsRestart = false;
diff --git a/src/corelib/io/qlockfile_unix.cpp b/src/corelib/io/qlockfile_unix.cpp
index ce2b7e8faa..b531140437 100644
--- a/src/corelib/io/qlockfile_unix.cpp
+++ b/src/corelib/io/qlockfile_unix.cpp
@@ -68,7 +68,7 @@
#include <signal.h> // kill
#include <unistd.h> // gethostname
-#if defined(Q_OS_OSX)
+#if defined(Q_OS_MACOS)
# include <libproc.h>
#elif defined(Q_OS_LINUX)
# include <unistd.h>
@@ -222,7 +222,7 @@ bool QLockFilePrivate::isProcessRunning(qint64 pid, const QString &appname)
QString QLockFilePrivate::processNameByPid(qint64 pid)
{
-#if defined(Q_OS_OSX)
+#if defined(Q_OS_MACOS)
char name[1024];
proc_name(pid, name, sizeof(name) / sizeof(char));
return QFile::decodeName(name);
diff --git a/src/corelib/kernel/qcore_mac.mm b/src/corelib/kernel/qcore_mac.mm
index 0d334e7300..a8aa1dad1f 100644
--- a/src/corelib/kernel/qcore_mac.mm
+++ b/src/corelib/kernel/qcore_mac.mm
@@ -458,7 +458,7 @@ QMacRootLevelAutoReleasePool::~QMacRootLevelAutoReleasePool()
// -------------------------------------------------------------------------
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
// Use this method to keep all the information in the TextSegment. As long as it is ordered
// we are in OK shape, and we can influence that ourselves.
@@ -598,7 +598,7 @@ Qt::Key qt_mac_cocoaKey2QtKey(QChar keyCode)
return i->qtKey;
}
-#endif // Q_OS_OSX
+#endif // Q_OS_MACOS
void qt_apple_check_os_version()
{
diff --git a/src/corelib/kernel/qeventdispatcher_cf.mm b/src/corelib/kernel/qeventdispatcher_cf.mm
index 177551467c..b482269df2 100644
--- a/src/corelib/kernel/qeventdispatcher_cf.mm
+++ b/src/corelib/kernel/qeventdispatcher_cf.mm
@@ -48,7 +48,7 @@
#include <limits>
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
# include <AppKit/NSApplication.h>
#elif defined(Q_OS_WATCHOS)
# include <WatchKit/WatchKit.h>
diff --git a/src/corelib/text/qcollator_p.h b/src/corelib/text/qcollator_p.h
index fc2d434a8d..444ae06a99 100644
--- a/src/corelib/text/qcollator_p.h
+++ b/src/corelib/text/qcollator_p.h
@@ -57,7 +57,7 @@
#include <QVector>
#if QT_CONFIG(icu)
#include <unicode/ucol.h>
-#elif defined(Q_OS_OSX)
+#elif defined(Q_OS_MACOS)
#include <CoreServices/CoreServices.h>
#elif defined(Q_OS_WIN)
#include <qt_windows.h>
@@ -70,7 +70,7 @@ typedef UCollator *CollatorType;
typedef QByteArray CollatorKeyType;
const CollatorType NoCollator = nullptr;
-#elif defined(Q_OS_OSX)
+#elif defined(Q_OS_MACOS)
typedef CollatorRef CollatorType;
typedef QVector<UCCollationValue> CollatorKeyType;
const CollatorType NoCollator = 0;
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index b9e8db8789..13369dc8f6 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -2320,7 +2320,7 @@ void QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyE
static bool menuKeyPressAccepted = false;
#endif
-#if !defined(Q_OS_OSX)
+#if !defined(Q_OS_MACOS)
// FIXME: Include OS X in this code path by passing the key event through
// QPlatformInputContext::filterEvent().
if (e->keyType == QEvent::KeyPress && window) {
diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp
index 3a3dd42cae..a75b8ef920 100644
--- a/src/gui/kernel/qkeysequence.cpp
+++ b/src/gui/kernel/qkeysequence.cpp
@@ -1288,7 +1288,7 @@ QString QKeySequencePrivate::encodeString(int key, QKeySequence::SequenceFormat
QString p = keyName(key, format);
-#if defined(Q_OS_OSX)
+#if defined(Q_OS_MACOS)
if (nativeText)
s += p;
else
diff --git a/src/gui/kernel/qplatformdialoghelper.cpp b/src/gui/kernel/qplatformdialoghelper.cpp
index 5face96575..33cd004234 100644
--- a/src/gui/kernel/qplatformdialoghelper.cpp
+++ b/src/gui/kernel/qplatformdialoghelper.cpp
@@ -979,7 +979,7 @@ QPlatformDialogHelper::ButtonRole QPlatformDialogHelper::buttonRole(QPlatformDia
const int *QPlatformDialogHelper::buttonLayout(Qt::Orientation orientation, ButtonLayout policy)
{
if (policy == UnknownLayout) {
-#if defined (Q_OS_OSX)
+#if defined (Q_OS_MACOS)
policy = MacLayout;
#elif defined (Q_OS_LINUX) || defined (Q_OS_UNIX)
policy = KdeLayout;
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp
index b20578940c..aefb377683 100644
--- a/src/gui/kernel/qwindowsysteminterface.cpp
+++ b/src/gui/kernel/qwindowsysteminterface.cpp
@@ -498,7 +498,7 @@ QT_DEFINE_QPA_EVENT_HANDLER(bool, handleKeyEvent, QWindow *window, QEvent::Type
QT_DEFINE_QPA_EVENT_HANDLER(bool, handleKeyEvent, QWindow *window, ulong timestamp, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString & text, bool autorep, ushort count)
{
-#if defined(Q_OS_OSX)
+#if defined(Q_OS_MACOS)
if (t == QEvent::KeyPress && QWindowSystemInterface::handleShortcutEvent(window, timestamp, k, mods, 0, 0, 0, text, autorep, count))
return true;
#endif
@@ -526,7 +526,7 @@ bool QWindowSystemInterface::handleExtendedKeyEvent(QWindow *window, ulong times
const QString& text, bool autorep,
ushort count, bool tryShortcutOverride)
{
-#if defined(Q_OS_OSX)
+#if defined(Q_OS_MACOS)
if (tryShortcutOverride && type == QEvent::KeyPress && QWindowSystemInterface::handleShortcutEvent(window,
timestamp, key, modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorep, count)) {
return true;
diff --git a/src/gui/opengl/qopengl.cpp b/src/gui/opengl/qopengl.cpp
index adca536797..3066b83282 100644
--- a/src/gui/opengl/qopengl.cpp
+++ b/src/gui/opengl/qopengl.cpp
@@ -295,7 +295,7 @@ QString OsTypeTerm::hostOs()
return QStringLiteral("win");
#elif defined(Q_OS_LINUX)
return QStringLiteral("linux");
-#elif defined(Q_OS_OSX)
+#elif defined(Q_OS_MACOS)
return QStringLiteral("macosx");
#elif defined(Q_OS_ANDROID)
return QStringLiteral("android");
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 9e0389e08d..6f6aa73f62 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -1892,7 +1892,7 @@ void QNetworkAccessManagerPrivate::proxyAuthenticationRequired(const QUrl &url,
}
}
-#if defined(Q_OS_OSX)
+#if defined(Q_OS_MACOS)
//now we try to get the username and password from keychain
//if not successful signal will be emitted
QString username;
diff --git a/src/network/ssl/qsslsocket_mac.cpp b/src/network/ssl/qsslsocket_mac.cpp
index e0e065679d..77e847e972 100644
--- a/src/network/ssl/qsslsocket_mac.cpp
+++ b/src/network/ssl/qsslsocket_mac.cpp
@@ -66,7 +66,7 @@
#include <QtCore/private/qcore_mac_p.h>
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
#include <CoreServices/CoreServices.h>
#endif
diff --git a/src/network/ssl/qsslsocket_mac_shared.cpp b/src/network/ssl/qsslsocket_mac_shared.cpp
index 4f0adf16f9..0bc4647e8b 100644
--- a/src/network/ssl/qsslsocket_mac_shared.cpp
+++ b/src/network/ssl/qsslsocket_mac_shared.cpp
@@ -57,14 +57,14 @@
#include <QtCore/qdebug.h>
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
# include <Security/Security.h>
#endif
QT_BEGIN_NAMESPACE
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
namespace {
bool hasTrustedSslServerPolicy(SecPolicyRef policy, CFDictionaryRef props) {
@@ -119,7 +119,7 @@ bool isCaCertificateTrusted(SecCertificateRef cfCert, int domain)
}
} // anon namespace
-#endif // Q_OS_OSX
+#endif // Q_OS_MACOS
QList<QSslCertificate> QSslSocketPrivate::systemCaCertificates()
{
@@ -127,7 +127,7 @@ QList<QSslCertificate> QSslSocketPrivate::systemCaCertificates()
QList<QSslCertificate> systemCerts;
// SecTrustSettingsCopyCertificates is not defined on iOS.
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
// iterate through all enum members, order:
// kSecTrustSettingsDomainUser, kSecTrustSettingsDomainAdmin, kSecTrustSettingsDomainSystem
for (int dom = kSecTrustSettingsDomainUser; dom <= int(kSecTrustSettingsDomainSystem); dom++) {
diff --git a/src/platformsupport/clipboard/qmacmime.mm b/src/platformsupport/clipboard/qmacmime.mm
index 76e9c8712c..c97d961260 100644
--- a/src/platformsupport/clipboard/qmacmime.mm
+++ b/src/platformsupport/clipboard/qmacmime.mm
@@ -42,7 +42,7 @@
#include <QtCore/qsystemdetection.h>
#include <QtGui/qimage.h>
-#if defined(Q_OS_OSX)
+#if defined(Q_OS_MACOS)
#import <AppKit/AppKit.h>
#else
#include <MobileCoreServices/MobileCoreServices.h>
diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
index 894919a1c8..bf986aab77 100644
--- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
+++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
@@ -41,7 +41,7 @@
#include <sys/param.h>
-#if defined(Q_OS_OSX)
+#if defined(Q_OS_MACOS)
#import <AppKit/AppKit.h>
#import <IOKit/graphics/IOGraphicsLib.h>
#elif defined(QT_PLATFORM_UIKIT)
diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
index 51d839688d..fe5be960b3 100644
--- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
+++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
@@ -55,7 +55,7 @@
#include <private/qcore_mac_p.h>
#include <QtCore/qloggingcategory.h>
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
#include <ApplicationServices/ApplicationServices.h>
#else
#include <CoreText/CoreText.h>
diff --git a/src/testlib/qtestblacklist.cpp b/src/testlib/qtestblacklist.cpp
index 9b7c2495d4..f9ccde0280 100644
--- a/src/testlib/qtestblacklist.cpp
+++ b/src/testlib/qtestblacklist.cpp
@@ -102,7 +102,7 @@ static QSet<QByteArray> keywords()
#ifdef Q_OS_LINUX
<< "linux"
#endif
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
<< "osx"
<< "macos"
#endif
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index 20c370dc38..f45999c7fa 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -231,7 +231,7 @@ static void stackTrace()
if (system(cmd) == -1)
fprintf(stderr, "calling gdb failed\n");
fprintf(stderr, "=== End of stack trace ===\n");
-#elif defined(Q_OS_OSX)
+#elif defined(Q_OS_MACOS)
char cmd[512];
qsnprintf(cmd, 512, "lldb -p %d 2>/dev/null <<EOF\n"
"bt all\n"
diff --git a/src/testlib/qxctestlogger.mm b/src/testlib/qxctestlogger.mm
index 9fa9da2fdd..d9e56cf542 100644
--- a/src/testlib/qxctestlogger.mm
+++ b/src/testlib/qxctestlogger.mm
@@ -189,7 +189,7 @@ private:
// Prevent XCTestProbe from re-launching runTests on application startup
[[NSNotificationCenter defaultCenter] removeObserver:[XCTestProbe class]
name:[NSString stringWithFormat:@"%@DidFinishLaunchingNotification",
- #if defined(Q_OS_OSX)
+ #if defined(Q_OS_MACOS)
@"NSApplication"
#else
@"UIApplication"
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp
index 34c2c4ecb5..bace311924 100644
--- a/src/widgets/dialogs/qfiledialog.cpp
+++ b/src/widgets/dialogs/qfiledialog.cpp
@@ -1041,7 +1041,7 @@ static inline bool isCaseSensitiveFileSystem(const QString &path)
// Return case insensitive unconditionally, even if someone has a case sensitive
// file system mounted, wrongly capitalized drive letters will cause mismatches.
return false;
-#elif defined(Q_OS_OSX)
+#elif defined(Q_OS_MACOS)
return pathconf(QFile::encodeName(path).constData(), _PC_CASE_SENSITIVE);
#else
return true;
diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp
index f8784f9428..3b2aebff15 100644
--- a/src/widgets/itemviews/qabstractitemview.cpp
+++ b/src/widgets/itemviews/qabstractitemview.cpp
@@ -2461,7 +2461,7 @@ void QAbstractItemView::keyPressEvent(QKeyEvent *event)
}
#endif
break;
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
case Qt::Key_Enter:
case Qt::Key_Return:
// Propagate the enter if you couldn't edit the item and there are no
@@ -2493,7 +2493,7 @@ void QAbstractItemView::keyPressEvent(QKeyEvent *event)
break;
}
#endif
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
if (event->key() == Qt::Key_O && event->modifiers() & Qt::ControlModifier && currentIndex().isValid()) {
emit activated(currentIndex());
break;
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index a2c2dccbcc..80e4aa525e 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -4293,7 +4293,7 @@ bool QApplicationPrivate::translateRawTouchEvent(QWidget *window,
QWidget *targetWidget = static_cast<QWidget *>(target.data());
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
// Single-touch events are normally not sent unless WA_TouchPadAcceptSingleTouchEvents is set.
// In Qt 4 this check was in OS X-only code. That behavior is preserved here by the #ifdef.
if (touchPoints.count() == 1
diff --git a/src/widgets/kernel/qgesturemanager.cpp b/src/widgets/kernel/qgesturemanager.cpp
index 541519245e..134cebca09 100644
--- a/src/widgets/kernel/qgesturemanager.cpp
+++ b/src/widgets/kernel/qgesturemanager.cpp
@@ -51,7 +51,7 @@
#include "qgesture.h"
#include "qevent.h"
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
#include "qmacgesturerecognizer_p.h"
#endif
@@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcGestureManager, "qt.widgets.gestures")
-#if !defined(Q_OS_OSX)
+#if !defined(Q_OS_MACOS)
static inline int panTouchPoints()
{
// Override by environment variable for testing.
@@ -89,7 +89,7 @@ QGestureManager::QGestureManager(QObject *parent)
{
qRegisterMetaType<Qt::GestureState>();
-#if defined(Q_OS_OSX)
+#if defined(Q_OS_MACOS)
registerGestureRecognizer(new QMacSwipeGestureRecognizer);
registerGestureRecognizer(new QMacPinchGestureRecognizer);
registerGestureRecognizer(new QMacPanGestureRecognizer);
diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp
index 48e407f917..0fa3fb4c67 100644
--- a/src/widgets/kernel/qwidgetwindow.cpp
+++ b/src/widgets/kernel/qwidgetwindow.cpp
@@ -397,7 +397,7 @@ QPointer<QWidget> qt_last_mouse_receiver = nullptr;
void QWidgetWindow::handleEnterLeaveEvent(QEvent *event)
{
-#if !defined(Q_OS_OSX) && !defined(Q_OS_IOS) // Cocoa tracks popups
+#if !defined(Q_OS_MACOS) && !defined(Q_OS_IOS) // Cocoa tracks popups
// Ignore all enter/leave events from QPA if we are not on the first-level context menu.
// This prevents duplicated events on most platforms. Fake events will be delivered in
// QWidgetWindow::handleMouseEvent(QMouseEvent *). Make an exception whether the widget
@@ -544,7 +544,7 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event)
if (receiver != activePopupWidget)
widgetPos = receiver->mapFromGlobal(event->globalPos());
-#if !defined(Q_OS_OSX) && !defined(Q_OS_IOS) // Cocoa tracks popups
+#if !defined(Q_OS_MACOS) && !defined(Q_OS_IOS) // Cocoa tracks popups
const bool reallyUnderMouse = activePopupWidget->rect().contains(mapped);
const bool underMouse = activePopupWidget->underMouse();
if (underMouse != reallyUnderMouse) {
diff --git a/src/widgets/widgets/qabstractscrollarea.cpp b/src/widgets/widgets/qabstractscrollarea.cpp
index 257cffda62..6bc88f129d 100644
--- a/src/widgets/widgets/qabstractscrollarea.cpp
+++ b/src/widgets/widgets/qabstractscrollarea.cpp
@@ -308,7 +308,7 @@ void QAbstractScrollAreaPrivate::init()
q->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
q->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
layoutChildren();
-#ifndef Q_OS_OSX
+#ifndef Q_OS_MACOS
# ifndef QT_NO_GESTURES
viewport->grabGesture(Qt::PanGesture);
# endif
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index 84ba647975..b1f2d40d38 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -1082,7 +1082,7 @@ QComboBox::QComboBox(QComboBoxPrivate &dd, QWidget *parent)
void QComboBoxPrivate::init()
{
Q_Q(QComboBox);
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
// On OS X, only line edits and list views always get tab focus. It's only
// when we enable full keyboard access that other controls can get tab focus.
// When it's not editable, a combobox looks like a button, and it behaves as
@@ -1239,7 +1239,7 @@ void QComboBoxPrivate::updateViewContainerPaletteAndOpacity()
void QComboBoxPrivate::updateFocusPolicy()
{
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
Q_Q(QComboBox);
// See comment in QComboBoxPrivate::init()
@@ -2696,7 +2696,7 @@ bool QComboBoxPrivate::showNativePopup()
const QRect targetRect = QRect(tlw->mapFromGlobal(q->mapToGlobal(offset)), QSize());
m_platformMenu->showPopup(tlw, QHighDpi::toNativePixels(targetRect, tlw), currentItem);
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
// The Cocoa popup will swallow any mouse release event.
// We need to fake one here to un-press the button.
QMouseEvent mouseReleased(QEvent::MouseButtonRelease, q->pos(), Qt::LeftButton,
diff --git a/src/widgets/widgets/qmainwindow.cpp b/src/widgets/widgets/qmainwindow.cpp
index 4f94b81b19..6b50f5e8ab 100644
--- a/src/widgets/widgets/qmainwindow.cpp
+++ b/src/widgets/widgets/qmainwindow.cpp
@@ -67,7 +67,7 @@
#include "qtoolbar_p.h"
#endif
#include "qwidgetanimator_p.h"
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
#include <qpa/qplatformnativeinterface.h>
#endif
@@ -79,7 +79,7 @@ class QMainWindowPrivate : public QWidgetPrivate
public:
inline QMainWindowPrivate()
: layout(nullptr), explicitIconSize(false), toolButtonStyle(Qt::ToolButtonIconOnly)
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
, useUnifiedToolBar(false)
#endif
{ }
@@ -87,7 +87,7 @@ public:
QSize iconSize;
bool explicitIconSize;
Qt::ToolButtonStyle toolButtonStyle;
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
bool useUnifiedToolBar;
#endif
void init();
@@ -1357,7 +1357,7 @@ bool QMainWindow::event(QEvent *event)
*/
void QMainWindow::setUnifiedTitleAndToolBarOnMac(bool set)
{
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
Q_D(QMainWindow);
if (isWindow()) {
d->useUnifiedToolBar = set;
@@ -1382,7 +1382,7 @@ void QMainWindow::setUnifiedTitleAndToolBarOnMac(bool set)
bool QMainWindow::unifiedTitleAndToolBarOnMac() const
{
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
return d_func()->useUnifiedToolBar;
#endif
return false;
diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp
index 0233fa136d..86978cb681 100644
--- a/src/widgets/widgets/qmenu.cpp
+++ b/src/widgets/widgets/qmenu.cpp
@@ -48,7 +48,7 @@
#include "qlayout.h"
#include "qpainter.h"
#include <qpa/qplatformtheme.h>
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
#include "qmacnativewidget_mac.h"
#endif
#include "qapplication.h"
@@ -1491,7 +1491,7 @@ void QMenuPrivate::_q_platformMenuAboutToShow()
emit q->aboutToShow();
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
if (platformMenu) {
const auto actions = q->actions();
for (QAction *action : actions) {
@@ -3547,7 +3547,7 @@ void QMenu::actionEvent(QActionEvent *e)
d->currentAction = nullptr;
if (QWidgetAction *wa = qobject_cast<QWidgetAction *>(e->action())) {
if (QWidget *widget = d->widgetItems.value(wa)) {
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
QWidget *p = widget->parentWidget();
if (p != this && qobject_cast<QMacNativeWidget *>(p)) {
// This widget was reparented into a native Mac view
diff --git a/src/widgets/widgets/qmenu.h b/src/widgets/widgets/qmenu.h
index 84ab9e027a..eec9708d43 100644
--- a/src/widgets/widgets/qmenu.h
+++ b/src/widgets/widgets/qmenu.h
@@ -270,7 +270,7 @@ private:
friend void qt_mac_menu_emit_hovered(QMenu *menu, QAction *action);
};
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
// ### Qt 4 compatibility; remove in Qt 6
inline QT_DEPRECATED void qt_mac_set_dock_menu(QMenu *menu) { menu->setAsDockMenu(); }
#endif
diff --git a/src/widgets/widgets/qmenu_p.h b/src/widgets/widgets/qmenu_p.h
index 02fe9f31a1..3871d6763c 100644
--- a/src/widgets/widgets/qmenu_p.h
+++ b/src/widgets/widgets/qmenu_p.h
@@ -335,7 +335,7 @@ public:
void copyActionToPlatformItem(const QAction *action, QPlatformMenuItem *item);
QPlatformMenuItem *insertActionInPlatformMenu(const QAction *action, QPlatformMenuItem *beforeItem);
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
void moveWidgetToPlatformItem(QWidget *w, QPlatformMenuItem* item);
#endif
diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp
index df480629da..53be917945 100644
--- a/src/widgets/widgets/qtabbar.cpp
+++ b/src/widgets/widgets/qtabbar.cpp
@@ -60,7 +60,7 @@
#ifndef QT_NO_ACCESSIBILITY
#include "qaccessible.h"
#endif
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
#include <qpa/qplatformnativeinterface.h>
#endif
@@ -115,7 +115,7 @@ inline static bool verticalTabs(QTabBar::Shape shape)
void QTabBarPrivate::updateMacBorderMetrics()
{
-#if defined(Q_OS_OSX)
+#if defined(Q_OS_MACOS)
Q_Q(QTabBar);
// Extend the unified title and toolbar area to cover the tab bar iff
// 1) the tab bar is in document mode
diff --git a/src/widgets/widgets/qtoolbar.cpp b/src/widgets/widgets/qtoolbar.cpp
index b4e90c7d71..0912cd55d3 100644
--- a/src/widgets/widgets/qtoolbar.cpp
+++ b/src/widgets/widgets/qtoolbar.cpp
@@ -61,7 +61,7 @@
#include <private/qwidgetaction_p.h>
#include <private/qmainwindowlayout_p.h>
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
#include <qpa/qplatformnativeinterface.h>
#endif
@@ -248,7 +248,7 @@ bool QToolBarPrivate::mousePressEvent(QMouseEvent *event)
QStyleOptionToolBar opt;
q->initStyleOption(&opt);
if (q->style()->subElementRect(QStyle::SE_ToolBarHandle, &opt, q).contains(event->pos()) == false) {
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
// When using the unified toolbar on OS X, the user can click and
// drag between toolbar contents to move the window. Make this work by
// implementing the standard mouse-dragging code and then call
@@ -282,7 +282,7 @@ bool QToolBarPrivate::mouseReleaseEvent(QMouseEvent*)
endDrag();
return true;
} else {
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
if (!macWindowDragging)
return false;
macWindowDragging = false;
@@ -298,7 +298,7 @@ bool QToolBarPrivate::mouseMoveEvent(QMouseEvent *event)
Q_Q(QToolBar);
if (!state) {
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
if (!macWindowDragging)
return false;
QWidget *w = q->window();
@@ -1083,7 +1083,7 @@ static bool waitForPopup(QToolBar *tb, QWidget *popup)
return false;
}
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
static void enableMacToolBar(QToolBar *toolbar, bool enable)
{
QPlatformNativeInterface *nativeInterface = QApplication::platformNativeInterface();
@@ -1122,7 +1122,7 @@ bool QToolBar::event(QEvent *event)
Q_FALLTHROUGH();
case QEvent::Show:
d->toggleViewAction->setChecked(event->type() == QEvent::Show);
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
enableMacToolBar(this, event->type() == QEvent::Show);
#endif
emit visibilityChanged(event->type() == QEvent::Show);
diff --git a/src/widgets/widgets/qtoolbar_p.h b/src/widgets/widgets/qtoolbar_p.h
index 8cb5850903..79e693acbf 100644
--- a/src/widgets/widgets/qtoolbar_p.h
+++ b/src/widgets/widgets/qtoolbar_p.h
@@ -74,7 +74,7 @@ public:
allowedAreas(Qt::AllToolBarAreas), orientation(Qt::Horizontal),
toolButtonStyle(Qt::ToolButtonIconOnly),
layout(nullptr), state(nullptr)
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
, macWindowDragging(false)
#endif
{ }
@@ -106,7 +106,7 @@ public:
};
DragState *state;
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
bool macWindowDragging;
QPoint macWindowDragPressPosition;
#endif
diff --git a/src/widgets/widgets/qtoolbarlayout.cpp b/src/widgets/widgets/qtoolbarlayout.cpp
index d77ba3c13e..4ffa17ecd7 100644
--- a/src/widgets/widgets/qtoolbarlayout.cpp
+++ b/src/widgets/widgets/qtoolbarlayout.cpp
@@ -48,7 +48,7 @@
#include <qmenu.h>
#include <qdebug.h>
#include <qmath.h>
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
#include <qpa/qplatformnativeinterface.h>
#endif
@@ -348,7 +348,7 @@ static bool defaultWidgetAction(QToolBarItem *item)
void QToolBarLayout::updateMacBorderMetrics()
{
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
QToolBar *tb = qobject_cast<QToolBar*>(parentWidget());
if (!tb)
return;
diff --git a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
index bff9f7d0e0..e099b4dfc7 100644
--- a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
+++ b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
@@ -289,10 +289,10 @@ void tst_QClipboard::copyImage()
image.fill(QColor(Qt::transparent));
image.setPixel(QPoint(1, 0), QColor(Qt::blue).rgba());
QGuiApplication::clipboard()->setImage(image);
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
// The Pasteboard needs a moment to breathe (at least on older Macs).
QTest::qWait(100);
-#endif // Q_OS_OSX
+#endif // Q_OS_MACOS
// paster will perform hard-coded checks on the copied image.
QByteArray errorMessage;
QVERIFY2(runHelper(QStringLiteral("paster/paster"),
diff --git a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp
index 1af3bade0e..10a3746e36 100644
--- a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp
+++ b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp
@@ -607,7 +607,7 @@ void tst_QDialog::snapToDefaultButton()
+ QPoint(100, 100), QSize(200, 200));
const QPoint startingPos = dialogGeometry.bottomRight() + QPoint(100, 100);
QCursor::setPos(startingPos);
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
// On OS X we use CGEventPost to move the cursor, it needs at least
// some time before the event handled and the position really set.
QTest::qWait(100);
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index 2483d7b5bb..5ffbbdd400 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -75,7 +75,7 @@
#include <qtimer.h>
#include <QtWidgets/QDoubleSpinBox>
-#if defined(Q_OS_OSX)
+#if defined(Q_OS_MACOS)
#include "tst_qwidget_mac_helpers.h" // Abstract the ObjC stuff out so not everyone must run an ObjC++ compile.
#endif
@@ -110,7 +110,7 @@ static HWND winHandleOf(const QWidget *w)
# define Q_CHECK_PAINTEVENTS
#endif
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
#include <Security/AuthSession.h>
bool macHasAccessToWindowsServer()
{
@@ -216,7 +216,7 @@ private slots:
void restoreVersion1Geometry();
void widgetAt();
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
void setMask();
#endif
void optimizedResizeMove();
@@ -250,7 +250,7 @@ private slots:
void update();
void isOpaque();
-#ifndef Q_OS_OSX
+#ifndef Q_OS_MACOS
void scroll();
void scrollNativeChildren();
#endif
@@ -381,7 +381,7 @@ private slots:
void taskQTBUG_7532_tabOrderWithFocusProxy();
void movedAndResizedAttributes();
void childAt();
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
void taskQTBUG_11373();
#endif
void taskQTBUG_17333_ResizeInfiniteRecursion();
@@ -2301,7 +2301,7 @@ void tst_QWidget::activation()
void tst_QWidget::windowState()
{
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
QSKIP("QTBUG-52974");
#endif
@@ -2514,7 +2514,7 @@ void tst_QWidget::showMaximized()
void tst_QWidget::showFullScreen()
{
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
QSKIP("QTBUG-52974");
#endif
@@ -2834,14 +2834,14 @@ void tst_QWidget::showMinimizedKeepsFocus()
window.showNormal();
QApplication::setActiveWindow(&window);
QVERIFY(QTest::qWaitForWindowActive(&window));
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
if (!macHasAccessToWindowsServer())
QEXPECT_FAIL("", "When not having WindowServer access, we lose focus.", Continue);
#elif defined(Q_OS_WINRT)
QEXPECT_FAIL("", "Winrt fails here - QTBUG-68297", Continue);
#endif
QTRY_COMPARE(window.focusWidget(), firstchild);
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
if (!macHasAccessToWindowsServer())
QEXPECT_FAIL("", "When not having WindowServer access, we lose focus.", Continue);
#elif defined(Q_OS_WINRT)
@@ -2904,7 +2904,7 @@ void tst_QWidget::reparent()
// Qt/Embedded does it differently.
void tst_QWidget::icon()
{
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
QSKIP("QTBUG-52974");
#endif
@@ -2970,7 +2970,7 @@ void tst_QWidget::hideWhenFocusWidgetIsChild()
void tst_QWidget::normalGeometry()
{
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
QSKIP("QTBUG-52974");
#endif
@@ -3230,7 +3230,7 @@ public:
void tst_QWidget::lostUpdatesOnHide()
{
-#ifndef Q_OS_OSX
+#ifndef Q_OS_MACOS
UpdateWidget widget;
widget.setAttribute(Qt::WA_DontShowOnScreen);
widget.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
@@ -3271,7 +3271,7 @@ void tst_QWidget::raise()
parentPtr->show();
QVERIFY(QTest::qWaitForWindowExposed(parentPtr.data()));
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
if (child1->internalWinId()) {
QSKIP("Cocoa has no Z-Order for views, we hack it, but it results in paint events.");
}
@@ -3412,7 +3412,7 @@ void tst_QWidget::lower()
void tst_QWidget::stackUnder()
{
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
QSKIP("QTBUG-52974: Cocoa has no Z-Order for views, we hack it, but it results in paint events.");
#endif
@@ -3445,7 +3445,7 @@ void tst_QWidget::stackUnder()
for (UpdateWidget *child : qAsConst(allChildren)) {
int expectedPaintEvents = child == child4 ? 1 : 0;
-#if defined(Q_OS_WIN) || defined(Q_OS_OSX)
+#if defined(Q_OS_WIN) || defined(Q_OS_MACOS)
if (expectedPaintEvents == 1 && child->numPaintEvents == 2)
QEXPECT_FAIL(0, "Mac and Windows issues double repaints for Z-Order change", Continue);
#endif
@@ -3479,7 +3479,7 @@ void tst_QWidget::stackUnder()
for (UpdateWidget *child : qAsConst(allChildren)) {
int expectedZOrderChangeEvents = child == child1 ? 1 : 0;
if (child == child3) {
-#ifndef Q_OS_OSX
+#ifndef Q_OS_MACOS
QEXPECT_FAIL(0, "See QTBUG-493", Continue);
#endif
QCOMPARE(child->numPaintEvents, 0);
@@ -3579,7 +3579,7 @@ void tst_QWidget::testContentsPropagation()
void tst_QWidget::saveRestoreGeometry()
{
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
QSKIP("QTBUG-52974");
#endif
@@ -3817,7 +3817,7 @@ void tst_QWidget::restoreVersion1Geometry()
void tst_QWidget::widgetAt()
{
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
QSKIP("QTBUG-52974");
#endif
@@ -4020,7 +4020,7 @@ void tst_QWidget::testDeletionInEventHandlers()
delete w;
}
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
class MaskedPainter : public QWidget
{
public:
@@ -4887,7 +4887,7 @@ void tst_QWidget::update()
QCOMPARE(sibling.numPaintEvents, 1);
QCOMPARE(sibling.paintedRegion, sibling.visibleRegion());
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
if (child.internalWinId()) // child is native
QEXPECT_FAIL(0, "Cocoa compositor paints child and sibling", Continue);
#endif
@@ -4904,7 +4904,7 @@ void tst_QWidget::update()
}
}
-#ifndef Q_OS_OSX
+#ifndef Q_OS_MACOS
static inline bool isOpaque(QWidget *widget)
{
if (!widget)
@@ -4915,7 +4915,7 @@ static inline bool isOpaque(QWidget *widget)
void tst_QWidget::isOpaque()
{
-#ifndef Q_OS_OSX
+#ifndef Q_OS_MACOS
QWidget w;
QVERIFY(::isOpaque(&w));
@@ -4987,7 +4987,7 @@ void tst_QWidget::isOpaque()
#endif
}
-#ifndef Q_OS_OSX
+#ifndef Q_OS_MACOS
/*
Test that scrolling of a widget invalidates the correct regions
*/
@@ -5431,7 +5431,7 @@ void tst_QWidget::windowMoveResize()
widget.move(r.topLeft());
widget.resize(r.size());
QApplication::processEvents();
-#if defined(Q_OS_OSX)
+#if defined(Q_OS_MACOS)
if (r.width() == 0 && r.height() > 0) {
widget.move(r.topLeft());
widget.resize(r.size());
@@ -5502,7 +5502,7 @@ void tst_QWidget::windowMoveResize()
widget.move(r.topLeft());
widget.resize(r.size());
QApplication::processEvents();
-#if defined(Q_OS_OSX)
+#if defined(Q_OS_MACOS)
if (r.width() == 0 && r.height() > 0) {
widget.move(r.topLeft());
widget.resize(r.size());
@@ -5689,7 +5689,7 @@ void tst_QWidget::moveChild()
QTRY_COMPARE(pos, child.pos());
QTRY_COMPARE(parent.r, QRegion(oldGeometry) - child.geometry());
-#if !defined(Q_OS_OSX)
+#if !defined(Q_OS_MACOS)
// should be scrolled in backingstore
QCOMPARE(child.r, QRegion());
#endif
@@ -5739,7 +5739,7 @@ void tst_QWidget::showAndMoveChild()
void tst_QWidget::subtractOpaqueSiblings()
{
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
QSKIP("QTBUG-52974: Cocoa only has rect granularity.");
#endif
@@ -5816,7 +5816,7 @@ public slots:
void tst_QWidget::multipleToplevelFocusCheck()
{
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
QSKIP("QTBUG-52974");
#endif
@@ -7584,7 +7584,7 @@ void tst_QWidget::render_systemClip()
// rrrrrrrrrr
// ...
-#ifndef Q_OS_OSX
+#ifndef Q_OS_MACOS
for (int i = 0; i < image.height(); ++i) {
for (int j = 0; j < image.width(); ++j) {
if (i < 50 && j < i)
@@ -8618,11 +8618,11 @@ void tst_QWidget::sendUpdateRequestImmediately()
void tst_QWidget::doubleRepaint()
{
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
QSKIP("QTBUG-52974");
#endif
-#if defined(Q_OS_OSX)
+#if defined(Q_OS_MACOS)
if (!macHasAccessToWindowsServer())
QSKIP("Not having window server access causes the wrong number of repaints to be issues");
#endif
@@ -9330,7 +9330,7 @@ void tst_QWidget::setClearAndResizeMask()
child.setMask(childMask);
QTRY_COMPARE(child.mask(), childMask);
// and ensure that the child widget doesn't get any update.
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
// Mac always issues a full update when calling setMask, and we cannot force it to not do so.
if (child.internalWinId())
QCOMPARE(child.numPaintEvents, 1);
@@ -9352,7 +9352,7 @@ void tst_QWidget::setClearAndResizeMask()
// and ensure that that the child widget gets an update for the area outside the old mask.
QTRY_COMPARE(child.numPaintEvents, 1);
outsideOldMask = child.rect();
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
// Mac always issues a full update when calling setMask, and we cannot force it to not do so.
if (!child.internalWinId())
#endif
@@ -9366,7 +9366,7 @@ void tst_QWidget::setClearAndResizeMask()
// Mask child widget with a mask that is bigger than the rect
child.setMask(QRegion(0, 0, 1000, 1000));
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
// Mac always issues a full update when calling setMask, and we cannot force it to not do so.
if (child.internalWinId())
QTRY_COMPARE(child.numPaintEvents, 1);
@@ -9379,7 +9379,7 @@ void tst_QWidget::setClearAndResizeMask()
// ...and the same applies when clearing the mask.
child.clearMask();
QTest::qWait(100);
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
// Mac always issues a full update when calling setMask, and we cannot force it to not do so.
if (child.internalWinId())
QTRY_VERIFY(child.numPaintEvents > 0);
@@ -9409,7 +9409,7 @@ void tst_QWidget::setClearAndResizeMask()
QTimer::singleShot(100, &resizeChild, SLOT(shrinkMask()));
QTest::qWait(200);
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
// Mac always issues a full update when calling setMask, and we cannot force it to not do so.
if (child.internalWinId())
QTRY_COMPARE(resizeChild.paintedRegion, resizeChild.mask());
@@ -9421,7 +9421,7 @@ void tst_QWidget::setClearAndResizeMask()
const QRegion oldMask = resizeChild.mask();
QTimer::singleShot(0, &resizeChild, SLOT(enlargeMask()));
QTest::qWait(100);
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
// Mac always issues a full update when calling setMask, and we cannot force it to not do so.
if (child.internalWinId())
QTRY_COMPARE(resizeChild.paintedRegion, resizeChild.mask());
@@ -10265,7 +10265,7 @@ void tst_QWidget::childAt()
QCOMPARE(parent.childAt(120, 120), grandChild);
}
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
void tst_QWidget::taskQTBUG_11373()
{
@@ -11121,7 +11121,7 @@ public:
// when mousing over it.
void tst_QWidget::taskQTBUG_27643_enterEvents()
{
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
QSKIP("QTBUG-52974: this test can crash!");
#endif
// Move the mouse cursor to a safe location so it won't interfere
diff --git a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
index 0ae2e6626f..82527849b0 100644
--- a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
+++ b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
@@ -995,7 +995,7 @@ void tst_QStyleSheetStyle::focusColors()
#ifndef QT_NO_CURSOR
void tst_QStyleSheetStyle::hoverColors()
{
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
QSKIP("This test is fragile on Mac, most likely due to QTBUG-33959.");
#endif
if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
diff --git a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
index b255930138..53f1e1fc5c 100644
--- a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
+++ b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
@@ -1525,7 +1525,7 @@ void tst_QMenuBar::cornerWidgets()
QFETCH(Qt::Corner, corner);
-#if defined(Q_OS_OSX)
+#if defined(Q_OS_MACOS)
QSKIP("Test interferes with native menu bars on this platform");
#endif
diff --git a/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp b/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp
index 17a5fe2cd9..7d70d49019 100644
--- a/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp
+++ b/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp
@@ -579,7 +579,7 @@ bool verifyColor(const QWidget *widget, const QRect &clipArea, const QColor &col
void tst_QOpenGLWidget::stackWidgetOpaqueChildIsVisible()
{
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MACOS
QSKIP("QScreen::grabWindow() doesn't work properly on OSX HighDPI screen: QTBUG-46803");
return;
#endif