bug-fix: add Q_OS_MAC for check

Qt 5.7 seems to use Q_OS_MAC instead of Q_OS_MACOS.
This commit is contained in:
Le Tan 2017-06-25 18:36:05 +08:00
parent a9ad26b035
commit 9f4ac1f260
2 changed files with 4 additions and 4 deletions

View File

@ -344,7 +344,7 @@ static int percentageToBlockNumber(const QTextDocument *p_doc, int p_percent)
// See if @p_modifiers is Control which is different on macOs and Windows.
static bool isControlModifier(int p_modifiers)
{
#if defined(Q_OS_MACOS)
#if defined(Q_OS_MACOS) || defined(Q_OS_MAC)
return p_modifiers == Qt::MetaModifier;
#else
return p_modifiers == Qt::ControlModifier;

View File

@ -924,7 +924,7 @@ void VMainWindow::initRenderBackgroundMenu(QMenu *menu)
tmpAct->setCheckable(true);
tmpAct->setData(bgColors[i].name);
#if !defined(Q_OS_MACOS)
#if !defined(Q_OS_MACOS) && !defined(Q_OS_MAC)
tmpAct->setIcon(QIcon(predefinedColorPixmaps[i]));
#endif
@ -1011,7 +1011,7 @@ void VMainWindow::initEditorBackgroundMenu(QMenu *menu)
tmpAct->setToolTip(tr("Set as the background color for editor"));
tmpAct->setCheckable(true);
tmpAct->setData(bgColors[i].name);
#if !defined(Q_OS_MACOS)
#if !defined(Q_OS_MACOS) && !defined(Q_OS_MAC)
tmpAct->setIcon(QIcon(predefinedColorPixmaps[i]));
#endif
if (curBgColor == bgColors[i].name) {
@ -1529,7 +1529,7 @@ QAction *VMainWindow::newAction(const QIcon &p_icon,
const QString &p_text,
QObject *p_parent)
{
#if defined(Q_OS_MACOS)
#if defined(Q_OS_MACOS) || defined(Q_OS_MAC)
Q_UNUSED(p_icon);
return new QAction(p_text, p_parent);
#else