diff options
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/dialogs/qfiledialog.cpp | 2 | ||||
-rw-r--r-- | src/widgets/itemviews/qabstractitemview.cpp | 4 | ||||
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 2 | ||||
-rw-r--r-- | src/widgets/kernel/qgesturemanager.cpp | 6 | ||||
-rw-r--r-- | src/widgets/kernel/qwidgetwindow.cpp | 4 | ||||
-rw-r--r-- | src/widgets/widgets/qabstractscrollarea.cpp | 2 | ||||
-rw-r--r-- | src/widgets/widgets/qcombobox.cpp | 6 | ||||
-rw-r--r-- | src/widgets/widgets/qmainwindow.cpp | 10 | ||||
-rw-r--r-- | src/widgets/widgets/qmenu.cpp | 6 | ||||
-rw-r--r-- | src/widgets/widgets/qmenu.h | 2 | ||||
-rw-r--r-- | src/widgets/widgets/qmenu_p.h | 2 | ||||
-rw-r--r-- | src/widgets/widgets/qtabbar.cpp | 4 | ||||
-rw-r--r-- | src/widgets/widgets/qtoolbar.cpp | 12 | ||||
-rw-r--r-- | src/widgets/widgets/qtoolbar_p.h | 4 | ||||
-rw-r--r-- | src/widgets/widgets/qtoolbarlayout.cpp | 4 |
15 files changed, 35 insertions, 35 deletions
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; |