From 4603b19a8dfdd6bae733310ff177458ae7c272db Mon Sep 17 00:00:00 2001
From: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Date: Tue, 6 Aug 2013 17:00:25 +0200
Subject: [PATCH] Move QWEBENGINEWIDGETS_EXPORT to qtwebkitwidgetsglobal.h

Since the macro is used in public headers, it should also be
declared in one of the webenginewidgets module's public headers.

Change-Id: I5cd56196e95c78fac2ba8df076f2cd683b01a5ac
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
---
 lib/qtwebengineglobal.h                    |  6 ---
 lib/widgets/Api/qtwebenginewidgetsglobal.h | 56 ++++++++++++++++++++++
 lib/widgets/Api/qwebcontentsview.h         |  2 +-
 lib/widgets/widgets.pro                    |  1 +
 4 files changed, 58 insertions(+), 7 deletions(-)
 create mode 100644 lib/widgets/Api/qtwebenginewidgetsglobal.h

diff --git a/lib/qtwebengineglobal.h b/lib/qtwebengineglobal.h
index 373fa2e31..a9069f962 100644
--- a/lib/qtwebengineglobal.h
+++ b/lib/qtwebengineglobal.h
@@ -49,13 +49,7 @@
 #  else
 #      define QWEBENGINE_EXPORT Q_DECL_IMPORT
 #  endif
-#  if defined(QT_BUILD_WEBENGINEWIDGETS_LIB)
-#      define QWEBENGINEWIDGETS_EXPORT Q_DECL_EXPORT
-#  else
-#      define QWEBENGINEWIDGETS_EXPORT Q_DECL_IMPORT
-#  endif
 #else
-#  define QWEBENGINEWIDGETS_EXPORT
 #  define QWEBENGINE_EXPORT
 #endif
 
diff --git a/lib/widgets/Api/qtwebenginewidgetsglobal.h b/lib/widgets/Api/qtwebenginewidgetsglobal.h
new file mode 100644
index 000000000..c85640f97
--- /dev/null
+++ b/lib/widgets/Api/qtwebenginewidgetsglobal.h
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.  For licensing terms and
+** conditions see http://qt.digia.com/licensing.  For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights.  These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef QTWEBENGINEWIDGETSGLOBAL_H
+#define QTWEBENGINEWIDGETSGLOBAL_H
+
+#include <QtCore/qglobal.h>
+
+#ifndef QT_STATIC
+#  if defined(QT_BUILD_WEBENGINEWIDGETS_LIB)
+#      define QWEBENGINEWIDGETS_EXPORT Q_DECL_EXPORT
+#  else
+#      define QWEBENGINEWIDGETS_EXPORT Q_DECL_IMPORT
+#  endif
+#else
+#  define QWEBENGINEWIDGETS_EXPORT
+#endif
+
+#endif // QTWEBENGINEWIDGETSGLOBAL_H
diff --git a/lib/widgets/Api/qwebcontentsview.h b/lib/widgets/Api/qwebcontentsview.h
index 92f41c6a6..4db8e4b56 100644
--- a/lib/widgets/Api/qwebcontentsview.h
+++ b/lib/widgets/Api/qwebcontentsview.h
@@ -42,7 +42,7 @@
 #ifndef QWEBCONTESTSVIEW_H
 #define QWEBCONTESTSVIEW_H
 
-#include <qtwebengineglobal.h>
+#include <qtwebenginewidgetsglobal.h>
 
 #include <QWidget>
 #include <QScopedPointer>
diff --git a/lib/widgets/widgets.pro b/lib/widgets/widgets.pro
index 3fd9b1f80..fddfa4945 100644
--- a/lib/widgets/widgets.pro
+++ b/lib/widgets/widgets.pro
@@ -26,6 +26,7 @@ SOURCES = \
         render_widget_host_view_qt_delegate_widget.cpp
 
 HEADERS = \
+        Api/qtwebenginewidgetsglobal.h \
         Api/qwebcontentsview.h \
         Api/qwebcontentsview_p.h \
         render_widget_host_view_qt_delegate_widget.h
-- 
GitLab