Replace Q_OS_MAC with Q_OS_MACOS

This commit is contained in:
Luis Ángel San Martín
2023-06-04 20:55:11 +02:00
parent 072f73b986
commit 68ece533e1
27 changed files with 67 additions and 67 deletions

View File

@ -84,7 +84,7 @@ BookmarksDialog::BookmarksDialog(QWidget *parent)
l->addWidget(new QLabel("<font color=\"#FFFFFF\">" + tr("Click on any image to go to the bookmark") + "</font>"), 0, Qt::AlignCenter);
l->addLayout(layout);
#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
l->addLayout(buttons);
#endif

View File

@ -21,7 +21,7 @@ using namespace QsLogging;
#define new DEBUG_NEW
#endif
#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
#include <QEvent>
#include <QFileOpenEvent>
class YACReaderApplication : public QApplication
@ -106,7 +106,7 @@ int main(int argc, char *argv[])
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
#endif
#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
YACReaderApplication app(argc, argv);
#else
QApplication app(argc, argv);
@ -178,7 +178,7 @@ int main(int argc, char *argv[])
logger.addDestination(std::move(fileDestination));
QTranslator translator;
#if defined Q_OS_UNIX && !defined Q_OS_MAC
#if defined Q_OS_UNIX && !defined Q_OS_MACOS
translator.load(QLocale(), "yacreader", "_", QString(DATADIR) + "/yacreader/languages");
#else
translator.load(QLocale(), "yacreader", "_", "languages");
@ -202,7 +202,7 @@ int main(int argc, char *argv[])
mwv->openComicFromPath(arglist.at(0));
}
#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
app.setWindow(mwv);
#endif
mwv->show();

View File

@ -187,7 +187,7 @@ void MainWindowViewer::createActions()
openAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(OPEN_ACTION_Y));
connect(openAction, &QAction::triggered, this, QOverload<>::of(&MainWindowViewer::open));
#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
newInstanceAction = new QAction(tr("New instance"), this);
newInstanceAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(NEW_INSTANCE_ACTION_Y));
connect(newInstanceAction, &QAction::triggered,
@ -624,7 +624,7 @@ void MainWindowViewer::createToolBars()
viewer->setContextMenuPolicy(Qt::ActionsContextMenu);
// MacOSX app menus
#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
auto menuBar = this->menuBar();
// about / preferences
// TODO
@ -939,7 +939,7 @@ void MainWindowViewer::saveImage()
void MainWindowViewer::enableActions()
{
setActionsEnabled(true);
#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
activateWindow();
raise();
#endif
@ -1158,7 +1158,7 @@ void MainWindowViewer::setUpShortcutsManagement()
<< toggleFullScreenAction
<< toggleToolbarsAction
<< showEditShortcutsAction
#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
<< newInstanceAction
#endif
);

View File

@ -111,7 +111,7 @@ private:
//! Actions
QAction *openAction;
#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
QAction *newInstanceAction; // needed in macos
#endif
QAction *openFolderAction;

View File

@ -29,7 +29,7 @@ NotificationsLabelWidget::NotificationsLabelWidget(QWidget *parent)
textLabel->setFixedSize(200, 120);
// TODO check if the effects are still broken in OSX
#ifndef Q_OS_MAC
#ifndef Q_OS_MACOS
this->setGraphicsEffect(effect);
#endif

View File

@ -952,7 +952,7 @@ void Viewer::configureContent(QString msg)
void Viewer::hideCursor()
{
#ifdef Q_OS_MAC // TODO_Y_MAC_UI isn't BlankCursor supported in macos?
#ifdef Q_OS_MACOS // TODO_Y_MAC_UI isn't BlankCursor supported in macos?
setCursor(QCursor(QBitmap(1, 1), QBitmap(1, 1)));
#else
setCursor(Qt::BlankCursor);