From 68ece533e1542eac107b9983f5c0612bee3c2f39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sun, 4 Jun 2023 20:55:11 +0200 Subject: [PATCH] Replace Q_OS_MAC with Q_OS_MACOS --- YACReader/bookmarks_dialog.cpp | 2 +- YACReader/main.cpp | 8 +++---- YACReader/main_window_viewer.cpp | 8 +++---- YACReader/main_window_viewer.h | 2 +- YACReader/notifications_label_widget.cpp | 2 +- YACReader/viewer.cpp | 2 +- .../initial_comic_info_extractor.cpp | 4 ++-- YACReaderLibrary/library_comic_opener.cpp | 4 ++-- YACReaderLibrary/library_creator.cpp | 16 ++++++------- YACReaderLibrary/library_window.cpp | 24 +++++++++---------- YACReaderLibrary/library_window.h | 2 +- YACReaderLibrary/main.cpp | 12 +++++----- YACReaderLibrary/package_manager.cpp | 4 ++-- YACReaderLibrary/server/static.cpp | 2 +- .../server/yacreader_http_server.cpp | 4 ++-- YACReaderLibrary/trayicon_controller.cpp | 6 ++--- YACReaderLibrary/xml_info_library_scanner.cpp | 2 +- YACReaderLibrary/yacreader_main_toolbar.cpp | 2 +- YACReaderLibraryServer/main.cpp | 6 ++--- common/comic.cpp | 4 ++-- common/comic.h | 2 +- common/pdf_comic.h | 4 ++-- common/yacreader_global.h | 2 +- common/yacreader_global_gui.cpp | 2 +- compressed_archive/compressed_archive.cpp | 4 ++-- custom_widgets/yacreader_titled_toolbar.cpp | 2 +- shortcuts_management/shortcuts_manager.cpp | 2 +- 27 files changed, 67 insertions(+), 67 deletions(-) diff --git a/YACReader/bookmarks_dialog.cpp b/YACReader/bookmarks_dialog.cpp index 75bfac04..ea806afe 100644 --- a/YACReader/bookmarks_dialog.cpp +++ b/YACReader/bookmarks_dialog.cpp @@ -84,7 +84,7 @@ BookmarksDialog::BookmarksDialog(QWidget *parent) l->addWidget(new QLabel("" + tr("Click on any image to go to the bookmark") + ""), 0, Qt::AlignCenter); l->addLayout(layout); -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS l->addLayout(buttons); #endif diff --git a/YACReader/main.cpp b/YACReader/main.cpp index 521c9dbf..39bbf3eb 100644 --- a/YACReader/main.cpp +++ b/YACReader/main.cpp @@ -21,7 +21,7 @@ using namespace QsLogging; #define new DEBUG_NEW #endif -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS #include #include 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(); diff --git a/YACReader/main_window_viewer.cpp b/YACReader/main_window_viewer.cpp index 41092953..56b6352e 100644 --- a/YACReader/main_window_viewer.cpp +++ b/YACReader/main_window_viewer.cpp @@ -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 ); diff --git a/YACReader/main_window_viewer.h b/YACReader/main_window_viewer.h index 03ebcd76..17011c36 100644 --- a/YACReader/main_window_viewer.h +++ b/YACReader/main_window_viewer.h @@ -111,7 +111,7 @@ private: //! Actions QAction *openAction; -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS QAction *newInstanceAction; // needed in macos #endif QAction *openFolderAction; diff --git a/YACReader/notifications_label_widget.cpp b/YACReader/notifications_label_widget.cpp index 17e4859a..2d5ff56f 100644 --- a/YACReader/notifications_label_widget.cpp +++ b/YACReader/notifications_label_widget.cpp @@ -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 diff --git a/YACReader/viewer.cpp b/YACReader/viewer.cpp index 5740983b..61273666 100644 --- a/YACReader/viewer.cpp +++ b/YACReader/viewer.cpp @@ -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); diff --git a/YACReaderLibrary/initial_comic_info_extractor.cpp b/YACReaderLibrary/initial_comic_info_extractor.cpp index 763907f5..5d5f807f 100644 --- a/YACReaderLibrary/initial_comic_info_extractor.cpp +++ b/YACReaderLibrary/initial_comic_info_extractor.cpp @@ -26,7 +26,7 @@ void InitialComicInfoExtractor::extract() } #ifndef NO_PDF if (fi.suffix().compare("pdf", Qt::CaseInsensitive) == 0) { -#if defined Q_OS_MAC && defined USE_PDFKIT +#if defined Q_OS_MACOS && defined USE_PDFKIT auto pdfComic = std::make_unique(); if (!pdfComic->openComic(_fileSource)) { return; @@ -57,7 +57,7 @@ void InitialComicInfoExtractor::extract() #endif _numPages = pdfComic->numPages(); if (_numPages >= _coverPage) { -#if defined Q_OS_MAC || defined USE_PDFIUM +#if defined Q_OS_MACOS || defined USE_PDFIUM QImage p = pdfComic->getPage(_coverPage - 1); // TODO check if the page is valid #else QImage p = pdfComic->page(_coverPage - 1)->renderToImage(72, 72); diff --git a/YACReaderLibrary/library_comic_opener.cpp b/YACReaderLibrary/library_comic_opener.cpp index 36ebf747..18ac16b5 100644 --- a/YACReaderLibrary/library_comic_opener.cpp +++ b/YACReaderLibrary/library_comic_opener.cpp @@ -18,7 +18,7 @@ bool YACReader::openComic(const ComicDB &comic, labelParam = QString("--readingListId=%1").arg(source.sourceId); } -#ifdef Q_OS_MACOS +#ifdef Q_OS_MACOSOS QStringList possiblePaths { QDir::cleanPath(QCoreApplication::applicationDirPath() + "/../../../") }; possiblePaths += QStandardPaths::standardLocations(QStandardPaths::ApplicationsLocation); @@ -38,7 +38,7 @@ bool YACReader::openComic(const ComicDB &comic, yacreaderFound = QProcess::startDetached(QDir::cleanPath(QCoreApplication::applicationDirPath() + "/YACReader.exe"), parameters); #endif -#if defined Q_OS_UNIX && !defined Q_OS_MAC +#if defined Q_OS_UNIX && !defined Q_OS_MACOS QStringList parameters { path, QString("--comicId=%1").arg(comic.id), QString("--libraryId=%1").arg(libraryId), labelParam }; yacreaderFound = QProcess::startDetached(QStringLiteral("YACReader"), parameters); #endif diff --git a/YACReaderLibrary/library_creator.cpp b/YACReaderLibrary/library_creator.cpp index 6e6a23ce..f604316c 100644 --- a/YACReaderLibrary/library_creator.cpp +++ b/YACReaderLibrary/library_creator.cpp @@ -110,7 +110,7 @@ void LibraryCreator::run() stopRunning = false; #if !defined use_unarr && !defined use_libarchive // check for 7z lib -#if defined Q_OS_UNIX && !defined Q_OS_MAC +#if defined Q_OS_UNIX && !defined Q_OS_MACOS QLibrary *sevenzLib = new QLibrary(QString(LIBDIR) + "/p7zip/7z.so"); #else QLibrary *sevenzLib = new QLibrary(QCoreApplication::applicationDirPath() + "/utils/7z"); @@ -255,7 +255,7 @@ void LibraryCreator::create(QDir dir) return; QFileInfo fileInfo = list.at(i); QString fileName = fileInfo.fileName(); -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS QStringList src = _source.split("/"); QString filePath = fileInfo.absoluteFilePath(); QStringList fp = filePath.split("/"); @@ -410,7 +410,7 @@ void LibraryCreator::update(QDir dirS) QFileInfo fileInfoS = listS.at(i); if (fileInfoS.isDir()) // create folder { -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS QStringList src = _source.split("/"); QString filePath = fileInfoS.absoluteFilePath(); QStringList fp = filePath.split("/"); @@ -426,7 +426,7 @@ void LibraryCreator::update(QDir dirS) _currentPathFolders.pop_back(); } else // create comic { -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS QStringList src = _source.split("/"); QString filePath = fileInfoS.absoluteFilePath(); QStringList fp = filePath.split("/"); @@ -463,7 +463,7 @@ void LibraryCreator::update(QDir dirS) if (nameS != "/.yacreaderlibrary") { // QLOG_WARN() << "dir source < dest" << nameS << nameD; -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS QStringList src = _source.split("/"); QString filePath = fileInfoS.absoluteFilePath(); QStringList fp = filePath.split("/"); @@ -494,7 +494,7 @@ void LibraryCreator::update(QDir dirS) if (nameS != "/.yacreaderlibrary") // skip .yacreaderlibrary folder { // QLOG_WARN() << "one of them(or both) is a file" << nameS << nameD; -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS QStringList src = _source.split("/"); QString filePath = fileInfoS.absoluteFilePath(); QStringList fp = filePath.split("/"); @@ -520,7 +520,7 @@ void LibraryCreator::update(QDir dirS) int comparation = QString::localeAwareCompare(nameS, nameD); if (comparation < 0) // create new thumbnail { -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS QStringList src = _source.split("/"); QString filePath = fileInfoS.absoluteFilePath(); QStringList fp = filePath.split("/"); @@ -547,7 +547,7 @@ void LibraryCreator::update(QDir dirS) // copy metadata to avoid loosing it if the imported comics doesn't have it. // DBHelper::removeFromDB(fileInfoD, _database); - // #ifdef Q_OS_MAC + // #ifdef Q_OS_MACOS // QStringList src = _source.split("/"); // QString filePath = fileInfoS.absoluteFilePath(); // QStringList fp = filePath.split("/"); diff --git a/YACReaderLibrary/library_window.cpp b/YACReaderLibrary/library_window.cpp index 57d50e05..17862a88 100644 --- a/YACReaderLibrary/library_window.cpp +++ b/YACReaderLibrary/library_window.cpp @@ -447,7 +447,7 @@ void LibraryWindow::setUpShortcutsManagement() tmpList = QList() << showHideMarksAction << toogleShowRecentIndicatorAction -#ifndef Q_OS_MAC +#ifndef Q_OS_MACOS << toggleFullScreenAction // Think about what to do in macos if the default theme is used #endif << toggleComicsViewAction); @@ -623,7 +623,7 @@ void LibraryWindow::createActions() toogleShowRecentIndicatorAction->setIcon(QIcon(":/images/comics_view_toolbar/showRecentIndicator.svg")); toogleShowRecentIndicatorAction->setChecked(settings->value(DISPLAY_RECENTLY_INDICATOR, true).toBool()); -#ifndef Q_OS_MAC +#ifndef Q_OS_MACOS toggleFullScreenAction = new QAction(tr("Fullscreen mode on/off"), this); toggleFullScreenAction->setToolTip(tr("Fullscreen mode on/off")); toggleFullScreenAction->setData(TOGGLE_FULL_SCREEN_ACTION_YL); @@ -896,7 +896,7 @@ void LibraryWindow::createActions() this->addAction(setFolderAsYonkomaAction); this->addAction(deleteMetadataAction); this->addAction(rescanXMLFromCurrentFolderAction); -#ifndef Q_OS_MAC +#ifndef Q_OS_MACOS this->addAction(toggleFullScreenAction); #endif @@ -906,7 +906,7 @@ void LibraryWindow::createActions() void LibraryWindow::disableComicsActions(bool disabled) { // if there aren't comics, no fullscreen option will be available -#ifndef Q_OS_MAC +#ifndef Q_OS_MACOS toggleFullScreenAction->setDisabled(disabled); #endif // edit toolbar @@ -1013,7 +1013,7 @@ void LibraryWindow::createToolBars() libraryToolBar->serverButton->setDefaultAction(serverConfigAction); libraryToolBar->helpButton->setDefaultAction(helpAboutAction); libraryToolBar->toggleComicsViewButton->setDefaultAction(toggleComicsViewAction); -#ifndef Q_OS_MAC +#ifndef Q_OS_MACOS libraryToolBar->fullscreenButton->setDefaultAction(toggleFullScreenAction); #endif libraryToolBar->setSearchWidget(searchEdit); @@ -1101,7 +1101,7 @@ void LibraryWindow::createMenus() selectedLibrary->addAction(importLibraryAction); // MacOSX app menus -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS QMenuBar *menu = this->menuBar(); // about / preferences // TODO @@ -1272,7 +1272,7 @@ void LibraryWindow::createConnections() connect(setRootIndexAction, &QAction::triggered, this, &LibraryWindow::setRootIndex); connect(expandAllNodesAction, &QAction::triggered, foldersView, &QTreeView::expandAll); connect(colapseAllNodesAction, &QAction::triggered, foldersView, &QTreeView::collapseAll); -#ifndef Q_OS_MAC +#ifndef Q_OS_MACOS connect(toggleFullScreenAction, &QAction::triggered, this, &LibraryWindow::toggleFullScreen); #endif connect(toggleComicsViewAction, &QAction::triggered, contentViewsManager, &YACReaderContentViewsManager::toggleComicsView); @@ -1447,7 +1447,7 @@ void LibraryWindow::loadLibrary(const QString &name) rescanLibraryForXMLInfoAction->setDisabled(true); disableComicsActions(true); -#ifndef Q_OS_MAC +#ifndef Q_OS_MACOS toggleFullScreenAction->setEnabled(true); #endif @@ -1886,7 +1886,7 @@ void LibraryWindow::showComicsViewContextMenu(const QPoint &point) QMenu subMenu; setupAddToSubmenu(subMenu); -#ifndef Q_OS_MAC +#ifndef Q_OS_MACOS menu.addSeparator(); menu.addAction(toggleFullScreenAction); #endif @@ -2155,7 +2155,7 @@ void LibraryWindow::checkEmptyFolder() disableComicsActions(false); } else { disableComicsActions(true); -#ifndef Q_OS_MAC +#ifndef Q_OS_MACOS if (comicsModel->rowCount() > 0) toggleFullScreenAction->setEnabled(true); #endif @@ -2685,12 +2685,12 @@ void LibraryWindow::openContainingFolderComic() { QModelIndex modelIndex = contentViewsManager->comicsView->currentIndex(); QFileInfo file(QDir::cleanPath(currentPath() + comicsModel->getComicPath(modelIndex))); -#if defined Q_OS_UNIX && !defined Q_OS_MAC +#if defined Q_OS_UNIX && !defined Q_OS_MACOS QString path = file.absolutePath(); QDesktopServices::openUrl(QUrl("file:///" + path, QUrl::TolerantMode)); #endif -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS QString filePath = file.absoluteFilePath(); QStringList args; args << "-e"; diff --git a/YACReaderLibrary/library_window.h b/YACReaderLibrary/library_window.h index 8cba4ffc..d5b63e37 100644 --- a/YACReaderLibrary/library_window.h +++ b/YACReaderLibrary/library_window.h @@ -175,7 +175,7 @@ public: QAction *removeLibraryAction; QAction *helpAboutAction; QAction *renameLibraryAction; -#ifndef Q_OS_MAC +#ifndef Q_OS_MACOS QAction *toggleFullScreenAction; #endif QAction *optionsAction; diff --git a/YACReaderLibrary/main.cpp b/YACReaderLibrary/main.cpp index 70e01b25..a1ddcae0 100644 --- a/YACReaderLibrary/main.cpp +++ b/YACReaderLibrary/main.cpp @@ -21,7 +21,7 @@ #include "yacreader_libraries.h" #include "exit_check.h" #include "opengl_checker.h" -#ifdef Q_OS_MACOS +#ifdef Q_OS_MACOSOS #include "trayhandler.h" #endif @@ -44,7 +44,7 @@ void logSystemAndConfig() #if !defined use_unarr && !defined use_libarchive #ifdef Q_OS_WIN if (QLibrary::isLibrary(QApplication::applicationDirPath() + "/utils/7z.dll")) -#elif defined Q_OS_UNIX && !defined Q_OS_MAC +#elif defined Q_OS_UNIX && !defined Q_OS_MACOS if (QLibrary::isLibrary(QString(LIBDIR) + "/yacreader/7z.so") | QLibrary::isLibrary(QString(LIBDIR) + "/p7zip/7z.so")) #else if (QLibrary::isLibrary(QApplication::applicationDirPath() + "/utils/7z.so")) @@ -58,7 +58,7 @@ void logSystemAndConfig() QLOG_INFO() << "using unarr decompression backend"; #endif // use_unarr -#if defined Q_OS_UNIX && !defined Q_OS_MAC +#if defined Q_OS_UNIX && !defined Q_OS_MACOS if (QFileInfo(QString(BINDIR) + "/qrencode").exists()) #else if (QFileInfo(QApplication::applicationDirPath() + "/utils/qrencode.exe").exists() || QFileInfo("./util/qrencode").exists()) @@ -169,7 +169,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(), "yacreaderlibrary", "_", QString(DATADIR) + "/yacreader/languages"); #else translator.load(QLocale(), "yacreaderlibrary", "_", "languages"); @@ -177,7 +177,7 @@ int main(int argc, char **argv) app.installTranslator(&translator); /*QTranslator viewerTranslator; - #if defined Q_OS_UNIX && !defined Q_OS_MAC + #if defined Q_OS_UNIX && !defined Q_OS_MACOS viewerTranslator.load(QString(DATADIR) + "/yacreader/languages/yacreader_" + sufix); #else viewerTranslator.load(QCoreApplication::applicationDirPath() + "/languages/yacreader_" + sufix); @@ -268,7 +268,7 @@ int main(int argc, char **argv) if (!settings->value(START_TO_TRAY, false).toBool() || !settings->value(CLOSE_TO_TRAY, false).toBool()) { mw->show(); } -#ifdef Q_OS_MACOS +#ifdef Q_OS_MACOSOS else { OSXHideDockIcon(); } diff --git a/YACReaderLibrary/package_manager.cpp b/YACReaderLibrary/package_manager.cpp index 7554ef07..38200f5c 100644 --- a/YACReaderLibrary/package_manager.cpp +++ b/YACReaderLibrary/package_manager.cpp @@ -16,7 +16,7 @@ void PackageManager::createPackage(const QString &libraryPath, const QString &de // TODO: Missing slot for openingError!!! connect(_7z, SIGNAL(error(QProcess::ProcessError)), this, SLOT(openingError(QProcess::ProcessError))); connect(_7z, QOverload::of(&QProcess::finished), this, &PackageManager::exported); -#if defined Q_OS_UNIX && !defined Q_OS_MAC +#if defined Q_OS_UNIX && !defined Q_OS_MACOS _7z->start("7z", attributes); // TODO: use 7z.so #else _7z->start(QCoreApplication::applicationDirPath() + "/utils/7zip", attributes); // TODO: use 7z.dll @@ -33,7 +33,7 @@ void PackageManager::extractPackage(const QString &packagePath, const QString &d _7z = new QProcess(); connect(_7z, SIGNAL(error(QProcess::ProcessError)), this, SLOT(openingError(QProcess::ProcessError))); connect(_7z, SIGNAL(finished(int, QProcess::ExitStatus)), this, SIGNAL(imported())); -#if defined Q_OS_UNIX && !defined Q_OS_MAC +#if defined Q_OS_UNIX && !defined Q_OS_MACOS _7z->start("7z", attributes); // TODO: use 7z.so #else _7z->start(QCoreApplication::applicationDirPath() + "/utils/7zip", attributes); // TODO: use 7z.dll diff --git a/YACReaderLibrary/server/static.cpp b/YACReaderLibrary/server/static.cpp index f7445f5f..e13f828d 100644 --- a/YACReaderLibrary/server/static.cpp +++ b/YACReaderLibrary/server/static.cpp @@ -35,7 +35,7 @@ QString Static::getConfigDir() return configDir; } // Search config file -#if defined Q_OS_UNIX && !defined Q_OS_MAC +#if defined Q_OS_UNIX && !defined Q_OS_MACOS QString binDir = (QString(DATADIR) + "/yacreader"); #else QString binDir = QCoreApplication::applicationDirPath(); diff --git a/YACReaderLibrary/server/yacreader_http_server.cpp b/YACReaderLibrary/server/yacreader_http_server.cpp index 3dd61cf7..6ce6a813 100644 --- a/YACReaderLibrary/server/yacreader_http_server.cpp +++ b/YACReaderLibrary/server/yacreader_http_server.cpp @@ -48,7 +48,7 @@ void YACReaderHttpServer::start(quint16 port) QString baseTemplatePath = QString("./server/templates"); QString templatePath; -#if defined Q_OS_UNIX && !defined Q_OS_MAC +#if defined Q_OS_UNIX && !defined Q_OS_MACOS templatePath = QFileInfo(QString(DATADIR) + "/yacreader", baseTemplatePath).absoluteFilePath(); #else templatePath = QFileInfo(QCoreApplication::applicationDirPath(), baseTemplatePath).absoluteFilePath(); @@ -76,7 +76,7 @@ void YACReaderHttpServer::start(quint16 port) QString basedocroot = "./server/docroot"; QString docroot; -#if defined Q_OS_UNIX && !defined Q_OS_MAC +#if defined Q_OS_UNIX && !defined Q_OS_MACOS QFileInfo configFile(QString(DATADIR) + "/yacreader"); docroot = QFileInfo(QString(DATADIR) + "/yacreader", basedocroot).absoluteFilePath(); #else diff --git a/YACReaderLibrary/trayicon_controller.cpp b/YACReaderLibrary/trayicon_controller.cpp index 79b121d4..ad35d9dd 100644 --- a/YACReaderLibrary/trayicon_controller.cpp +++ b/YACReaderLibrary/trayicon_controller.cpp @@ -7,7 +7,7 @@ #include #include -#ifdef Q_OS_MACOS +#ifdef Q_OS_MACOSOS #include "trayhandler.h" #endif @@ -26,7 +26,7 @@ TrayIconController::TrayIconController(QSettings *settings, LibraryWindow *windo #ifdef Q_OS_WIN trayIcon.setIcon(QIcon(":/icon.ico")); #else -#ifdef Q_OS_MACOS +#ifdef Q_OS_MACOSOS auto icon = QIcon(":/macostrayicon.svg"); icon.setIsMask(true); trayIcon.setIcon(icon); @@ -96,7 +96,7 @@ bool TrayIconController::handleCloseToTrayIcon(QCloseEvent *event) void TrayIconController::showWindow() { -#ifdef Q_OS_MACOS +#ifdef Q_OS_MACOSOS OSXShowDockIcon(); window->showNormal(); #else diff --git a/YACReaderLibrary/xml_info_library_scanner.cpp b/YACReaderLibrary/xml_info_library_scanner.cpp index 3170b269..47fc6fcb 100644 --- a/YACReaderLibrary/xml_info_library_scanner.cpp +++ b/YACReaderLibrary/xml_info_library_scanner.cpp @@ -46,7 +46,7 @@ void XMLInfoLibraryScanner::run() { #if !defined use_unarr && !defined use_libarchive // check for 7z lib -#if defined Q_OS_UNIX && !defined Q_OS_MAC +#if defined Q_OS_UNIX && !defined Q_OS_MACOS QLibrary *sevenzLib = new QLibrary(QString(LIBDIR) + "/p7zip/7z.so"); #else QLibrary *sevenzLib = new QLibrary(QCoreApplication::applicationDirPath() + "/utils/7z"); diff --git a/YACReaderLibrary/yacreader_main_toolbar.cpp b/YACReaderLibrary/yacreader_main_toolbar.cpp index 3d78a980..c879ef6f 100644 --- a/YACReaderLibrary/yacreader_main_toolbar.cpp +++ b/YACReaderLibrary/yacreader_main_toolbar.cpp @@ -68,7 +68,7 @@ YACReaderMainToolBar::YACReaderMainToolBar(QWidget *parent) mainLayout->addStretch(); mainLayout->addWidget(toggleComicsViewButton, 0, Qt::AlignVCenter); -#ifndef Q_OS_MAC +#ifndef Q_OS_MACOS addWideDivider(); mainLayout->addWidget(fullscreenButton, 0, Qt::AlignVCenter); #endif diff --git a/YACReaderLibraryServer/main.cpp b/YACReaderLibraryServer/main.cpp index 6fd56100..5692a58b 100644 --- a/YACReaderLibraryServer/main.cpp +++ b/YACReaderLibraryServer/main.cpp @@ -118,7 +118,7 @@ int main(int argc, char **argv) QTranslator translator; QString sufix = QLocale::system().name(); -#if defined Q_OS_UNIX && !defined Q_OS_MAC +#if defined Q_OS_UNIX && !defined Q_OS_MACOS translator.load(QString(DATADIR) + "/yacreader/languages/yacreaderlibrary_" + sufix); #else translator.load(QCoreApplication::applicationDirPath() + "/languages/yacreaderlibrary_" + sufix); @@ -181,7 +181,7 @@ int main(int argc, char **argv) QTranslator translator; QString sufix = QLocale::system().name(); -#if defined Q_OS_UNIX && !defined Q_OS_MAC +#if defined Q_OS_UNIX && !defined Q_OS_MACOS translator.load(QString(DATADIR) + "/yacreader/languages/yacreaderlibrary_" + sufix); #else translator.load(QCoreApplication::applicationDirPath() + "/languages/yacreaderlibrary_" + sufix); @@ -189,7 +189,7 @@ int main(int argc, char **argv) app.installTranslator(&translator); QTranslator viewerTranslator; -#if defined Q_OS_UNIX && !defined Q_OS_MAC +#if defined Q_OS_UNIX && !defined Q_OS_MACOS viewerTranslator.load(QString(DATADIR) + "/yacreader/languages/yacreader_" + sufix); #else viewerTranslator.load(QCoreApplication::applicationDirPath() + "/languages/yacreader_" + sufix); diff --git a/common/comic.cpp b/common/comic.cpp index 059c6203..6ddc36c2 100644 --- a/common/comic.cpp +++ b/common/comic.cpp @@ -795,7 +795,7 @@ bool PDFComic::load(const QString &path, const ComicDB &comic) void PDFComic::process() { -#if defined Q_OS_MAC && defined USE_PDFKIT +#if defined Q_OS_MACOS && defined USE_PDFKIT pdfComic = std::make_unique(); if (!pdfComic->openComic(_path)) { emit errorOpening(); @@ -875,7 +875,7 @@ void PDFComic::process() void PDFComic::renderPage(int page) { -#if defined Q_OS_MAC && defined USE_PDFKIT +#if defined Q_OS_MACOS && defined USE_PDFKIT QImage img = pdfComic->getPage(page); if (!img.isNull()) { #elif defined USE_PDFIUM diff --git a/common/comic.h b/common/comic.h index 170cc885..5b804c7c 100644 --- a/common/comic.h +++ b/common/comic.h @@ -164,7 +164,7 @@ class PDFComic : public Comic private: // pdf -#if defined Q_OS_MAC && defined USE_PDFKIT +#if defined Q_OS_MACOS && defined USE_PDFKIT std::unique_ptr pdfComic; #elif defined USE_PDFIUM std::unique_ptr pdfComic; diff --git a/common/pdf_comic.h b/common/pdf_comic.h index f2d8ff8c..1eadd705 100644 --- a/common/pdf_comic.h +++ b/common/pdf_comic.h @@ -7,7 +7,7 @@ #include #include -#if defined Q_OS_MAC && defined USE_PDFKIT +#if defined Q_OS_MACOS && defined USE_PDFKIT class MacOSXPDFComic { public: @@ -51,5 +51,5 @@ private: #else #include "poppler-qt5.h" #endif // QT_VERSION -#endif // Q_OS_MAC +#endif // Q_OS_MACOS #endif // PDF_COMIC_H diff --git a/common/yacreader_global.h b/common/yacreader_global.h index d0d0d432..160e908e 100644 --- a/common/yacreader_global.h +++ b/common/yacreader_global.h @@ -19,7 +19,7 @@ #define MAX_LIBRARIES_WARNING_NUM 10 -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS #define Y_MAC_UI #endif diff --git a/common/yacreader_global_gui.cpp b/common/yacreader_global_gui.cpp index 77e27aea..e9589490 100644 --- a/common/yacreader_global_gui.cpp +++ b/common/yacreader_global_gui.cpp @@ -57,7 +57,7 @@ QList YACReader::mimeDataToComicsIds(const QMimeData *data) QString YACReader::addExtensionToIconPath(const QString &path) { #ifdef YACREADER_LIBRARY -#ifdef Q_OS_MAC // TODO_Y_MAC_UI +#ifdef Q_OS_MACOS // TODO_Y_MAC_UI return path + ".png"; #else return path + ".svg"; diff --git a/compressed_archive/compressed_archive.cpp b/compressed_archive/compressed_archive.cpp index 6b8a1c6a..848106e4 100644 --- a/compressed_archive/compressed_archive.cpp +++ b/compressed_archive/compressed_archive.cpp @@ -299,7 +299,7 @@ CompressedArchive::CompressedArchive(const QString &filePath, QObject *parent) // fix2: rename 7z.so to 7z.dylib if (sevenzLib == 0) { #if defined Q_OS_UNIX -#if defined Q_OS_MAC +#if defined Q_OS_MACOS rarLib = new QLibrary(QCoreApplication::applicationDirPath() + "/utils/Codecs/Rar"); #else // check if a yacreader specific version of p7zip exists on the system @@ -316,7 +316,7 @@ CompressedArchive::CompressedArchive(const QString &filePath, QObject *parent) return false; } #endif -#if defined Q_OS_UNIX && !defined Q_OS_MAC +#if defined Q_OS_UNIX && !defined Q_OS_MACOS QFileInfo sevenzlibrary(QString(LIBDIR) + "/yacreader/7z.so"); if (sevenzlibrary.exists()) { sevenzLib = new QLibrary(sevenzlibrary.absoluteFilePath()); diff --git a/custom_widgets/yacreader_titled_toolbar.cpp b/custom_widgets/yacreader_titled_toolbar.cpp index 79bb43c4..855eee81 100644 --- a/custom_widgets/yacreader_titled_toolbar.cpp +++ b/custom_widgets/yacreader_titled_toolbar.cpp @@ -96,7 +96,7 @@ void YACReaderTitledToolBar::addAction(QAction *action) QHBoxLayout *mainLayout = dynamic_cast(layout()); // fix for QToolButton and retina support in OSX -#ifdef Q_OS_MAC // TODO_Y_MAC_UI +#ifdef Q_OS_MACOS // TODO_Y_MAC_UI QPushButton *pb = new QPushButton(this); pb->setCursor(QCursor(Qt::ArrowCursor)); pb->setIcon(action->icon()); diff --git a/shortcuts_management/shortcuts_manager.cpp b/shortcuts_management/shortcuts_manager.cpp index deb7df9b..1680b374 100644 --- a/shortcuts_management/shortcuts_manager.cpp +++ b/shortcuts_management/shortcuts_manager.cpp @@ -75,7 +75,7 @@ void ShortcutsManager::initDefaultShorcuts() defaultShorcuts.insert(ZOOM_IN_MGLASS_ACTION_Y, Qt::Key_Asterisk); defaultShorcuts.insert(ZOOM_OUT_MGLASS_ACTION_Y, Qt::Key_Underscore); -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS defaultShorcuts.insert(NEW_INSTANCE_ACTION_Y, Qt::Key_N); #endif