From e6fe3ad91725242e50398a901e343d004559353d Mon Sep 17 00:00:00 2001 From: nowrep Date: Thu, 2 Jan 2014 15:26:44 +0100 Subject: [PATCH] [OS/2] Another OS/2 build fixes --- src/lib/app/mainapplication.h | 8 +++++--- src/lib/preferences/preferences.cpp | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/lib/app/mainapplication.h b/src/lib/app/mainapplication.h index c15037772..f802d62ce 100644 --- a/src/lib/app/mainapplication.h +++ b/src/lib/app/mainapplication.h @@ -28,6 +28,7 @@ #include "qtsingleapplication.h" #include "qz_namespace.h" +class QMenu; class QWebSettings; class QNetworkDiskCache; @@ -52,9 +53,9 @@ class ProxyStyle; class RegisterQAppAssociation; class HTML5PermissionsManager; class Speller; + #ifdef Q_OS_MAC class MacMenuReceiver; -class QMenu; #endif class QT_QUPZILLA_EXPORT MainApplication : public QtSingleApplication @@ -125,7 +126,7 @@ public: UserAgentManager* uaManager() { return m_uaManager; } RestoreManager* restoreManager() { return m_restoreManager; } -#ifdef Q_OS_WIN +#if defined(Q_OS_WIN) && !defined(Q_OS_OS2) RegisterQAppAssociation* associationManager(); #endif @@ -204,9 +205,10 @@ private: bool m_databaseConnected; QList m_postLaunchActions; -#ifdef Q_OS_WIN +#if defined(Q_OS_WIN) && !defined(Q_OS_OS2) RegisterQAppAssociation* m_registerQAppAssociation; #endif + #ifdef Q_OS_MAC MacMenuReceiver* m_macMenuReceiver; QMenu* m_macDockMenu; diff --git a/src/lib/preferences/preferences.cpp b/src/lib/preferences/preferences.cpp index b27d0ddc7..f82a07c21 100644 --- a/src/lib/preferences/preferences.cpp +++ b/src/lib/preferences/preferences.cpp @@ -113,7 +113,8 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent) ui->afterLaunch->setCurrentIndex(afterLaunch); ui->checkUpdates->setChecked(settings.value("Web-Browser-Settings/CheckUpdates", DEFAULT_CHECK_UPDATES).toBool()); ui->dontLoadTabsUntilSelected->setChecked(settings.value("Web-Browser-Settings/LoadTabsOnActivation", false).toBool()); -#ifdef Q_OS_WIN + +#if defined(Q_OS_WIN) && !defined(Q_OS_OS2) ui->checkDefaultBrowser->setChecked(settings.value("Web-Browser-Settings/CheckDefaultBrowser", DEFAULT_CHECK_DEFAULTBROWSER).toBool()); if (mApp->associationManager()->isDefaultForAllCapabilities()) { ui->checkNowDefaultBrowser->setText(tr("Default")); @@ -124,13 +125,14 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent) ui->checkNowDefaultBrowser->setEnabled(true); connect(ui->checkNowDefaultBrowser, SIGNAL(clicked()), this, SLOT(makeQupZillaDefault())); } -#else // just Windows +#else // No Default Browser settings on non-Windows platform ui->hSpacerDefaultBrowser->changeSize(0, 0, QSizePolicy::Fixed, QSizePolicy::Fixed); ui->hLayoutDefaultBrowser->invalidate(); delete ui->hLayoutDefaultBrowser; delete ui->checkDefaultBrowser; delete ui->checkNowDefaultBrowser; #endif + ui->newTabFrame->setVisible(false); if (m_newTabUrl.isEmpty()) { ui->newTab->setCurrentIndex(0);