mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 22:09: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.
|
// See if @p_modifiers is Control which is different on macOs and Windows.
|
||||||
static bool isControlModifier(int p_modifiers)
|
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;
|
return p_modifiers == Qt::MetaModifier;
|
||||||
#else
|
#else
|
||||||
return p_modifiers == Qt::ControlModifier;
|
return p_modifiers == Qt::ControlModifier;
|
||||||
|
@ -924,7 +924,7 @@ void VMainWindow::initRenderBackgroundMenu(QMenu *menu)
|
|||||||
tmpAct->setCheckable(true);
|
tmpAct->setCheckable(true);
|
||||||
tmpAct->setData(bgColors[i].name);
|
tmpAct->setData(bgColors[i].name);
|
||||||
|
|
||||||
#if !defined(Q_OS_MACOS)
|
#if !defined(Q_OS_MACOS) && !defined(Q_OS_MAC)
|
||||||
tmpAct->setIcon(QIcon(predefinedColorPixmaps[i]));
|
tmpAct->setIcon(QIcon(predefinedColorPixmaps[i]));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1011,7 +1011,7 @@ void VMainWindow::initEditorBackgroundMenu(QMenu *menu)
|
|||||||
tmpAct->setToolTip(tr("Set as the background color for editor"));
|
tmpAct->setToolTip(tr("Set as the background color for editor"));
|
||||||
tmpAct->setCheckable(true);
|
tmpAct->setCheckable(true);
|
||||||
tmpAct->setData(bgColors[i].name);
|
tmpAct->setData(bgColors[i].name);
|
||||||
#if !defined(Q_OS_MACOS)
|
#if !defined(Q_OS_MACOS) && !defined(Q_OS_MAC)
|
||||||
tmpAct->setIcon(QIcon(predefinedColorPixmaps[i]));
|
tmpAct->setIcon(QIcon(predefinedColorPixmaps[i]));
|
||||||
#endif
|
#endif
|
||||||
if (curBgColor == bgColors[i].name) {
|
if (curBgColor == bgColors[i].name) {
|
||||||
@ -1529,7 +1529,7 @@ QAction *VMainWindow::newAction(const QIcon &p_icon,
|
|||||||
const QString &p_text,
|
const QString &p_text,
|
||||||
QObject *p_parent)
|
QObject *p_parent)
|
||||||
{
|
{
|
||||||
#if defined(Q_OS_MACOS)
|
#if defined(Q_OS_MACOS) || defined(Q_OS_MAC)
|
||||||
Q_UNUSED(p_icon);
|
Q_UNUSED(p_icon);
|
||||||
return new QAction(p_text, p_parent);
|
return new QAction(p_text, p_parent);
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user