diff --git a/src/Gui/Application.cpp b/src/Gui/Application.cpp index 3031951c82..7b7c2fc31e 100644 --- a/src/Gui/Application.cpp +++ b/src/Gui/Application.cpp @@ -2026,7 +2026,7 @@ void setAppNameAndIcon() else { QApplication::setApplicationName(QString::fromStdString(App::Application::getExecutableName())); } -#ifndef Q_OS_MACX +#ifndef Q_OS_MACOS QApplication::setWindowIcon( Gui::BitmapFactory().pixmap(App::Application::Config()["AppIcon"].c_str())); #endif diff --git a/src/Gui/Assistant.cpp b/src/Gui/Assistant.cpp index 83a2c90c24..22558b8f54 100644 --- a/src/Gui/Assistant.cpp +++ b/src/Gui/Assistant.cpp @@ -80,7 +80,7 @@ bool Assistant::startAssistant() QString app; app = QDir::toNativeSeparators(QString::fromStdString (App::Application::getHomePath()) + QLatin1String("bin/")); -#elif defined(Q_OS_MAC) +#elif defined(Q_OS_APPLE) QString app = QCoreApplication::applicationDirPath() + QDir::separator(); #else #if QT_VERSION < QT_VERSION_CHECK(6,0,0) diff --git a/src/Gui/CommandView.cpp b/src/Gui/CommandView.cpp index f9b2d408ae..c1e68934e8 100644 --- a/src/Gui/CommandView.cpp +++ b/src/Gui/CommandView.cpp @@ -2690,7 +2690,7 @@ public: qreal pRatio = widget->devicePixelRatioF(); qreal hotXF = hotX; qreal hotYF = hotY; -#if !defined(Q_OS_WIN32) && !defined(Q_OS_MAC) +#if !defined(Q_OS_WIN32) && !defined(Q_OS_MACOS) if (qApp->platformName() == QLatin1String("xcb")) { hotXF *= pRatio; hotYF *= pRatio; diff --git a/src/Gui/DlgExpressionInput.cpp b/src/Gui/DlgExpressionInput.cpp index 632f1a29df..270142838a 100644 --- a/src/Gui/DlgExpressionInput.cpp +++ b/src/Gui/DlgExpressionInput.cpp @@ -94,7 +94,7 @@ DlgExpressionInput::DlgExpressionInput(const App::ObjectIdentifier & _path, ("User parameter:BaseApp/Preferences/Expression")->GetBool("NoSystemBackground", false); if (noBackground) { -#if defined(Q_OS_MAC) +#if defined(Q_OS_MACOS) setWindowFlags(Qt::Widget | Qt::Popup | Qt::FramelessWindowHint); #else setWindowFlags(Qt::SubWindow | Qt::Widget | Qt::Popup | Qt::FramelessWindowHint); diff --git a/src/Gui/FileDialog.cpp b/src/Gui/FileDialog.cpp index fc24dec76f..2c96211a2d 100644 --- a/src/Gui/FileDialog.cpp +++ b/src/Gui/FileDialog.cpp @@ -673,7 +673,7 @@ FileChooser::FileChooser ( QWidget * parent ) button = new QPushButton(QLatin1String("..."), this); -#if defined (Q_OS_MAC) +#if defined (Q_OS_MACOS) button->setAttribute(Qt::WA_LayoutUsesWidgetRect); // layout size from QMacStyle was not correct #endif diff --git a/src/Gui/GuiApplicationNativeEventAware.cpp b/src/Gui/GuiApplicationNativeEventAware.cpp index 3c2bdec531..ba41901472 100644 --- a/src/Gui/GuiApplicationNativeEventAware.cpp +++ b/src/Gui/GuiApplicationNativeEventAware.cpp @@ -41,7 +41,7 @@ #endif #elif defined(Q_OS_WIN) #include "3Dconnexion/GuiNativeEventWin32.h" -#elif defined(Q_OS_MACX) +#elif defined(Q_OS_MACOS) #include "3Dconnexion/GuiNativeEventMac.h" #endif // Platform switch #endif // Spacemice diff --git a/src/Gui/PythonConsole.cpp b/src/Gui/PythonConsole.cpp index 718e79cf73..b79e165064 100644 --- a/src/Gui/PythonConsole.cpp +++ b/src/Gui/PythonConsole.cpp @@ -1264,7 +1264,7 @@ void PythonConsole::runSourceFromMimeData(const QString& source) #elif defined(Q_OS_WIN32) // Need to convert CRLF to LF text.replace(QLatin1String("\r\n"), QLatin1String("\n")); -#elif defined(Q_OS_MAC) +#elif defined(Q_OS_APPLE) //need to convert CR to LF text.replace(QLatin1Char('\r'), QLatin1Char('\n')); #endif diff --git a/src/Gui/QSint/actionpanel/freecadscheme.cpp b/src/Gui/QSint/actionpanel/freecadscheme.cpp index e9da9e5917..6340493a86 100644 --- a/src/Gui/QSint/actionpanel/freecadscheme.cpp +++ b/src/Gui/QSint/actionpanel/freecadscheme.cpp @@ -137,7 +137,7 @@ FreeCADPanelScheme::FreeCADPanelScheme() : ActionPanelScheme() ActionPanelScheme* panelStyle = WinXPPanelScheme2::defaultScheme(); actionStyle = QString(ActionPanelFreeCAD); -#elif defined(Q_OS_MAC) +#elif defined(Q_OS_MACOS) ActionPanelScheme* panelStyle = MacPanelScheme::defaultScheme(); actionStyle = panelStyle->actionStyle; diff --git a/src/Gui/SoFCCSysDragger.cpp b/src/Gui/SoFCCSysDragger.cpp index 3ec2c397f0..8bf56efb17 100644 --- a/src/Gui/SoFCCSysDragger.cpp +++ b/src/Gui/SoFCCSysDragger.cpp @@ -96,7 +96,7 @@ TDragger::TDragger() { SO_KIT_CONSTRUCTOR(TDragger); -#if defined(Q_OS_MAC) +#if defined(Q_OS_APPLE) this->ref(); #endif @@ -400,7 +400,7 @@ void TPlanarDragger::initClass() TPlanarDragger::TPlanarDragger() { SO_KIT_CONSTRUCTOR(TPlanarDragger); -#if defined(Q_OS_MAC) +#if defined(Q_OS_APPLE) this->ref(); #endif @@ -698,7 +698,7 @@ void RDragger::initClass() RDragger::RDragger() { SO_KIT_CONSTRUCTOR(RDragger); -#if defined(Q_OS_MAC) +#if defined(Q_OS_APPLE) this->ref(); #endif diff --git a/src/Gui/ToolHandler.cpp b/src/Gui/ToolHandler.cpp index 722aa197fd..51c6d8f36f 100644 --- a/src/Gui/ToolHandler.cpp +++ b/src/Gui/ToolHandler.cpp @@ -123,7 +123,7 @@ void ToolHandler::setSvgCursor(const QString& cursorName, qreal defaultCursorSize = isRatioOne ? 64 : 32; qreal hotX = x; qreal hotY = y; -#if !defined(Q_OS_WIN32) && !defined(Q_OS_MAC) +#if !defined(Q_OS_WIN32) && !defined(Q_OS_APPLE) if (qGuiApp->platformName() == QLatin1String("xcb")) { hotX *= pRatio; hotY *= pRatio; @@ -157,7 +157,7 @@ void ToolHandler::setCursor(const QPixmap& p, int x, int y, bool autoScale) p1.setDevicePixelRatio(pRatio); qreal hotX = x; qreal hotY = y; -#if !defined(Q_OS_WIN32) && !defined(Q_OS_MAC) +#if !defined(Q_OS_WIN32) && !defined(Q_OS_APPLE) if (qGuiApp->platformName() == QLatin1String("xcb")) { hotX *= pRatio; hotY *= pRatio; diff --git a/src/Gui/Widgets.cpp b/src/Gui/Widgets.cpp index 0692f97765..8b7e122c48 100644 --- a/src/Gui/Widgets.cpp +++ b/src/Gui/Widgets.cpp @@ -1069,7 +1069,7 @@ LabelButton::LabelButton (QWidget * parent) layout->addWidget(label); button = new QPushButton(QLatin1String("..."), this); -#if defined (Q_OS_MAC) +#if defined (Q_OS_MACOS) button->setAttribute(Qt::WA_LayoutUsesWidgetRect); // layout size from QMacStyle was not correct #endif layout->addWidget(button); @@ -1456,7 +1456,7 @@ LabelEditor::LabelEditor (QWidget * parent) this, &LabelEditor::validateText); button = new QPushButton(QLatin1String("..."), this); -#if defined (Q_OS_MAC) +#if defined (Q_OS_MACOS) button->setAttribute(Qt::WA_LayoutUsesWidgetRect); // layout size from QMacStyle was not correct #endif layout->addWidget(button); diff --git a/src/Gui/propertyeditor/PropertyItem.cpp b/src/Gui/propertyeditor/PropertyItem.cpp index ef9851a67d..a0da598b0f 100644 --- a/src/Gui/propertyeditor/PropertyItem.cpp +++ b/src/Gui/propertyeditor/PropertyItem.cpp @@ -1600,7 +1600,7 @@ PropertyEditorWidget::PropertyEditorWidget (QWidget * parent) layout->addWidget(lineEdit); button = new QPushButton(QLatin1String("..."), this); -#if defined (Q_OS_MAC) +#if defined (Q_OS_MACOS) button->setAttribute(Qt::WA_LayoutUsesWidgetRect); // layout size from QMacStyle was not correct #endif layout->addWidget(button); @@ -4574,7 +4574,7 @@ LinkLabel::LinkLabel (QWidget * parent, const App::Property *prop) layout->addWidget(label); editButton = new QPushButton(QLatin1String("..."), this); -#if defined (Q_OS_MAC) +#if defined (Q_OS_MACOS) editButton->setAttribute(Qt::WA_LayoutUsesWidgetRect); // layout size from QMacStyle was not correct #endif editButton->setToolTip(tr("Change the linked object")); diff --git a/src/Mod/TechDraw/Gui/QGVPage.cpp b/src/Mod/TechDraw/Gui/QGVPage.cpp index 104f851fdb..29bdcc7cff 100644 --- a/src/Mod/TechDraw/Gui/QGVPage.cpp +++ b/src/Mod/TechDraw/Gui/QGVPage.cpp @@ -586,7 +586,7 @@ QPixmap QGVPage::prepareCursorPixmap(const char* iconName, QPoint& hotspot) // the 64x64 based hotspot position for our 32x32 based cursor pixmaps accordingly floatHotspot *= 0.5; -#if !defined(Q_OS_WIN32) && !defined(Q_OS_MAC) +#if !defined(Q_OS_WIN32) && !defined(Q_OS_MACOS) // On XCB platform, the pixmap device pixel ratio is not taken into account for cursor hot spot, // therefore we must take care of the transformation ourselves... // Refer to QTBUG-68571 - https://bugreports.qt.io/browse/QTBUG-68571