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:
@@ -62,7 +62,7 @@ const QVector<QStringList>& ConfigShortcuts::captureShortcutsDefault(
|
||||
|
||||
m_shortcuts << (QStringList() << "" << QObject::tr("Quit capture")
|
||||
<< QKeySequence(Qt::Key_Escape).toString());
|
||||
#if (defined(Q_OS_MAC64) || defined(Q_OS_MACOS))
|
||||
#if defined(Q_OS_MACOS)
|
||||
m_shortcuts << (QStringList()
|
||||
<< "" << QObject::tr("Screenshot history") << "⇧⌘⌥H");
|
||||
m_shortcuts << (QStringList()
|
||||
@@ -131,7 +131,7 @@ const QKeySequence& ConfigShortcuts::captureShortcutDefault(
|
||||
case CaptureToolButton::ButtonType::TYPE_IMAGEUPLOADER:
|
||||
m_ks = QKeySequence(Qt::Key_Return);
|
||||
break;
|
||||
#if not(defined(Q_OS_MAC64) || defined(Q_OS_MACOS))
|
||||
#if not defined(Q_OS_MACOS)
|
||||
case CaptureToolButton::ButtonType::TYPE_OPEN_APP:
|
||||
m_ks = QKeySequence(Qt::CTRL + Qt::Key_O);
|
||||
break;
|
||||
|
||||
@@ -39,7 +39,7 @@ ScreenGrabber::ScreenGrabber(QObject* parent)
|
||||
QPixmap ScreenGrabber::grabEntireDesktop(bool& ok)
|
||||
{
|
||||
ok = true;
|
||||
#if (defined(Q_OS_MAC64) || defined(Q_OS_MACOS))
|
||||
#if defined(Q_OS_MACOS)
|
||||
QScreen* currentScreen = QGuiAppCurrentScreen().currentScreen();
|
||||
QPixmap screenPixmap(
|
||||
currentScreen->grabWindow(QApplication::desktop()->winId(),
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <QApplication>
|
||||
#include <QUrl>
|
||||
|
||||
#if not(defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || defined(Q_OS_WIN))
|
||||
#if not(defined(Q_OS_MACOS) || defined(Q_OS_WIN))
|
||||
#include <QDBusConnection>
|
||||
#include <QDBusInterface>
|
||||
#include <QDBusMessage>
|
||||
@@ -14,7 +14,7 @@ SystemNotification::SystemNotification(QObject* parent)
|
||||
: QObject(parent)
|
||||
, m_interface(nullptr)
|
||||
{
|
||||
#if not(defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || defined(Q_OS_WIN))
|
||||
#if not(defined(Q_OS_MACOS) || defined(Q_OS_WIN))
|
||||
m_interface =
|
||||
new QDBusInterface(QStringLiteral("org.freedesktop.Notifications"),
|
||||
QStringLiteral("/org/freedesktop/Notifications"),
|
||||
@@ -39,7 +39,7 @@ void SystemNotification::sendMessage(const QString& text,
|
||||
return;
|
||||
}
|
||||
|
||||
#if defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || defined(Q_OS_WIN)
|
||||
#if defined(Q_OS_MACOS) || defined(Q_OS_WIN)
|
||||
Controller::getInstance()->sendTrayNotification(text, title, timeout);
|
||||
#else
|
||||
QList<QVariant> args;
|
||||
|
||||
Reference in New Issue
Block a user