diff --git a/src/utils/screenshotsaver.cpp b/src/utils/screenshotsaver.cpp index 8d91e12a..c568f68a 100644 --- a/src/utils/screenshotsaver.cpp +++ b/src/utils/screenshotsaver.cpp @@ -27,8 +27,7 @@ #include #include #include -#if (defined(Q_OS_MAC) || defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || \ - defined(Q_OS_MACX)) +#if (defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || defined(Q_OS_MACX)) #include "src/widgets/capture/capturewidget.h" #endif @@ -121,8 +120,7 @@ bool ScreenshotSaver::saveToFilesystemGUI(const QPixmap& capture) while (!ok) { ConfigHandler config; QString savePath = FileNameHandler().absoluteSavePath(); -#if (defined(Q_OS_MAC) || defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || \ - defined(Q_OS_MACX)) +#if (defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || defined(Q_OS_MACX)) for (QWidget* widget : qApp->topLevelWidgets()) { QString className(widget->metaObject()->className()); if (0 == className.compare( diff --git a/src/widgets/capture/capturewidget.cpp b/src/widgets/capture/capturewidget.cpp index df10d254..98d0be33 100644 --- a/src/widgets/capture/capturewidget.cpp +++ b/src/widgets/capture/capturewidget.cpp @@ -92,8 +92,8 @@ CaptureWidget::CaptureWidget(const uint id, initContext(savePath, fullScreen); initShortcuts(); m_context.circleCount = 1; -#if (defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(Q_OS_MAC64) || \ - defined(Q_OS_MACOS) || defined(Q_OS_MACX)) +#if (defined(Q_OS_WIN) || defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || \ + defined(Q_OS_MACX)) // Top left of the whole set of screens QPoint topLeft(0, 0); #endif @@ -120,8 +120,7 @@ CaptureWidget::CaptureWidget(const uint id, } move(topLeft); resize(pixmap().size()); -#elif (defined(Q_OS_MAC) || defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || \ - defined(Q_OS_MACX)) +#elif (defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || defined(Q_OS_MACX)) // Emulate fullscreen mode // setWindowFlags(Qt::WindowStaysOnTopHint | // Qt::BypassWindowManagerHint | @@ -148,8 +147,7 @@ CaptureWidget::CaptureWidget(const uint id, topLeftOffset - topLeft; #endif -#if (defined(Q_OS_MAC) || defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || \ - defined(Q_OS_MACX)) +#if (defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || defined(Q_OS_MACX)) // MacOS works just with one active display, so we need to append // just one current display and keep multiple displays logic for // other OS @@ -336,8 +334,7 @@ void CaptureWidget::paintEvent(QPaintEvent*) painter.setClipRect(rect()); if (m_showInitialMsg) { -#if (defined(Q_OS_MAC) || defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || \ - defined(Q_OS_MACX)) +#if (defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || defined(Q_OS_MACX)) QRect helpRect; QScreen* currentScreen = QGuiAppCurrentScreen().currentScreen(); if (currentScreen) { @@ -766,8 +763,7 @@ void CaptureWidget::initPanel() m_panel = new UtilityPanel(this); m_panel->hide(); makeChild(m_panel); -#if (defined(Q_OS_MAC) || defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || \ - defined(Q_OS_MACX)) +#if (defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || defined(Q_OS_MACX)) QScreen* currentScreen = QGuiAppCurrentScreen().currentScreen(); panelRect.moveTo(mapFromGlobal(panelRect.topLeft())); m_panel->setFixedWidth(m_colorPicker->width() * 1.5); @@ -814,8 +810,7 @@ void CaptureWidget::showAppUpdateNotification(const QString& appLatestVersion, m_updateNotificationWidget = new UpdateNotificationWidget(this, appLatestVersion, appLatestUrl); } -#if (defined(Q_OS_MAC) || defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || \ - defined(Q_OS_MACX)) +#if (defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || defined(Q_OS_MACX)) int ax = (width() - m_updateNotificationWidget->width()) / 2; #elif (defined(Q_OS_LINUX) && QT_VERSION < QT_VERSION_CHECK(5, 10, 0)) QRect helpRect = QGuiApplication::primaryScreen()->geometry(); @@ -1238,8 +1233,7 @@ void CaptureWidget::copyScreenshot() void CaptureWidget::saveScreenshot() { -#if (defined(Q_OS_MAC) || defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || \ - defined(Q_OS_MACX)) +#if (defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || defined(Q_OS_MACX)) showNormal(); #endif m_captureDone = true;