mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
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:
parent
a9ad26b035
commit
9f4ac1f260
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user