fix macosx build
This commit is contained in:
parent
8e28924e7c
commit
e5ed611680
@ -133,7 +133,7 @@ QList<QAction*> FormMain::allActions() const {
|
|||||||
actions << m_ui->m_actionRestart;
|
actions << m_ui->m_actionRestart;
|
||||||
actions << m_ui->m_actionQuit;
|
actions << m_ui->m_actionQuit;
|
||||||
|
|
||||||
#if !defined(Q_OS_MAC)
|
#if !defined(Q_OS_MACOS)
|
||||||
actions << m_ui->m_actionFullscreen;
|
actions << m_ui->m_actionFullscreen;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -141,7 +141,7 @@ QList<QAction*> FormMain::allActions() const {
|
|||||||
actions << m_ui->m_actionSwitchFeedsList;
|
actions << m_ui->m_actionSwitchFeedsList;
|
||||||
actions << m_ui->m_actionSwitchMainWindow;
|
actions << m_ui->m_actionSwitchMainWindow;
|
||||||
|
|
||||||
#if !defined(Q_OS_MAC)
|
#if !defined(Q_OS_MACOS)
|
||||||
actions << m_ui->m_actionSwitchMainMenu;
|
actions << m_ui->m_actionSwitchMainMenu;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -219,7 +219,7 @@ void FormMain::prepareMenus() {
|
|||||||
m_ui->m_menuWebBrowserTabs->removeAction(m_ui->m_actionTabNewWebBrowser);
|
m_ui->m_menuWebBrowserTabs->removeAction(m_ui->m_actionTabNewWebBrowser);
|
||||||
m_ui->m_menuWebBrowserTabs->setTitle(tr("Tabs"));
|
m_ui->m_menuWebBrowserTabs->setTitle(tr("Tabs"));
|
||||||
#endif
|
#endif
|
||||||
#if defined(Q_OS_MAC)
|
#if defined(Q_OS_MACOS)
|
||||||
m_ui->m_actionSwitchMainMenu->setVisible(false);
|
m_ui->m_actionSwitchMainMenu->setVisible(false);
|
||||||
m_ui->m_actionFullscreen->setVisible(false);
|
m_ui->m_actionFullscreen->setVisible(false);
|
||||||
#endif
|
#endif
|
||||||
|
@ -44,7 +44,7 @@ FormUpdate::FormUpdate(QWidget* parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool FormUpdate::isSelfUpdateSupported() const {
|
bool FormUpdate::isSelfUpdateSupported() const {
|
||||||
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
#if defined(Q_OS_WIN) || defined(Q_OS_MACOS)
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
|
@ -229,7 +229,7 @@ int TabWidget::addBrowser(bool move_after_current, bool make_active, const QUrl&
|
|||||||
int final_index;
|
int final_index;
|
||||||
QString browser_tab_name = tr("Web browser");
|
QString browser_tab_name = tr("Web browser");
|
||||||
|
|
||||||
#if defined (Q_OS_MACOS)
|
#if defined (Q_OS_MACOSOS)
|
||||||
browser_tab_name = browser_tab_name.prepend(QSL(" "));
|
browser_tab_name = browser_tab_name.prepend(QSL(" "));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -291,7 +291,7 @@ void TabWidget::gotoPreviousTab() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void TabWidget::indentTabText(int index) {
|
void TabWidget::indentTabText(int index) {
|
||||||
#if defined (Q_OS_MACOS)
|
#if defined (Q_OS_MACOSOS)
|
||||||
if (tabBar()->tabType(index) != TabBar::FeedReader && !tabIcon(index).isNull()) {
|
if (tabBar()->tabType(index) != TabBar::FeedReader && !tabIcon(index).isNull()) {
|
||||||
// We have closable tab with some icon, fix the title.
|
// We have closable tab with some icon, fix the title.
|
||||||
const QString text = tabText(index);
|
const QString text = tabText(index);
|
||||||
|
@ -78,7 +78,7 @@ bool IOFactory::startProcessDetached(const QString& program, const QStringList&
|
|||||||
process.setProgram(program);
|
process.setProgram(program);
|
||||||
process.setArguments(arguments);
|
process.setArguments(arguments);
|
||||||
|
|
||||||
#if !defined(Q_OS_MAC)
|
#if !defined(Q_OS_MACOS)
|
||||||
process.setNativeArguments(native_arguments);
|
process.setNativeArguments(native_arguments);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -452,7 +452,7 @@ SettingsProperties Settings::determineProperties() {
|
|||||||
|
|
||||||
// We will use PORTABLE settings only and only if it is available and NON-PORTABLE
|
// We will use PORTABLE settings only and only if it is available and NON-PORTABLE
|
||||||
// settings was not initialized before.
|
// settings was not initialized before.
|
||||||
#if defined (Q_OS_LINUX) || defined (Q_OS_ANDROID) || defined (Q_OS_MACOS)
|
#if defined (Q_OS_LINUX) || defined (Q_OS_ANDROID) || defined (Q_OS_MACOSOS)
|
||||||
// DO NOT use portable settings for Linux, it is really not used on that platform.
|
// DO NOT use portable settings for Linux, it is really not used on that platform.
|
||||||
const bool will_we_use_portable_settings = false;
|
const bool will_we_use_portable_settings = false;
|
||||||
#else
|
#else
|
||||||
|
@ -33,7 +33,7 @@ SystemFactory::~SystemFactory() = default;
|
|||||||
QRegularExpression SystemFactory::supportedUpdateFiles() {
|
QRegularExpression SystemFactory::supportedUpdateFiles() {
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
return QRegularExpression(QSL(".+win.+\\.(exe|7z)"));
|
return QRegularExpression(QSL(".+win.+\\.(exe|7z)"));
|
||||||
#elif defined(Q_OS_MAC)
|
#elif defined(Q_OS_MACOS)
|
||||||
return QRegularExpression(QSL(".dmg"));
|
return QRegularExpression(QSL(".dmg"));
|
||||||
#elif defined(Q_OS_LINUX)
|
#elif defined(Q_OS_LINUX)
|
||||||
return QRegularExpression(QSL(".AppImage"));
|
return QRegularExpression(QSL(".AppImage"));
|
||||||
|
@ -121,7 +121,7 @@ QString TextFactory::decrypt(const QString& text) {
|
|||||||
QString TextFactory::newline() {
|
QString TextFactory::newline() {
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
return QSL("\r\n");
|
return QSL("\r\n");
|
||||||
#elif defined(Q_OS_MACOS)
|
#elif defined(Q_OS_MACOSOS)
|
||||||
return QSL("\r");
|
return QSL("\r");
|
||||||
#else
|
#else
|
||||||
return QSL("\n");
|
return QSL("\n");
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include "gui/feedsview.h"
|
#include "gui/feedsview.h"
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
|
|
||||||
#if defined (Q_OS_MAC)
|
#if defined (Q_OS_MACOS)
|
||||||
extern void disableWindowTabbing();
|
extern void disableWindowTabbing();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@ -34,7 +34,7 @@ int main(int argc, char* argv[]) {
|
|||||||
// Ensure that ini format is used as application settings storage on Mac OS.
|
// Ensure that ini format is used as application settings storage on Mac OS.
|
||||||
QSettings::setDefaultFormat(QSettings::IniFormat);
|
QSettings::setDefaultFormat(QSettings::IniFormat);
|
||||||
|
|
||||||
#if defined (Q_OS_MAC)
|
#if defined (Q_OS_MACOS)
|
||||||
QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
|
QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
|
||||||
disableWindowTabbing();
|
disableWindowTabbing();
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user