aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-10-06 10:55:34 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-10-06 10:55:34 +0200
commit0e3a58441644faa14698a44f2ed682150430529a (patch)
treede19c693a802abf6f020867f6ca8e912b0d019c6 /sources/pyside2
parent82934bc00c2de7ea51fd7e95601472fcdf7b6aea (diff)
parentb57f329ecbf1fd0b29ae0e8284c885adc0eb4ed3 (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Diffstat (limited to 'sources/pyside2')
-rw-r--r--sources/pyside2/PySide2/QtWebEngineCore/CMakeLists.txt5
-rw-r--r--sources/pyside2/PySide2/QtWebEngineCore/typesystem_webenginecore.xml1
-rw-r--r--sources/pyside2/doc/quickstart.rst2
-rw-r--r--sources/pyside2/doc/tutorials/datavisualize/datavisualize3/main_window.py2
-rw-r--r--sources/pyside2/doc/tutorials/datavisualize/datavisualize4/main_window.py2
-rw-r--r--sources/pyside2/doc/tutorials/datavisualize/datavisualize5/main_window.py2
-rw-r--r--sources/pyside2/doc/tutorials/datavisualize/datavisualize6/main_window.py2
-rw-r--r--sources/pyside2/doc/tutorials/portingguide/chapter3/bookwindow.py2
-rw-r--r--sources/pyside2/libpyside/CMakeLists.txt2
-rw-r--r--sources/pyside2/libpyside/pysidemacros.h31
-rw-r--r--sources/pyside2/tests/pysidetest/CMakeLists.txt4
-rw-r--r--sources/pyside2/tests/pysidetest/hiddenobject.h11
-rw-r--r--sources/pyside2/tests/pysidetest/pysidetest_global.h9
-rw-r--r--sources/pyside2/tests/pysidetest/pysidetest_macros.h43
-rw-r--r--sources/pyside2/tests/pysidetest/testobject.cpp2
-rw-r--r--sources/pyside2/tests/pysidetest/testobject.h33
-rw-r--r--sources/pyside2/tests/pysidetest/testview.h10
17 files changed, 103 insertions, 60 deletions
diff --git a/sources/pyside2/PySide2/QtWebEngineCore/CMakeLists.txt b/sources/pyside2/PySide2/QtWebEngineCore/CMakeLists.txt
index f0fb1eeda..52a071606 100644
--- a/sources/pyside2/PySide2/QtWebEngineCore/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtWebEngineCore/CMakeLists.txt
@@ -21,14 +21,17 @@ set(QtWebEngineCore_include_dirs
${QtWebEngineCore_SOURCE_DIR}
${QtWebEngineCore_BINARY_DIR}
${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Network_INCLUDE_DIRS}
${libpyside_SOURCE_DIR}
${QtCore_GEN_DIR}
+ ${QtNetwork_GEN_DIR}
)
set(QtWebEngineCore_libraries pyside2
${Qt${QT_MAJOR_VERSION}WebEngineCore_LIBRARIES}
${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
)
-set(QtWebEngineCore_deps QtCore)
+set(QtWebEngineCore_deps QtCore QtNetwork)
create_pyside_module(NAME QtWebEngineCore
INCLUDE_DIRS QtWebEngineCore_include_dirs
LIBRARIES QtWebEngineCore_libraries
diff --git a/sources/pyside2/PySide2/QtWebEngineCore/typesystem_webenginecore.xml b/sources/pyside2/PySide2/QtWebEngineCore/typesystem_webenginecore.xml
index eb1ab3d61..65c0e8137 100644
--- a/sources/pyside2/PySide2/QtWebEngineCore/typesystem_webenginecore.xml
+++ b/sources/pyside2/PySide2/QtWebEngineCore/typesystem_webenginecore.xml
@@ -41,6 +41,7 @@
-->
<typesystem package="PySide2.QtWebEngineCore">
<load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+ <load-typesystem name="QtNetwork/typesystem_network.xml" generate="no"/>
<object-type name="QWebEngineCookieStore"/>
diff --git a/sources/pyside2/doc/quickstart.rst b/sources/pyside2/doc/quickstart.rst
index 5d8ddfe2d..b6a3dbbb3 100644
--- a/sources/pyside2/doc/quickstart.rst
+++ b/sources/pyside2/doc/quickstart.rst
@@ -9,7 +9,7 @@ Before you can install |project|, first you must install the following software:
* Python 2.7 or 3.5+,
* We recommend using a virtual environment, such as
`venv <https://docs.python.org/3/library/venv.html>`_ or
- `virtualenv <https://virtualenv.pypa.io/en/stable/installation>`_
+ `virtualenv <https://virtualenv.pypa.io/en/latest>`_
Installation
------------
diff --git a/sources/pyside2/doc/tutorials/datavisualize/datavisualize3/main_window.py b/sources/pyside2/doc/tutorials/datavisualize/datavisualize3/main_window.py
index 656609a55..d97db65aa 100644
--- a/sources/pyside2/doc/tutorials/datavisualize/datavisualize3/main_window.py
+++ b/sources/pyside2/doc/tutorials/datavisualize/datavisualize3/main_window.py
@@ -38,7 +38,7 @@
##
#############################################################################
-from PySide2.QtCore import Slot, qApp
+from PySide2.QtCore import Slot
from PySide2.QtGui import QAction, QKeySequence
from PySide2.QtWidgets import QMainWindow
diff --git a/sources/pyside2/doc/tutorials/datavisualize/datavisualize4/main_window.py b/sources/pyside2/doc/tutorials/datavisualize/datavisualize4/main_window.py
index 2157b7b15..db9517f42 100644
--- a/sources/pyside2/doc/tutorials/datavisualize/datavisualize4/main_window.py
+++ b/sources/pyside2/doc/tutorials/datavisualize/datavisualize4/main_window.py
@@ -38,7 +38,7 @@
##
#############################################################################
-from PySide2.QtCore import Slot, qApp
+from PySide2.QtCore import Slot
from PySide2.QtGui import QAction, QKeySequence
from PySide2.QtWidgets import QMainWindow
diff --git a/sources/pyside2/doc/tutorials/datavisualize/datavisualize5/main_window.py b/sources/pyside2/doc/tutorials/datavisualize/datavisualize5/main_window.py
index 30d6582ba..e8979ab25 100644
--- a/sources/pyside2/doc/tutorials/datavisualize/datavisualize5/main_window.py
+++ b/sources/pyside2/doc/tutorials/datavisualize/datavisualize5/main_window.py
@@ -38,7 +38,7 @@
##
#############################################################################
-from PySide2.QtCore import Slot, qApp
+from PySide2.QtCore import Slot
from PySide2.QtGui import QAction, QKeySequence
from PySide2.QtWidgets import QMainWindow
diff --git a/sources/pyside2/doc/tutorials/datavisualize/datavisualize6/main_window.py b/sources/pyside2/doc/tutorials/datavisualize/datavisualize6/main_window.py
index 9e9ea8472..ef4e06f41 100644
--- a/sources/pyside2/doc/tutorials/datavisualize/datavisualize6/main_window.py
+++ b/sources/pyside2/doc/tutorials/datavisualize/datavisualize6/main_window.py
@@ -38,7 +38,7 @@
##
#############################################################################
-from PySide2.QtCore import Slot, qApp
+from PySide2.QtCore import Slot
from PySide2.QtGui import QAction, QKeySequence
from PySide2.QtWidgets import QMainWindow
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter3/bookwindow.py b/sources/pyside2/doc/tutorials/portingguide/chapter3/bookwindow.py
index 8b0c7a6ad..792bcab51 100644
--- a/sources/pyside2/doc/tutorials/portingguide/chapter3/bookwindow.py
+++ b/sources/pyside2/doc/tutorials/portingguide/chapter3/bookwindow.py
@@ -41,7 +41,7 @@
from __future__ import print_function, absolute_import
from PySide2.QtGui import QAction
-from PySide2.QtWidgets import (QAbstractItemView, qApp, QDataWidgetMapper,
+from PySide2.QtWidgets import (QAbstractItemView, QDataWidgetMapper,
QHeaderView, QMainWindow, QMessageBox)
from PySide2.QtGui import QKeySequence
from PySide2.QtSql import (QSqlRelation, QSqlRelationalTableModel, QSqlTableModel,
diff --git a/sources/pyside2/libpyside/CMakeLists.txt b/sources/pyside2/libpyside/CMakeLists.txt
index d6b20c45a..e31c87eef 100644
--- a/sources/pyside2/libpyside/CMakeLists.txt
+++ b/sources/pyside2/libpyside/CMakeLists.txt
@@ -100,7 +100,7 @@ set_target_properties(pyside2 PROPERTIES
VERSION ${BINDING_API_VERSION}
SOVERSION "${PYSIDE_SO_VERSION}"
OUTPUT_NAME "pyside2${pyside2_SUFFIX}${SHIBOKEN_PYTHON_SHARED_LIBRARY_SUFFIX}"
- DEFINE_SYMBOL PYSIDE_EXPORTS)
+ DEFINE_SYMBOL BUILD_LIBPYSIDE)
if(${QT_MAJOR_VERSION} GREATER_EQUAL 6)
set_property(TARGET pyside2 PROPERTY CXX_STANDARD 17)
diff --git a/sources/pyside2/libpyside/pysidemacros.h b/sources/pyside2/libpyside/pysidemacros.h
index 5b493a279..fcdfe3c6e 100644
--- a/sources/pyside2/libpyside/pysidemacros.h
+++ b/sources/pyside2/libpyside/pysidemacros.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt for Python.
@@ -40,25 +40,16 @@
#ifndef PYSIDEMACROS_H
#define PYSIDEMACROS_H
-#if defined _WIN32
- #if PYSIDE_EXPORTS
- #define PYSIDE_API __declspec(dllexport)
- #else
- #if defined __MINGW32__
- #define PYSIDE_API
- #else
- #define PYSIDE_API __declspec(dllimport)
- #endif
- #endif
- #define PYSIDE_DEPRECATED(func) __declspec(deprecated) func
+#include <shibokenmacros.h>
+
+#define PYSIDE_EXPORT LIBSHIBOKEN_EXPORT
+#define PYSIDE_IMPORT LIBSHIBOKEN_IMPORT
+#define PYSIDE_DEPRECATED(func) SBK_DEPRECATED(func)
+
+#ifdef BUILD_LIBPYSIDE
+# define PYSIDE_API PYSIDE_EXPORT
#else
- #if __GNUC__ >= 4
- #define PYSIDE_API __attribute__ ((visibility("default")))
- #define PYSIDE_DEPRECATED(func) func __attribute__ ((deprecated))
- #else
- #define PYSIDE_API
- #define PYSIDE_DEPRECATED(func) func
- #endif
+# define PYSIDE_API PYSIDE_IMPORT
#endif
-#endif
+#endif // PYSIDEMACROS_H
diff --git a/sources/pyside2/tests/pysidetest/CMakeLists.txt b/sources/pyside2/tests/pysidetest/CMakeLists.txt
index 2f7633e9a..972793519 100644
--- a/sources/pyside2/tests/pysidetest/CMakeLists.txt
+++ b/sources/pyside2/tests/pysidetest/CMakeLists.txt
@@ -65,6 +65,7 @@ endif()
make_path(testbinding_include_dirs ${pyside2_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../../shiboken2/libshiboken
${CMAKE_CURRENT_SOURCE_DIR}/../../PySide2
${CMAKE_CURRENT_SOURCE_DIR}/../../libpyside
${QT_INCLUDE_DIR}
@@ -103,6 +104,9 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${libpyside_SOURCE_DIR})
add_library(pysidetest SHARED ${pysidetest_SRC} ${pysidetest_MOC_SRC})
+set_target_properties(pysidetest PROPERTIES
+ DEFINE_SYMBOL BUILD_PYSIDETEST)
+
target_link_libraries(pysidetest
Shiboken2::libshiboken
${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
diff --git a/sources/pyside2/tests/pysidetest/hiddenobject.h b/sources/pyside2/tests/pysidetest/hiddenobject.h
index ffa8d614a..97a2864c5 100644
--- a/sources/pyside2/tests/pysidetest/hiddenobject.h
+++ b/sources/pyside2/tests/pysidetest/hiddenobject.h
@@ -29,11 +29,9 @@
#ifndef HIDDENOBJECT_H
#define HIDDENOBJECT_H
-#ifdef pysidetest_EXPORTS
-#define PYSIDE_EXPORTS 1
-#endif
-#include "pysidemacros.h"
-#include <QObject>
+#include "pysidetest_macros.h"
+
+#include <QtCore/QObject>
// This class shouldn't be exported!
class HiddenObject : public QObject
@@ -49,7 +47,6 @@ private:
};
// Return a instance of HiddenObject
-PYSIDE_API QObject* getHiddenObject();
-
+PYSIDETEST_API QObject* getHiddenObject();
#endif
diff --git a/sources/pyside2/tests/pysidetest/pysidetest_global.h b/sources/pyside2/tests/pysidetest/pysidetest_global.h
index 0077ade96..f65662cb5 100644
--- a/sources/pyside2/tests/pysidetest/pysidetest_global.h
+++ b/sources/pyside2/tests/pysidetest/pysidetest_global.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of Qt for Python.
@@ -26,9 +26,12 @@
**
****************************************************************************/
+#ifndef PYSIDETEST_GLOBAL_H
+#define PYSIDETEST_GLOBAL_H
+
// PySide global.h file
-#include "pyside2_global.h"
#include "testobject.h"
#include "testview.h"
-#define PYSIDE_API
#include "hiddenobject.h"
+
+#endif // PYSIDETEST_GLOBAL_H
diff --git a/sources/pyside2/tests/pysidetest/pysidetest_macros.h b/sources/pyside2/tests/pysidetest/pysidetest_macros.h
new file mode 100644
index 000000000..b561efbbc
--- /dev/null
+++ b/sources/pyside2/tests/pysidetest/pysidetest_macros.h
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** 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 The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PYSIDETEST_MACROS_H
+#define PYSIDETEST_MACROS_H
+
+#include <pysidemacros.h>
+
+#define PYSIDETEST_EXPORT PYSIDE_EXPORT
+#define PYSIDETEST_IMPORT PYSIDE_IMPORT
+
+#ifdef BUILD_PYSIDETEST
+# define PYSIDETEST_API PYSIDETEST_EXPORT
+#else
+# define PYSIDETEST_API PYSIDETEST_IMPORT
+#endif
+
+#endif // PYSIDETEST_MACROS_H
diff --git a/sources/pyside2/tests/pysidetest/testobject.cpp b/sources/pyside2/tests/pysidetest/testobject.cpp
index 441ae872f..43fa93bac 100644
--- a/sources/pyside2/tests/pysidetest/testobject.cpp
+++ b/sources/pyside2/tests/pysidetest/testobject.cpp
@@ -28,6 +28,8 @@
#include "testobject.h"
+#include <QtCore/QDebug>
+
void TestObject::emitIdValueSignal()
{
emit idValue(m_idValue);
diff --git a/sources/pyside2/tests/pysidetest/testobject.h b/sources/pyside2/tests/pysidetest/testobject.h
index f8a174d46..41a97a0db 100644
--- a/sources/pyside2/tests/pysidetest/testobject.h
+++ b/sources/pyside2/tests/pysidetest/testobject.h
@@ -29,15 +29,15 @@
#ifndef TESTOBJECT_H
#define TESTOBJECT_H
-#include <QObject>
-#include <QApplication>
-#include <QMetaType>
-#include <QVariant>
-#include <QDebug>
-#ifdef pysidetest_EXPORTS
-#define PYSIDE_EXPORTS 1
-#endif
-#include "pysidemacros.h"
+#include "pysidetest_macros.h"
+
+#include <QtWidgets/QApplication>
+
+#include <QtCore/QObject>
+#include <QtCore/QMetaType>
+#include <QtCore/QVariant>
+
+QT_FORWARD_DECLARE_CLASS(QDebug)
class IntValue
{
@@ -50,7 +50,7 @@ public:
typedef IntValue TypedefValue;
-class PYSIDE_API TestObject : public QObject
+class PYSIDETEST_API TestObject : public QObject
{
Q_OBJECT
public:
@@ -82,15 +82,15 @@ private:
int m_idValue;
QList<QObject*> m_children;
};
-PYSIDE_API QDebug operator<<(QDebug dbg, TestObject &testObject);
+PYSIDETEST_API QDebug operator<<(QDebug dbg, TestObject &testObject);
typedef int PySideInt;
namespace PySideCPP {
-class PYSIDE_API TestObjectWithNamespace : public QObject
+class PYSIDETEST_API TestObjectWithNamespace : public QObject
{
Q_OBJECT
public:
@@ -106,17 +106,18 @@ signals:
void emitSignalWithNamespace(PySideCPP::TestObjectWithNamespace* obj);
void emitSignalWithTypedef(PySideInt val);
};
-PYSIDE_API QDebug operator<<(QDebug dbg, TestObjectWithNamespace &testObject);
-class PYSIDE_API TestObject2WithNamespace : public QObject
+PYSIDETEST_API QDebug operator<<(QDebug dbg, TestObjectWithNamespace &testObject);
+
+class PYSIDETEST_API TestObject2WithNamespace : public QObject
{
Q_OBJECT
public:
TestObject2WithNamespace(QObject* parent) : QObject(parent) {}
QString name() { return "TestObject2WithNamespace"; }
};
-PYSIDE_API QDebug operator<<(QDebug dbg, TestObject2WithNamespace& testObject);
+PYSIDETEST_API QDebug operator<<(QDebug dbg, TestObject2WithNamespace& testObject);
} // Namespace PySideCPP
@@ -127,7 +128,7 @@ enum Enum1 { Option1 = 1, Option2 = 2 };
typedef long PySideLong;
-class PYSIDE_API TestObjectWithoutNamespace : public QObject
+class PYSIDETEST_API TestObjectWithoutNamespace : public QObject
{
Q_OBJECT
public:
diff --git a/sources/pyside2/tests/pysidetest/testview.h b/sources/pyside2/tests/pysidetest/testview.h
index 66d0a94d9..b80a7fca9 100644
--- a/sources/pyside2/tests/pysidetest/testview.h
+++ b/sources/pyside2/tests/pysidetest/testview.h
@@ -29,11 +29,9 @@
#ifndef TESTVIEW_H
#define TESTVIEW_H
-#include <QObject>
-#ifdef pysidetest_EXPORTS
-#define PYSIDE_EXPORTS 1
-#endif
-#include "pysidemacros.h"
+#include "pysidetest_macros.h"
+
+#include <QtCore/QObject>
QT_BEGIN_NAMESPACE
class QWidget;
@@ -41,7 +39,7 @@ class QAbstractListModel;
class QAbstractItemDelegate;
QT_END_NAMESPACE
-class PYSIDE_API TestView : public QObject
+class PYSIDETEST_API TestView : public QObject
{
Q_OBJECT
public: