Code refactoring - remove Q_OS_MAC64 (is not required, is covered by Q_OS_DARWIN)
(cherry picked from commit e511b521cec6edd9f77916c6ee753329326a5f91)
This commit is contained in:
@@ -92,8 +92,7 @@ CaptureWidget::CaptureWidget(const uint id,
|
||||
initContext(savePath, fullScreen);
|
||||
initShortcuts();
|
||||
m_context.circleCount = 1;
|
||||
#if (defined(Q_OS_WIN) || defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || \
|
||||
defined(Q_OS_MACX))
|
||||
#if (defined(Q_OS_WIN) || defined(Q_OS_MACOS))
|
||||
// Top left of the whole set of screens
|
||||
QPoint topLeft(0, 0);
|
||||
#endif
|
||||
@@ -120,7 +119,7 @@ CaptureWidget::CaptureWidget(const uint id,
|
||||
}
|
||||
move(topLeft);
|
||||
resize(pixmap().size());
|
||||
#elif (defined(Q_OS_MAC64) || defined(Q_OS_MACOS))
|
||||
#elif defined(Q_OS_MACOS)
|
||||
// Emulate fullscreen mode
|
||||
// setWindowFlags(Qt::WindowStaysOnTopHint |
|
||||
// Qt::BypassWindowManagerHint |
|
||||
@@ -147,7 +146,7 @@ CaptureWidget::CaptureWidget(const uint id,
|
||||
topLeftOffset - topLeft;
|
||||
#endif
|
||||
|
||||
#if (defined(Q_OS_MAC64) || defined(Q_OS_MACOS))
|
||||
#if defined(Q_OS_MACOS)
|
||||
// MacOS works just with one active display, so we need to append
|
||||
// just one current display and keep multiple displays logic for
|
||||
// other OS
|
||||
@@ -334,7 +333,7 @@ void CaptureWidget::paintEvent(QPaintEvent*)
|
||||
painter.setClipRect(rect());
|
||||
|
||||
if (m_showInitialMsg) {
|
||||
#if (defined(Q_OS_MAC64) || defined(Q_OS_MACOS))
|
||||
#if defined(Q_OS_MACOS)
|
||||
QRect helpRect;
|
||||
QScreen* currentScreen = QGuiAppCurrentScreen().currentScreen();
|
||||
if (currentScreen) {
|
||||
@@ -763,7 +762,7 @@ void CaptureWidget::initPanel()
|
||||
m_panel = new UtilityPanel(this);
|
||||
m_panel->hide();
|
||||
makeChild(m_panel);
|
||||
#if (defined(Q_OS_MAC64) || defined(Q_OS_MACOS))
|
||||
#if defined(Q_OS_MACOS)
|
||||
QScreen* currentScreen = QGuiAppCurrentScreen().currentScreen();
|
||||
panelRect.moveTo(mapFromGlobal(panelRect.topLeft()));
|
||||
m_panel->setFixedWidth(m_colorPicker->width() * 1.5);
|
||||
@@ -810,7 +809,7 @@ void CaptureWidget::showAppUpdateNotification(const QString& appLatestVersion,
|
||||
m_updateNotificationWidget =
|
||||
new UpdateNotificationWidget(this, appLatestVersion, appLatestUrl);
|
||||
}
|
||||
#if (defined(Q_OS_MAC64) || defined(Q_OS_MACOS))
|
||||
#if defined(Q_OS_MACOS)
|
||||
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();
|
||||
@@ -1233,7 +1232,7 @@ void CaptureWidget::copyScreenshot()
|
||||
|
||||
void CaptureWidget::saveScreenshot()
|
||||
{
|
||||
#if (defined(Q_OS_MAC64) || defined(Q_OS_MACOS))
|
||||
#if defined(Q_OS_MACOS)
|
||||
showNormal();
|
||||
#endif
|
||||
m_captureDone = true;
|
||||
|
||||
Reference in New Issue
Block a user