From 283616e923dd680047ccf37303864b6807cc42c2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20Br=C3=BCning?= <michael.bruning@digia.com>
Date: Mon, 6 Oct 2014 11:56:27 +0200
Subject: [PATCH] Examples: Replace deprecated Q_WS_MAC defines with Q_OS_OSX.

Change-Id: I2d9f23a9aa8871df7b3054628a2db49ea858c522
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
---
 .../webenginewidgets/browser/browserapplication.cpp    | 10 +++++-----
 examples/webenginewidgets/browser/browserapplication.h |  4 ++--
 .../webenginewidgets/browser/browsermainwindow.cpp     |  8 ++++----
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/examples/webenginewidgets/browser/browserapplication.cpp b/examples/webenginewidgets/browser/browserapplication.cpp
index 14023f6e7..3a2550f95 100644
--- a/examples/webenginewidgets/browser/browserapplication.cpp
+++ b/examples/webenginewidgets/browser/browserapplication.cpp
@@ -104,7 +104,7 @@ BrowserApplication::BrowserApplication(int &argc, char **argv)
         return;
     }
 
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_OSX)
     QApplication::setQuitOnLastWindowClosed(false);
 #else
     QApplication::setQuitOnLastWindowClosed(true);
@@ -138,7 +138,7 @@ BrowserApplication::BrowserApplication(int &argc, char **argv)
     m_lastSession = settings.value(QLatin1String("lastSession")).toByteArray();
     settings.endGroup();
 
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_OSX)
     connect(this, SIGNAL(lastWindowClosed()),
             this, SLOT(lastWindowClosed()));
 #endif
@@ -157,7 +157,7 @@ BrowserApplication::~BrowserApplication()
     delete s_bookmarksManager;
 }
 
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_OSX)
 void BrowserApplication::lastWindowClosed()
 {
     clean();
@@ -172,7 +172,7 @@ BrowserApplication *BrowserApplication::instance()
     return (static_cast<BrowserApplication *>(QCoreApplication::instance()));
 }
 
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_OSX)
 #include <QtWidgets/QMessageBox>
 void BrowserApplication::quitBrowser()
 {
@@ -344,7 +344,7 @@ void BrowserApplication::installTranslator(const QString &name)
     QApplication::installTranslator(translator);
 }
 
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_OSX)
 bool BrowserApplication::event(QEvent* event)
 {
     switch (event->type()) {
diff --git a/examples/webenginewidgets/browser/browserapplication.h b/examples/webenginewidgets/browser/browserapplication.h
index 777bef06e..acb03ded5 100644
--- a/examples/webenginewidgets/browser/browserapplication.h
+++ b/examples/webenginewidgets/browser/browserapplication.h
@@ -84,14 +84,14 @@ public:
     static QNetworkAccessManager *networkAccessManager();
     static BookmarksManager *bookmarksManager();
 
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_OSX)
     bool event(QEvent *event);
 #endif
 
 public slots:
     BrowserMainWindow *newMainWindow();
     void restoreLastSession();
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_OSX)
     void lastWindowClosed();
     void quitBrowser();
 #endif
diff --git a/examples/webenginewidgets/browser/browsermainwindow.cpp b/examples/webenginewidgets/browser/browsermainwindow.cpp
index eda2b474b..ae40c7418 100644
--- a/examples/webenginewidgets/browser/browsermainwindow.cpp
+++ b/examples/webenginewidgets/browser/browsermainwindow.cpp
@@ -114,7 +114,7 @@ BrowserMainWindow::BrowserMainWindow(QWidget *parent, Qt::WindowFlags flags)
     QVBoxLayout *layout = new QVBoxLayout;
     layout->setSpacing(0);
     layout->setMargin(0);
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_OSX)
     layout->addWidget(m_bookmarksToolbar);
     layout->addWidget(new QWidget); // <- OS X tab widget style bug
 #else
@@ -151,7 +151,7 @@ BrowserMainWindow::BrowserMainWindow(QWidget *parent, Qt::WindowFlags flags)
             m_navigationBar, SLOT(setVisible(bool)));
     connect(m_tabWidget, SIGNAL(toolBarVisibilityChangeRequested(bool)),
             m_bookmarksToolbar, SLOT(setVisible(bool)));
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_OSX)
     connect(m_tabWidget, SIGNAL(lastTabClosed()),
             this, SLOT(close()));
 #else
@@ -302,7 +302,7 @@ void BrowserMainWindow::setupMenu()
     fileMenu->addSeparator();
 #endif
 
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_OSX)
     fileMenu->addAction(tr("&Quit"), BrowserApplication::instance(), SLOT(quitBrowser()), QKeySequence(Qt::CTRL | Qt::Key_Q));
 #else
     fileMenu->addAction(tr("&Quit"), this, SLOT(close()), QKeySequence(Qt::CTRL | Qt::Key_Q));
@@ -620,7 +620,7 @@ void BrowserMainWindow::slotUpdateWindowTitle(const QString &title)
     if (title.isEmpty()) {
         setWindowTitle(tr("Qt Demo Browser"));
     } else {
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_OSX)
         setWindowTitle(title);
 #else
         setWindowTitle(tr("%1 - Qt Demo Browser", "Page title and Browser name").arg(title));
-- 
GitLab