Replace Q_OS_OSX with Q_OS_MACOS

Pick-to: 6.5 6.6
Change-Id: I1e408b9676a9bfc299dcd45f1c790827e316db30
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Tor Arne Vestbø 2023-06-07 01:56:52 +02:00
parent 2dc17a45fb
commit bec0b8a05d
6 changed files with 9 additions and 9 deletions

View File

@ -9,7 +9,7 @@ int main(int argc, char *argv[])
QGuiApplication app(argc, argv);
//![0]
QQuickView view;
#ifdef Q_OS_OSX
#ifdef Q_OS_MACOS
view.engine()->addImportPath(app.applicationDirPath() + "/../PlugIns");
#endif
//![0]

View File

@ -441,7 +441,7 @@ QQuickMultiPointTouchArea::QQuickMultiPointTouchArea(QQuickItem *parent)
setFlag(QQuickItem::ItemHasContents);
}
setAcceptTouchEvents(true);
#ifdef Q_OS_OSX
#ifdef Q_OS_MACOS
setAcceptHoverEvents(true); // needed to enable touch events on mouse hover.
#endif
}
@ -745,7 +745,7 @@ void QQuickMultiPointTouchArea::addTouchPoint(const QMouseEvent *e)
_mouseTouchPoint = dtp;
}
#ifdef Q_OS_OSX
#ifdef Q_OS_MACOS
void QQuickMultiPointTouchArea::hoverEnterEvent(QHoverEvent *event)
{
setTouchEventsEnabled(isEnabled());
@ -776,7 +776,7 @@ void QQuickMultiPointTouchArea::itemChange(ItemChange change, const ItemChangeDa
setAcceptHoverEvents(data.boolValue);
QQuickItem::itemChange(change, data);
}
#endif // Q_OS_OSX
#endif // Q_OS_MACOS
void QQuickMultiPointTouchArea::addTouchPrototype(QQuickTouchPoint *prototype)
{

View File

@ -263,7 +263,7 @@ protected:
bool shouldFilter(QEvent *event);
void grabGesture(QPointingDevice *dev);
QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override;
#ifdef Q_OS_OSX
#ifdef Q_OS_MACOS
void hoverEnterEvent(QHoverEvent *event) override;
void hoverLeaveEvent(QHoverEvent *event) override;
void setTouchEventsEnabled(bool enable);

View File

@ -247,7 +247,7 @@ QQuickPinchArea::QQuickPinchArea(QQuickItem *parent)
Q_D(QQuickPinchArea);
d->init();
setAcceptTouchEvents(true);
#ifdef Q_OS_OSX
#ifdef Q_OS_MACOS
setAcceptHoverEvents(true); // needed to enable touch events on mouse hover.
#endif
}

View File

@ -21,7 +21,7 @@ qreal QQuickLayoutStyleInfo::spacing(Qt::Orientation /*orientation*/) const
qreal spacing = 5.0;
#endif
#ifndef Q_OS_OSX
#ifndef Q_OS_MACOS
// On OS X the DPI is always 72 so we should not scale it
spacing = qRound(spacing * (qreal(qt_defaultDpiX()) / 96.0));
#endif

View File

@ -17,7 +17,7 @@
#include <private/qglobal_p.h>
#ifdef Q_OS_OSX
#ifdef Q_OS_MACOS
#include <Carbon/Carbon.h>
#endif
@ -29,7 +29,7 @@ struct PlatformQuirks
{
#if !QT_CONFIG(clipboard)
return false;
#elif defined(Q_OS_OSX)
#elif defined(Q_OS_MACOS)
PasteboardRef pasteboard;
OSStatus status = PasteboardCreate(0, &pasteboard);
if (status == noErr)