aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--dist/changes-5.12.443
-rw-r--r--examples/webenginewidgets/tabbedbrowser/webengineview.py2
-rw-r--r--examples/widgets/mainwindows/application/application.py23
-rw-r--r--examples/widgets/mainwindows/mdi/mdi.py24
-rw-r--r--sources/pyside2/PySide2/glue/qtcore.cpp13
-rw-r--r--sources/pyside2/doc/_themes/pysidedocs/static/pyside.css1892
-rw-r--r--sources/pyside2/doc/_themes/pysidedocs/static/pysidedocs.css477
-rw-r--r--sources/pyside2/doc/_themes/pysidedocs/theme.conf2
-rw-r--r--sources/pyside2/doc/deployment-cxfreeze.rst30
-rw-r--r--sources/pyside2/doc/deployment-fbs.rst37
-rw-r--r--sources/pyside2/doc/deployment-pyinstaller.rst80
-rw-r--r--sources/pyside2/libpyside/pyside.cpp56
-rw-r--r--sources/pyside2/tests/QtWidgets/application_test.py8
-rw-r--r--sources/pyside2/tests/pysidetest/CMakeLists.txt1
-rw-r--r--sources/pyside2/tests/pysidetest/constructor_properties_test.py64
-rw-r--r--sources/shiboken2/ApiExtractor/CMakeLists.txt3
-rw-r--r--sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp6
-rw-r--r--sources/shiboken2/ApiExtractor/tests/testaddfunction.cpp10
-rw-r--r--sources/shiboken2/ApiExtractor/typesystem.cpp35
-rw-r--r--sources/shiboken2/ApiExtractor/typesystem.h11
-rw-r--r--sources/shiboken2/doc/_themes/pysidedocs/static/pyside.css1892
-rw-r--r--sources/shiboken2/doc/_themes/pysidedocs/static/pysidedocs.css475
-rw-r--r--sources/shiboken2/doc/_themes/pysidedocs/theme.conf2
-rw-r--r--sources/shiboken2/doc/typesystem_manipulating_objects.rst7
-rw-r--r--sources/shiboken2/generator/generator.cpp15
-rw-r--r--sources/shiboken2/generator/shiboken2/cppgenerator.cpp33
-rw-r--r--sources/shiboken2/generator/shiboken2/headergenerator.cpp6
-rw-r--r--sources/shiboken2/generator/shiboken2/shibokengenerator.cpp5
-rw-r--r--sources/shiboken2/libshiboken/basewrapper.cpp10
-rw-r--r--sources/shiboken2/libshiboken/qapp_macro.cpp41
-rw-r--r--sources/shiboken2/libshiboken/qapp_macro.h2
-rw-r--r--sources/shiboken2/libshiboken/signature.cpp20
-rw-r--r--sources/shiboken2/libshiboken/signature.h2
-rw-r--r--sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py94
35 files changed, 4260 insertions, 1163 deletions
diff --git a/.gitignore b/.gitignore
index b49ed94bc..b8977159c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -65,7 +65,7 @@ __pycache__/
.Python
build/
develop-eggs/
-dist/
+#dist/ # we place the changelogs here
downloads/
eggs/
.eggs/
diff --git a/dist/changes-5.12.4 b/dist/changes-5.12.4
new file mode 100644
index 000000000..d6d1679bc
--- /dev/null
+++ b/dist/changes-5.12.4
@@ -0,0 +1,43 @@
+Qt for Python 5.12.4 is a bug-fix release.
+
+For more details, refer to the online documentation included in this
+distribution. The documentation is also available online:
+
+https://doc.qt.io/qtforpython/
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+* PySide2 *
+****************************************************************************
+
+ - [PYSIDE-571] correct bool(qApp) on Python 2
+ - [PYSIDE-735] generate_pyi: Simplify, Enhance and Get Rid Of Any Import Problems
+ - [PYSIDE-865] opengl/contextinfo.py: Fix exception on exit
+ - [PYSIDE-865] opengl/contextinfo.py: Polish the example a bit
+ - [PYSIDE-908] Complete the help() support for Types
+ - [PYSIDE-955] Add PySide2: Add OpenGL version functions as separate module
+ - [PYSIDE-980] CMake: Change the default behavior CMAKE_BUILD_TYPE
+ - [PYSIDE-996] Fix PyInstaller after removal of COIN glitches
+ - [PYSIDE-1003] Fix Shiboken.ObjectType.__new__ for Python 2.7 V2
+ - [PYSIDE-1004] Make the __signature__ attribute writable by default
+ - [PYSIDE-1008] Fix propagation of existing LD env vars when calling generate_pyi
+ - [PYSIDE-1009] Signature: Try to recognize unknown modules in errorhandler.py
+ - [PYSIDE-1012] Fix build on centOS/conda forge
+ - [PYSIDE-1019] PySide: Allow any existing attribute in the constructor
+ - [PYSIDE-1022] TabbedBrowser Example: Fix "Open in new tab"
+ - [PYSIDE-1027] Fix negative refcount on QSocketNotifier
+
+****************************************************************************
+* Shiboken2 *
+****************************************************************************
+
+ - [PYSIDE-955] shiboken/Generators: Cache class information lists per class
+ - [PYSIDE-1016] shiboken: Fix handling shared pointers passed by const-ref, take 2
+ - [PYSIDE-1017] shiboken: Enable specifying names for a parameters of added functions
diff --git a/examples/webenginewidgets/tabbedbrowser/webengineview.py b/examples/webenginewidgets/tabbedbrowser/webengineview.py
index 7b5775bc8..4fdbf1801 100644
--- a/examples/webenginewidgets/tabbedbrowser/webengineview.py
+++ b/examples/webenginewidgets/tabbedbrowser/webengineview.py
@@ -79,7 +79,7 @@ class WebEngineView(QWebEngineView):
def is_web_action_enabled(self, web_action):
return self.page().action(web_action).isEnabled()
- def create_window(self, window_type):
+ def createWindow(self, window_type):
if window_type == QWebEnginePage.WebBrowserTab or window_type == QWebEnginePage.WebBrowserBackgroundTab:
return self._tab_factory_func()
return self._window_factory_func()
diff --git a/examples/widgets/mainwindows/application/application.py b/examples/widgets/mainwindows/application/application.py
index e0a46bdad..624fb47d5 100644
--- a/examples/widgets/mainwindows/application/application.py
+++ b/examples/widgets/mainwindows/application/application.py
@@ -229,19 +229,22 @@ class MainWindow(QtWidgets.QMainWindow):
self.statusBar().showMessage("File loaded", 2000)
def saveFile(self, fileName):
- file = QtCore.QFile(fileName)
- if not file.open(QtCore.QFile.WriteOnly | QtCore.QFile.Text):
- QtWidgets.QMessageBox.warning(self, "Application",
- "Cannot write file %s:\n%s." % (fileName, file.errorString()))
- return False
-
- outf = QtCore.QTextStream(file)
+ error = None
QtWidgets.QApplication.setOverrideCursor(QtCore.Qt.WaitCursor)
-
- # FIXME: Once file is out of scope, the file is empty, instead of having text.
- outf << self.textEdit.toPlainText()
+ file = QtCore.QSaveFile(fileName)
+ if file.open(QtCore.QFile.WriteOnly | QtCore.QFile.Text):
+ outf = QtCore.QTextStream(file)
+ outf << self.textEdit.toPlainText()
+ if not file.commit():
+ error = "Cannot write file %s:\n%s." % (fileName, file.errorString())
+ else:
+ error = "Cannot open file %s:\n%s." % (fileName, file.errorString())
QtWidgets.QApplication.restoreOverrideCursor()
+ if error:
+ QtWidgets.QMessageBox.warning(self, "Application", error)
+ return False
+
self.setCurrentFile(fileName)
self.statusBar().showMessage("File saved", 2000)
return True
diff --git a/examples/widgets/mainwindows/mdi/mdi.py b/examples/widgets/mainwindows/mdi/mdi.py
index b3c1c1eb9..9daca826d 100644
--- a/examples/widgets/mainwindows/mdi/mdi.py
+++ b/examples/widgets/mainwindows/mdi/mdi.py
@@ -43,7 +43,7 @@
"""PySide2 port of the widgets/draganddrop/draggabletext example from Qt v5.x, originating from PyQt"""
from PySide2.QtCore import (QFile, QFileInfo, QPoint, QSettings, QSignalMapper,
- QSize, QTextStream, Qt)
+ QSaveFile, QSize, QTextStream, Qt)
from PySide2.QtGui import QIcon, QKeySequence
from PySide2.QtWidgets import (QAction, QApplication, QFileDialog, QMainWindow,
QMdiArea, QMessageBox, QTextEdit, QWidget)
@@ -100,18 +100,22 @@ class MdiChild(QTextEdit):
return self.saveFile(fileName)
def saveFile(self, fileName):
- file = QFile(fileName)
-
- if not file.open(QFile.WriteOnly | QFile.Text):
- QMessageBox.warning(self, "MDI",
- "Cannot write file %s:\n%s." % (fileName, file.errorString()))
- return False
-
- outstr = QTextStream(file)
+ error = None
QApplication.setOverrideCursor(Qt.WaitCursor)
- outstr << self.toPlainText()
+ file = QSaveFile(fileName)
+ if file.open(QFile.WriteOnly | QFile.Text):
+ outstr = QTextStream(file)
+ outstr << self.toPlainText()
+ if not file.commit():
+ error = "Cannot write file %s:\n%s." % (fileName, file.errorString())
+ else:
+ error = "Cannot open file %s:\n%s." % (fileName, file.errorString())
QApplication.restoreOverrideCursor()
+ if error:
+ QMessageBox.warning(self, "MDI", error)
+ return False
+
self.setCurrentFile(fileName)
return True
diff --git a/sources/pyside2/PySide2/glue/qtcore.cpp b/sources/pyside2/PySide2/glue/qtcore.cpp
index fde016548..9db4e2e82 100644
--- a/sources/pyside2/PySide2/glue/qtcore.cpp
+++ b/sources/pyside2/PySide2/glue/qtcore.cpp
@@ -1211,8 +1211,8 @@ QByteArray ba(1 + int(%2), char(0));
// @snippet qcryptographichash-adddata
// @snippet qsocketnotifier
-Shiboken::AutoDecRef socket(%PYARG_1);
-if (!socket.isNull()) {
+PyObject *socket = %PYARG_1;
+if (socket != nullptr) {
// We use qintptr as PyLong, but we check for int
// since it is currently an alias to be Python2 compatible.
// Internally, ints are qlonglongs.
@@ -1340,18 +1340,17 @@ if (!PyTuple_SetItem(empty, 0, PyList_New(0))) {
// @snippet qcoreapplication-2
// @snippet qcoreapplication-instance
-QCoreApplication *app = QCoreApplication::instance();
PyObject *pyApp = Py_None;
-if (app) {
+if (qApp) {
pyApp = reinterpret_cast<PyObject*>(
- Shiboken::BindingManager::instance().retrieveWrapper(app));
+ Shiboken::BindingManager::instance().retrieveWrapper(qApp));
if (!pyApp)
- pyApp = %CONVERTTOPYTHON[QCoreApplication*](app);
+ pyApp = %CONVERTTOPYTHON[QCoreApplication*](qApp);
// this will keep app live after python exit (extra ref)
}
// PYSIDE-571: make sure that we return the singleton "None"
if (pyApp == Py_None)
- Py_DECREF(MakeSingletonQAppWrapper(0)); // here qApp and instance() diverge
+ Py_DECREF(MakeSingletonQAppWrapper(nullptr)); // here qApp and instance() diverge
%PYARG_0 = pyApp;
Py_XINCREF(%PYARG_0);
// @snippet qcoreapplication-instance
diff --git a/sources/pyside2/doc/_themes/pysidedocs/static/pyside.css b/sources/pyside2/doc/_themes/pysidedocs/static/pyside.css
new file mode 100644
index 000000000..956e3113b
--- /dev/null
+++ b/sources/pyside2/doc/_themes/pysidedocs/static/pyside.css
@@ -0,0 +1,1892 @@
+@import url('cookie-confirm.css') screen;
+
+/* -- admonitions -- */
+
+div.admonition {
+ margin: 1em 0 1em;
+ padding: 7px;
+}
+
+div.admonition dt {
+ font-weight: bold;
+}
+
+div.admonition dl {
+ margin-bottom: 0;
+}
+
+p.admonition-title {
+ margin: 0px 10px 5px 0px;
+ font-weight: bold;
+}
+.body {
+ width: 100%
+}
+.bodywrapper .admonition p.admonition-title {
+ margin-bottom:5px
+}
+
+.bodywrapper .admonition p {
+ margin:0
+}
+
+div.body p.centered {
+ text-align: center;
+ margin-top: 25px;
+}
+
+div.warning {
+ background-color: #ffe4e4;
+ border: 1px solid #f66;
+}
+
+div.seealso {
+ background-color: #ffffcc;
+ border: 1px solid #ffff66;
+}
+
+div.note {
+ border: 1px solid #e3e3e3;
+}
+
+table.docutils {
+ margin-right: auto;
+ margin-bottom: 10px;
+ border: none;
+ width: initial;
+}
+
+table.docutils.colwidths-given td {
+ float: none;
+}
+
+table.docutils th,
+table.docutils td {
+ padding-left:0;
+ border: none;
+}
+
+table.docutils td ul {
+ margin:0
+}
+
+table.docutils td ul > li {
+ margin: 0 0 0.5em;
+}
+h2 em {
+ float: right;
+ font-size: 10px;
+ position: relative;
+ top: -20px;
+}
+
+.document {
+ padding-bottom: 20px;
+}
+
+.documentwrapper {
+ margin-left: 255px;
+}
+
+.body blockquote {
+ border: none;
+ padding-left: 0;
+ margin-bottom: 2em;
+}
+
+.sphinxsidebar {
+ float: left;
+ width: 186px;
+ padding: 25px;
+ text-align: left;
+ background-color: #fff;
+}
+
+.sphinxsidebar ul {
+ padding: 0px;
+ margin: 0px;
+ list-style-position: inside;
+}
+
+.sphinxsidebar > ul {
+ padding: 0px;
+ margin: 0px;
+}
+
+.sphinxsidebar ul li li {
+ margin-left: 10px;
+ padding: 0px;
+ font-size: 0.95em;
+}
+
+.sphinxsidebar ul a,
+.sphinxsidebar p.topless a {
+ word-break: break-word;
+}
+
+.sphinxsidebar h3, .sphinxsidebar h3 a {
+ color: #333;
+}
+
+.sphinxsidebar p.topless {
+ margin: 1em 0 1em;
+}
+
+.pysidetoc ul {
+ list-style: none;
+ padding: 0px;
+ margin: 0px;
+}
+
+.pysidetoc em {
+ font-style: normal;
+}
+
+.pysidetoc strong {
+ display: block;
+ padding: 5px;
+ margin: 0 10px 10px 0;
+ border: 1px solid #ddd;
+ background-color: #f4f4f4;
+ -moz-border-radius:6px;
+ -webkit-border-radius:6px;
+ -khtml-border-radius:6px;
+}
+
+.section .docutils.container td {
+ float:left;
+}
+
+.hide {
+ display: none;
+}
+
+/* copy-notice */
+.document + p {
+ margin-left: 255px;
+ width: 70%;
+ font-size: 0.75em;
+ margin: 0 35px 15px 280px;
+}
+
+#searchbox {
+ border-top: 1px solid #989898;
+ padding-top: 10px;
+ margin-left: -10px;
+ margin-right: -10px;
+ padding-left: 10px;
+ padding-right: 10px;
+}
+
+#search_button {
+ border: 1px solid #3A393A;
+ background-color: #3A393A;
+ color: white;
+ cursor: pointer;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ -khtml-border-radius: 5px;
+
+}
+
+form {
+ margin: 0px;
+ padding: 0px;
+}
+
+#searchbox h3 {
+ padding: 10px 0 0 0;
+ margin-bottom: 5px;
+}
+
+/* search field */
+form #q {
+ width: 136px;
+ /* height: 22px; */
+ /* border: none; */
+ margin: 0px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ -khtml-border-radius: 5px;
+ margin-top: 2px;
+ padding: 4px;
+ line-height: 22px;
+}
+
+#search-results h2 {
+ display: none;
+}
+
+#search-results h2 {
+ display: none;
+}
+
+#search-results ul.search {
+ margin: 0px;
+ padding: 0px;
+}
+
+ul.search div.context {
+ padding-left: 40px;
+}
+
+#installation td {
+ text-align: center;
+ font-weight: bold;
+}
+
+em {
+ color: inherit;
+ font-style:italic;
+}
+
+/******** REL bar *********/
+
+.related {
+ display: inline;
+}
+
+.related h3 {
+ display: none;
+}
+
+.align-center {
+ text-align: center;
+}
+
+.contentstable {
+ width: 100%;
+}
+
+.contentstable td {
+ padding-left: 30px;
+ vertical-align: top;
+}
+
+p.biglink a {
+ font-size: 20px;
+}
+
+dt:target, .highlight {
+ background-color: #fbe54e;
+}
+
+p.highlight-link {
+ margin-top: 10px;
+ font-size: 0.8em;
+}
+
+#synopsis table, table.field-list {
+ margin: 1em 0 1em 0;
+}
+
+table.field-list tr {
+ text-align: left;
+}
+
+tt.descname {
+ font-size: 120%;
+ font-weight: bold;
+}
+
+#functions ul, #virtual-functions ul, #slots ul, #signals ul, #static-functions ul {
+ list-style: none;
+ margin: 0px;
+ padding: 10px;
+ border: 1px solid #ddd;
+ background-color: #f4f4f4;
+ -moz-border-radius:10px;
+ -webkit-border-radius:10px;
+ -khtml-border-radius:10px;
+}
+
+#synopsis span.pre {
+ color: #009491;
+ font-weight: bolder;
+}
+
+#detailed-description .class dt,
+#detailed-description .method dt,
+#detailed-description .staticmethod dt,
+#detailed-description .attribute dt {
+ margin: 0px;
+ margin-bottom: 10px;
+ padding: 10px;
+ border: 1px solid #ddd;
+ background-color: #f4f4f4;
+ -moz-border-radius:10px;
+ -webkit-border-radius:10px;
+ -khtml-border-radius:10px;
+}
+
+.document dl.attribute,
+.document dl.class,
+.document dl.method,
+.document dl.staticmethod {
+ margin-top: 2em;
+}
+
+.document dl.attribute dd,
+.document dl.class dd,
+.document dl.method dd,
+.document dl.staticmethod dd {
+ padding-left: 1em;
+}
+
+/* Qt theme */
+#navbar {
+ position:fixed;
+ top:0;
+ left:0;
+ z-index:100;
+ background:#fff;
+ width:100%
+}
+#navbar .container, .fixed .container {
+ max-width:1280px;
+ margin:0 auto;
+ padding:0 3.9%; /* 0? */
+ position:relative;
+ overflow:visible
+}
+#navbar .navbar-header {
+ position:relative
+}
+#menuextras li a:hover span {
+ color: #41cd52;
+}
+/* new header */
+#mm-wrap, #mm-wrap #mm-helper,
+#mm-wrap #mm-helper li.mm-item,
+#mm-wrap #mm-helper a.mm-link {
+ -moz-transition: none;
+ -o-transition: none;
+ -webkit-transition: none;
+ transition: none;
+ -webkit-border-radius: 0 0 0 0;
+ -moz-border-radius: 0 0 0 0;
+ -ms-border-radius: 0 0 0 0;
+ -o-border-radius: 0 0 0 0;
+ border-radius: 0 0 0 0;
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ -ms-box-shadow: none;
+ -o-box-shadow: none;
+ box-shadow: none;
+ background: none;
+ border: 0;
+ bottom: auto;
+ box-sizing: border-box;
+ clip: auto;
+ color: #090e21;
+ display: block;
+ float: none;
+ font-family: inherit;
+ font-size: 14px;
+ height: auto;
+ left: auto;
+ line-height: 1.7;
+ list-style-type: none;
+ margin: 0;
+ min-height: 0;
+ opacity: 1;
+ outline: none;
+ overflow: visible;
+ padding: 0;
+ position: relative;
+ right: auto;
+ text-align: left;
+ text-decoration: none;
+ text-transform: none;
+ top: auto;
+ vertical-align: baseline;
+ visibility: inherit;
+ width: auto;
+}
+#mm-wrap #mm-helper {
+ visibility:visible;
+ text-align:right;
+ padding:0 0px 0 0px
+}
+#navbar #mm-wrap #mm-helper li.mm-item {
+ border-right:solid #f3f3f4 1px;
+ padding-right:30px;
+ padding-left:30px
+}
+#navbar #mm-wrap #mm-helper li.mm-item > a:hover {
+ opacity: .5
+}
+#mm-wrap #mm-helper > li.mm-item {
+ margin:0 0 0 0;
+ display:inline-block;
+ height:auto;
+ vertical-align:middle
+}
+#navbar #mm-wrap #mm-helper li.mm-item:nth-child(3) {
+ border-right:0
+}
+#mm-wrap #mm-helper a.mm-link {
+ cursor: pointer
+}
+@media (max-width: 1279px) {
+ #navbar {
+ padding:0;
+ position:relative;
+ }
+ #navbar .container {
+ max-width:100%
+ }
+ .container {
+ padding:0 2%
+ }
+}
+#navbar .navbar-oneQt {
+ display:inline;
+ float:left;
+ width:31px;
+ color:#41cd52
+}
+#navbar .navbar-oneQt:before {
+ content:attr(data-icon);
+ position:absolute;
+ top:14px;
+ left:0;
+ color:#41cd52;
+ font-family:'Qt Icons';
+ line-height:1;
+ font-size:40px;
+ transition:all 0.3s ease-in-out;
+}
+#mm-wrap {
+ clear:both;
+ background:rgba(255, 255, 255, 0.1);
+ -webkit-border-radius:0px 0px 0px 0px;
+ -moz-border-radius:0px 0px 0px 0px;
+ -ms-border-radius:0px 0px 0px 0px;
+ -o-border-radius:0px 0px 0px 0px;
+ border-radius:0px 0px 0px 0px
+}
+#mm-wrap #mm-helper li.mm-item:last-child a {
+ background:transparent url("icon_avatar.png") 50% 50% no-repeat !important;
+ background-size:24px !important;
+ width:24px !important;
+ height:24px !important;
+}
+#navbar #mm-wrap #mm-helper li.mm-item > a {
+ opacity:1;
+ -webkit-transition:all 0.3s ease-in-out;
+ -moz-transition:all 0.3s ease-in-out;
+ -ms-transition:all 0.3s ease-in-out;
+ -o-transition:all 0.3s ease-in-out;
+ transition:all 0.3s ease-in-out;
+}
+#mm-wrap #mm-helper > li.mm-item > a.mm-link {
+ border-top:0px solid #fff;
+ border-left:0px solid #fff;
+ border-right:0px solid #fff;
+ border-bottom:0px solid #fff;
+ outline:none;
+ text-decoration:none;
+ padding:0 0 0 0;
+ line-height:70px;
+ font-weight:normal;
+ height:70px;
+ vertical-align:baseline;
+ text-align:left;
+ width:auto;
+ display:block;
+ color:#090e21;
+ text-transform:none;
+ text-decoration:none;
+ background:rgba(0, 0, 0, 0);
+ -webkit-border-radius:0px 0px 0px 0px;
+ -moz-border-radius:0px 0px 0px 0px;
+ -ms-border-radius:0px 0px 0px 0px;
+ -o-border-radius:0px 0px 0px 0px;
+ border-radius:0px 0px 0px 0px;
+ font-family:inherit;
+ font-size:14px;
+}
+/* end new header */
+@media (min-width: 1320px) {
+ .body .flowListDiv dl.flowList {
+ -webkit-column-count:3;
+ -moz-column-count:3;
+ column-count:3
+ }
+}
+@media (min-width: 1120px) {
+ #navbar.fixed {
+ -moz-box-shadow:0px 0px 8px rgba(0,0,0,0.23);
+ -webkit-box-shadow:0px 0px 8px rgba(0,0,0,0.23);
+ box-shadow:0px 0px 8px rgba(0,0,0,0.23)
+ }
+ #navbar.fixed #mm-wrap #mm-helper > li.mm-item > a.mm-link {
+ height:50px;
+ line-height:50px
+ }
+ #navbar.fixed .navbar-oneQt:before {
+ font-size:35px;
+ top:7px
+ }
+
+ .flowListDiv dl.flowList {
+ -webkit-column-count:2;
+ -moz-column-count:2;
+ column-count:2
+ }
+}
+@media (max-width: 1120px) {
+ #navbar {
+ padding:0;
+ position:relative
+ }
+ #navbar .navbar-oneQt:before {
+ left:10px
+ }
+ #navbar .container {
+ max-width:100%;
+ padding:0
+ }
+ #footerbar .container {
+ padding:0
+ }
+ body .main {
+ margin-top:0px
+ }
+ #footerbar .footer-main .footer-nav {
+ padding:3.9% 0 3.9% 3%;
+ border-bottom:1px solid #413d3b;
+ float:none;
+ display:block;
+ width:auto
+ }
+ #footerbar .footer-main .theqtcompany {
+ clear:both;
+ float:left;
+ margin:30px 0 8px 3%
+ }
+ #footerbar .footer-main .footer-social {
+ float:left;
+ padding:50px 0px 0px 3%
+ }
+ #footerbar #menu-footer-submenu {
+ clear:both;
+ float:none;
+ display:block;
+ padding:0px 0px 3.9% 3%
+ }
+ ul#menu-footer-submenu {
+ margin-left: 0
+ }
+}
+.cookies_yum {
+ background-color:#cecfd5;
+ display:none;
+ width:100%
+}
+.cookies_yum img {
+ width:25px;
+ top:6px;
+ display:inline-block;
+ position:absolute;
+ left:13px
+}
+.cookies_yum div {
+ margin:0 auto;
+ max-width:1280px;
+ min-height:30px;
+ padding:6px 0px 6px 0px;
+ position:relative
+}
+.cookies_yum p {
+ color:#09102b;
+ margin:0px;
+ font-size:0.79em;
+ display:inline-block;
+ line-height:1.2;
+ padding:0 30px 0 50px
+}
+.cookies_yum p a {
+ white-space:nowrap
+}
+.cookies_yum a:hover {
+ color:#46a2da
+}
+.cookies_yum .close {
+ width:15px;
+ height:15px;
+ background-image:url("cookiebar-x.png");
+ background-size:15px 30px;
+ background-position:top left;
+ cursor:pointer;
+ top:13px;
+ right:13px;
+ position:absolute;
+ transition:none
+}
+.cookies_yum .close:hover {
+ background-position:bottom left
+}
+#sidebar-toggle,#toc-toggle {
+ width:24px;
+ height:14px;
+ background-size:24px 28px;
+ cursor:pointer;
+ background-image:url("list_expand.png");
+ float:right
+}
+#sidebar-toggle.collapsed,
+#toc-toggle.collapsed {
+ background-position:bottom left
+}
+#sidebar-content > h2 {
+ display:none
+}
+#footerbar {
+ background:#222840;
+ color:#fff;
+ font-size: 0.9em;
+}
+#footerbar.fixed {
+ bottom:0;
+ left:0;
+ width:100%
+}
+#footerbar .footer-nav {
+ display:inline;
+ float:left
+}
+#footerbar .footer-main .footer-nav li {
+ float:left;
+ margin-right:1em
+}
+#footerbar .footer-main .footer-nav li a {
+ display:block;
+ padding:30px 0 10px 0;
+ line-height:20px;
+ height:20px;
+ color:#fff;
+ font-weight: 600;
+}
+#footerbar .footer-main .footer-nav li a:hover,#footerbar .footer-main .footer-nav li.current-menu-item a {
+ color:#eee
+}
+#footerbar .footer-main .footer-nav .sub-menu {
+ margin-left:0;
+ margin-bottom:0
+}
+#footerbar .footer-main .footer-nav .sub-menu li {
+ float:none;
+ width: 100%;
+}
+#footerbar .footer-main .footer-nav .sub-menu ul {
+ padding:1px 1em;
+ font-size:0.786em;
+ line-height:8px;
+ float:none;
+ color:#5d5b59;
+ margin-bottom:0
+}
+#footerbar .footer-main .footer-nav .sub-menu li a {
+ padding:2px 0;
+ font-size:1em;
+ float:none;
+ color:#cecfd5;
+ font-weight: 400;
+}
+#footerbar .footer-main .footer-nav .sub-menu li a:hover,#footerbar .footer-main .footer-nav .sub-menu li.current-menu-item a {
+ color:#eee
+}
+#footerbar .theqtcompany {
+ background:url("theqtcompany.png") no-repeat;
+ background-size:100%;
+ width:215px;
+ height:68px;
+ display:inline;
+ float:right;
+ margin:29px 0 28px 30px
+}
+#footerbar .footer-social {
+ display:inline;
+ float:right;
+ width:164px
+}
+#footerbar .footer-main .footer-social>div {
+ margin-left:0.1em;
+ margin-bottom:10px
+}
+#footerbar .disclaimer {
+ font-size:0.786em;
+ line-height:2.73;
+ color:#868584;
+ padding-top:20px;
+ padding-bottom:0.5%
+}
+#footerbar .disclaimer a {
+ color:#bdbebf
+}
+#footerbar .disclaimer a:hover {
+ color:#d6d6d6
+}
+#footerbar .disclaimer ul li {
+ float:left;
+ vertical-align:middle;
+ margin-left:1.18em
+}
+#footerbar .disclaimer ul li:first-child {
+ margin-left:0
+}
+#footerbar .disclaimer ul.lang-selector a {
+ color:#506a34;
+ color:rgba(128,195,66,0.3)
+}
+#footerbar .disclaimer ul.lang-selector a:hover {
+ color:#80c342;
+ color:rgba(128,195,66,0.7)
+}
+#menu-footer-menu, #menu-footer-menu ul {
+ margin-left:0;
+ margin-bottom:0
+}
+@font-face {
+ font-family: 'Titillium Web';
+ font-style: normal;
+ font-weight: 400;
+ src: url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.eot");
+ /* IE9 Compat Modes */
+ src: local("Titillium Web"), local("TitilliumWeb-Regular"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.eot?#iefix") format("embedded-opentype"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.woff2") format("woff2"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.woff") format("woff"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.ttf") format("truetype"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.svg#TitilliumWeb") format("svg");
+ /* Legacy iOS */
+}
+/* titillium-web-italic - latin_latin-ext */
+@font-face {
+ font-family: 'Titillium Web';
+ font-style: italic;
+ font-weight: 400;
+ src: url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-italic.eot");
+ /* IE9 Compat Modes */
+ src: local("Titillium WebItalic"), local("TitilliumWeb-Italic"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-italic.eot?#iefix") format("embedded-opentype"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-italic.woff2") format("woff2"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-italic.woff") format("woff"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-italic.ttf") format("truetype"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-italic.svg#TitilliumWeb") format("svg");
+ /* Legacy iOS */
+}
+/* titillium-web-600 - latin_latin-ext */
+@font-face {
+ font-family: 'Titillium Web';
+ font-style: normal;
+ font-weight: 600;
+ src: url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-600.eot");
+ /* IE9 Compat Modes */
+ src: local("Titillium WebSemiBold"), local("TitilliumWeb-SemiBold"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-600.eot?#iefix") format("embedded-opentype"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-600.woff2") format("woff2"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-600.woff") format("woff"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-600.ttf") format("truetype"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-600.svg#TitilliumWeb") format("svg");
+ /* Legacy iOS */
+}
+@font-face {
+ font-family:'Droid Sans Mono';
+ font-style:normal;
+ font-weight:400;
+ src:local("Droid Sans Mono"),local("DroidSansMono"),url(//fonts.gstatic.com/s/droidsansmono/v7/ns-m2xQYezAtqh7ai59hJUYuTAAIFFn5GTWtryCmBQ4.woff) format("woff")
+}
+@font-face {
+ font-family:'Qt Icons';
+ src:url("../style/icomoon.eot?-tgjuoj");
+ src:url("../style/icomoon.eot?#iefix-tgjuoj") format("embedded-opentype"),url("../style/icomoon.woff?-tgjuoj") format("woff"),url("../style/icomoon.ttf?-tgjuoj") format("truetype"),url("../style/icomoon.svg?-tgjuoj#icomoon") format("svg");
+ font-weight:normal;
+ font-style:normal
+}
+@font-face {
+ font-family:'social-icons';
+ src:url("../style/social-icons.eot?54625607");
+ src:url("../style/social-icons.eot?54625607#iefix") format("embedded-opentype"),
+ url("../style/social-icons.woff?54625607") format("woff");
+ font-weight:normal;
+ font-style:normal
+}
+.clearfix:before,.clearfix:after {
+ content:" ";
+ display:table
+}
+.clearfix:after {
+ clear:both
+}
+.clearfix {
+ *zoom:1
+}
+.clearfix .right {
+ float:right
+}
+html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video {
+ margin:0;
+ padding:0;
+ border:0;
+ font-size:100%
+}
+html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,caption,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video {
+ vertical-align:baseline
+}
+h1,h2,h3,h4,h5,h6 {
+ font-weight:300
+}
+.body h2,.body h3,.body h4,.body h5,.body h6 {
+ margin:1.5em 0 0.75em
+}
+.body h1 {
+ margin-bottom:0.75em;
+ font-size:2.25em;
+}
+.body h3.fn,.body h3.flags {
+ color:#26282a;
+ font-size:1.46em;
+ padding:15px 0 15px 0;
+ border-bottom:2px #eee solid;
+ word-wrap:break-word
+}
+.body .fngroup {
+ border-bottom:2px #eee solid;
+ padding-bottom:15px;
+ margin-bottom:1.5em
+}
+.body .fngroup h3.fngroupitem {
+ margin:0;
+ padding-bottom:0;
+ border:none
+}
+.body h3.fn .name,
+.body h3 span.type,
+.qmlname span.name {
+ font-weight: 400
+}
+.qmlname {
+ font-size:1.46em
+}
+.qmlproto table {
+ border:none;
+ border-bottom:2px #eee solid
+}
+.qmlproto table p {
+ max-width:100%
+}
+.qmlproto table tr {
+ background-color:#fff
+}
+.qmlname td, .qmlname th {
+ border:none;
+ text-align:left;
+ padding:5px 0 0 0
+}
+.qmlreadonly,.qmldefault {
+ padding:0 5px 0 5px;
+ font-size:0.75em;
+ background-color:#eee;
+ float:right
+}
+.qmlreadonly {
+ color:#414141
+}
+.qmldefault {
+ color:#D14141
+}
+.rightAlign {
+ padding:3px 5px 3px 10px;
+ text-align:right
+}
+.centerAlign.functionIndex {
+ text-align:center;
+ font-size:150%;
+ margin-bottom: 1em
+}
+article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section {
+ display:block
+}
+body {
+ line-height:1;
+ font-family:'Titillium Web', Arial, Helvetica, sans-serif;
+ font-weight:400;
+ transition-duration:1s;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ font-size: 16px;
+ background-color:#f3f3f4;
+ color:#404244;
+}
+ol,ul {
+ list-style:none
+}
+.body ol,.body ul {
+ margin-top:0.75em;
+ margin-left:20px
+}
+.bodywrapper ol>li {
+ list-style-type:decimal;
+ margin-left:15px
+}
+.bodywrapper ol.a >li {
+ list-style-type:lower-alpha;
+}
+.bodywrapper ol.A >li {
+ list-style-type:upper-alpha;
+}
+.bodywrapper ol.i >li {
+ list-style-type:lower-roman;
+}
+.bodywrapper ol.I >li {
+ list-style-type:upper-roman;
+}
+.body li p {
+ margin-top:1em
+}
+blockquote,q {
+ quotes:none;
+ border-left:10px solid #ddd;
+ padding-left:10px
+}
+blockquote:before,blockquote:after,q:before,q:after {
+ content:'';
+ content:none;
+ width:100%
+}
+table {
+ border-collapse:collapse;
+ border-spacing:0;
+ margin-bottom:5px;
+ width:100%
+}
+a {
+ color:#17a81a;
+ text-decoration:none;
+ transition-duration:0.3s
+}
+a:hover {
+ color:#17a81a
+}
+.main,#footerbar>div {
+ max-width:1280px;
+ width:95%;
+ margin:0 auto
+}
+.main {
+ margin-top:80px
+}
+@media (max-width: 1120px) {
+ .main,.navbar-header,#footerbar>div {
+ width: 100%;
+ margin: 0;
+ }
+ .main .main-rounded {
+ padding: 0 15px;
+ }
+}
+.main_index {
+ background-color:#fff
+}
+.sectionlist {
+ margin-bottom:2em
+}
+[class*="col-"] {
+ letter-spacing:normal
+}
+.landing,.main_index .row {
+ letter-spacing:-0.31em
+}
+.main_index .row>div {
+ letter-spacing:normal
+}
+.col-1,.body {
+ display:inline-block;
+ background-color:#fff;
+ padding: 25px 35px 20px 30px;
+ -webkit-box-sizing:border-box;
+ -moz-box-sizing:border-box;
+ -ms-box-sizing:border-box;
+ box-sizing:border-box;
+}
+.col-1 h2 {
+ font-size:1.8em;
+ font-weight:300;
+ line-height:1.1;
+ margin-bottom:0.83em;
+ margin-top:1em
+}
+.icons1of3 img {
+ display:inline-block;
+ float:left;
+ margin-right:0.75em;
+ margin-top:-5px;
+ width:2.75em
+}
+div.multi-column {
+ position:relative
+}
+div.multi-column div {
+ display:-moz-inline-box;
+ display:inline-block;
+ vertical-align:top;
+ margin-top:1em;
+ margin-right:2em;
+ width:16em
+}
+.sidebar {
+ display:block;
+ position:relative;
+ position:sticky;
+ float:left;
+ -webkit-box-sizing:border-box;
+ -moz-box-sizing:border-box;
+ -ms-box-sizing:border-box;
+ box-sizing:border-box;
+ width:20%;
+ padding-right:20px
+}
+.sidebar li {
+ text-overflow:ellipsis;
+ overflow:hidden
+}
+.toc,.sectionlist {
+ padding:25px;
+ background-color:#fff;
+ margin-bottom:1.25em
+}
+.sidebar .sectionlist p {
+ margin-bottom:0
+}
+.sectionlist.promo {
+ padding:0;
+ background-color:#f3f3f4
+}
+.sidebar-content:empty {
+ display:none;
+ visibility:hidden
+}
+.col-2 h2,.toc h3,.sidebar-content h2,
+.sidebar-content h3,.sectionlist h2,
+.sphinxsidebar h3 {
+ font-weight:400;
+ margin-bottom:1em
+}
+.toc h3 a {
+ color:#404244
+}
+.title {
+ font-size:2.25em;
+ font-weight:300;
+ letter-spacing:-1px;
+ line-height:1.15em;
+ margin-bottom:0.5em;
+ word-wrap:break-word
+}
+.navigationbar,col-1 h2 {
+ font-size:0.85em
+}
+.navigationbar h1 {
+ font-size:2.5em;
+ margin-bottom:0.85em;
+ margin-top:0.85em
+}
+.navigationbar li {
+ display:inline-block;
+ margin-right:5px;
+ position:relative;
+ padding-right:10px;
+ color:#585a5c
+}
+.navigationbar ul:last-of-type li a {
+ color:#404244
+}
+.sectionlist li, .sphinxsidebar li {
+ padding-bottom: 10px;
+ line-height: 1.75em;
+}
+.col-1 ul {
+ margin-bottom:1.56em
+}
+.bodywrapper li {
+ margin-top:0.5em;
+ line-height:1.25em
+}
+.bodywrapper li.level2 {
+ margin-left:10px;
+ margin-top:0.4em;
+ font-size:0.9375em;
+}
+.bodywrapper p,
+.bodywrapper dd {
+ line-height:1.25em;
+ margin:1em 0 1em;
+ color:#404244
+}
+.bodywrapper b {
+ font-weight:600
+}
+.body ul,.body ol {
+ /* margin-bottom:1.5em */
+}
+.bodywrapper ul ul {
+ margin-top:0.5em
+}
+.bodywrapper .naviNextPrevious {
+ margin-top:25px;
+ max-width:100%
+}
+.naviNextPrevious.headerNavi,
+p.naviNextPrevious + p {
+ display:none
+}
+.nextPage {
+ float:right
+}
+.prevPage:before {
+ content:"< "
+}
+.nextPage:after {
+ content:" >"
+}
+.navigationbar li a {
+ color:#404244
+}
+.navigationbar li:after {
+ color:#404244;
+ content:"›";
+ display:inline-block;
+ font-size:1.5em;
+ line-height:1;
+ position:absolute;
+ right:-2px;
+ top:-4px
+}
+.sub-navigation {
+ margin-top:10px
+}
+.navigationbar li:last-child:after,.sub-navigation li:after {
+ content:none
+}
+.navigationbar {
+ margin-bottom:10px;
+ line-height:1em
+}
+#buildversion {
+ margin-bottom:10px;
+ font-style:italic;
+ font-size:small;
+ float:right
+}
+.copy-notice {
+ width:75%;
+ font-size:0.75em;
+ margin:20px 35px 0 10px;
+ line-height:1.75em;
+ float:right;
+ color:#585a5c
+}
+.copy-notice.index {
+ margin-top:10px;
+ float:none
+}
+li a.active {
+ color:#585a5c
+}
+.flowList {
+ padding:25px
+}
+.flowListDiv dl {
+ -webkit-column-count:1;
+ -moz-column-count:1;
+ column-count:1
+}
+.flowList dd {
+ display:inline-block;
+ margin-left:10px;
+ width:90%;
+ line-height:1.15em;
+ overflow-x:hidden;
+ text-overflow:ellipsis
+}
+.alphaChar {
+ font-size:2em;
+ position:absolute
+}
+.flowList.odd {
+ background-color:#f9f9f9
+}
+.body ul>li,.doc-column ul>li {
+ list-style-image:url("list_arrow.png");
+ margin-left:15px;
+ color:#404244;
+ margin-top:0.65em;
+ line-height:1em
+}
+.bodywrapper table p {
+ margin:0px;
+ padding:0px
+}
+.bodywrapper table p {
+ margin:0px;
+ padding:0px;
+ min-height:1.25em
+}
+.bodywrapper .qmldoc {
+ margin-top:0.75em
+}
+.body h2 {
+ margin-top: 1.5em;
+ font-size:1.75em
+}
+.body h3 {
+ font-size:1.35em
+}
+.body h4 {
+ font-size:1.15em
+}
+.body p img {
+ margin-top:0.75em;
+ max-width:100%
+}
+.body .border img {
+ box-shadow:3px 3px 8px 3px rgba(200,200,200,0.5)
+}
+.body .border .player {
+ box-shadow:3px 3px 8px 3px rgba(200,200,200,0.5)
+}
+.body p.figCaption {
+ transform:translateY(-30px);
+ color:#606366;
+ font-size:95%;
+ margin-left:3px;
+ font-style:italic
+}
+.body table {
+ width:initial;
+ vertical-align:initial
+}
+table .odd {
+ background-color:#f9f9f9
+}
+table thead {
+ text-align:left;
+ padding-left:20px
+}
+table,table td,table th {
+ border:1px solid #eee
+}
+table td,table th {
+ padding:5px 20px;
+ line-height:1.3
+}
+.body .fixed table td {
+ min-width:50%;
+ width:50%
+}
+table.alignedsummary,table.propsummary {
+ width:initial
+}
+table.valuelist td.tblval {
+ font-size:0.75em
+}
+div.main_index .row {
+ border-bottom:10px solid #f3f3f4
+}
+div.main_index .row {
+ position:relative
+}
+div.main_index .row>div {
+ display:inline-block;
+ width:50%;
+ vertical-align:top;
+ padding:2em 3em;
+ -webkit-box-sizing:border-box;
+ -moz-box-sizing:border-box;
+ -ms-box-sizing:border-box;
+ box-sizing:border-box
+}
+div.main_index h2 {
+ font-size:2.1875em;
+ margin-bottom:1em
+}
+#search_bar {
+ width:40%;
+ float:right
+}
+div.main_index .row:after {
+ content:"";
+ position:absolute;
+ top:0;
+ right:50%;
+ height:100%;
+ width:10px;
+ background-color:#f3f3f4
+}
+div.table {
+ overflow-x:auto
+}
+.body tr > td > pre {
+ font-size:0.75em
+}
+p.qt_commercial {
+ border:3px solid #5caa15;
+ margin:0 auto;
+ padding:15px;
+ width:28%;
+ text-align:center;
+ clear:both
+}
+h1.qt_commercial {
+ padding:20px;
+ background-color:#5caa15;
+ display:inline;
+ float:right;
+ font-size:1.25em;
+ line-height:1.25em;
+ height:1.25em;
+ color:#fff
+}
+div.qt_commercial {
+ border-top:5px solid #5caa15;
+ margin-bottom:50px
+}
+div.pre {
+ position:relative;
+ height:auto
+}
+pre, .LegaleseLeft {
+ background-color:#3a4055;
+ color:#fff;
+ display:block;
+ font-family:"Droid Sans Mono";
+ line-height:1.5;
+ overflow-x:auto;
+ margin-bottom:25px;
+ padding:25px;
+ margin-top:0.75em;
+ font-size: .8em;
+}
+.bodywrapper .LegaleseLeft p {
+ color:#fff;
+ white-space: pre-wrap
+}
+pre .str,code .str {
+ color:#aaaaaa
+}
+pre .kwd,code .kwd {
+ color:#ffff55
+}
+pre .com,code .com {
+ color:#55ffff
+}
+pre .typ,code .typ {
+ color:#4f9d08
+}
+pre a .typ,code a .typ {
+ color:#21be2b
+}
+pre .lit,code .lit {
+ color:#ff55ff
+}
+pre .pun,code .pun {
+ color:#fff
+}
+pre .pln,code .pln {
+ color:#fff
+}
+@media print {
+ pre {
+ background-color:#eee !important
+ }
+ pre .str,code .str {
+ color:#060
+ }
+ pre .kwd,code .kwd{
+ color:#006;
+ font-weight:bold
+ }
+ pre .com,code .com {
+ color:#600
+ }
+ pre .typ,code .typ {
+ color:#404;
+ font-weight:bold
+ }
+ pre .lit,code .lit {
+ color:#044
+ }
+ pre .pun,code .pun {
+ color:#440
+ }
+ pre .pln,code .pln {
+ color:#000
+ }
+}
+pre.wrap {
+ white-space:pre-wrap
+}
+pre span.wrap {
+ display:none;
+ background:url("wrap.png") no-repeat;
+ right:0;
+ top:2px;
+ position:absolute;
+ width:20px;
+ height:14px;
+ margin:4px;
+ opacity:0.65
+}
+span.wrap:hover {
+ opacity:1
+}
+span.wrap:active {
+ opacity:0.75
+}
+.copy_text {
+ background-color:#46a2da;
+ color:#fff;
+ border:2px solid #46a2da;
+ padding:10px 16px;
+ margin-left:-10px;
+ margin-top:-50px;
+ position:absolute;
+ opacity:0;
+ cursor:pointer;
+ float:right
+}
+.copy_text:hover {
+ background-color:#fff;
+ color:#46a2da
+}
+code,.codelike {
+ font-family:"Droid Sans Mono"
+}
+h3.fn code {
+ font-size:0.75em;
+ float:right;
+ background-color:#eee;
+ padding:3px;
+ margin: 3px 0 0 20px
+}
+pre:hover>.copy_text {
+ display:inline-block;
+ opacity:1;
+ transition:0.5s ease
+}
+#main_title_bar {
+ background:url("pyside-logo.png") no-repeat;
+ background-size:100%;
+ width:366px;
+ height:86px;
+ margin:15px 0 15px 0
+}
+#main_title_bar h1 {
+ visibility:hidden
+}
+#main_title_bar .search_bar {
+ letter-spacing:normal;
+ width:50%;
+ display:inline-block;
+ -webkit-box-sizing:border-box;
+ -moz-box-sizing:border-box;
+ -ms-box-sizing:border-box;
+ box-sizing:border-box;
+ vertical-align:middle
+}
+#main_title_bar h1 {
+ letter-spacing:normal;
+ display:inline-block;
+ -webkit-box-sizing:border-box;
+ -moz-box-sizing:border-box;
+ -ms-box-sizing:border-box;
+ box-sizing:border-box;
+ vertical-align:middle
+}
+#main_title_bar .search_bar * {
+ letter-spacing:normal;
+ padding:0;
+ margin:0;
+ border:none
+}
+#sidebar-toggle,#toc-toggle {
+ display:none
+}
+@media (max-width: 980px) {
+ body {
+ font-size:calc-em(14px)
+ }
+ #main_title_bar>h1,#main_title_bar .search_bar {
+ width:100%
+ }
+ #main_title_bar .search_bar {
+ margin-bottom:15px
+ }
+ .main {
+ margin-top:0px
+ }
+ .main_index .row {
+ border:none !important
+ }
+ .title {
+ font-size:1.5em;
+ font-weight:400;
+ word-wrap:break-word
+ }
+ .col-1,.body,.naviNextPrevious,.sidebar {
+ padding:10px
+ }
+ .sidebar {
+ position:relative;
+ padding-top:0
+ }
+ .search .sidebar {
+ display:none;
+ visibility:hidden
+ }
+ .col-2 h2,.toc h3,.sidebar-content h2,.sidebar-content h3,.sectionlist h2 {
+ text-align:center;
+ margin-bottom:5px
+ }
+ div.main_index .row:after {
+ content:none
+ }
+ div.main_index .row>div {
+ display:block !important;
+ width:100%;
+ padding:15px;
+ margin:0
+ }
+ .body,.sidebar,.col-1 {
+ width:100%
+ }
+ .sidebar-content,.col-2,.toc {
+ background-color:#fff;
+ margin-bottom:1em;
+ padding:20px
+ }
+ #sidebar-toggle,#toc-toggle {
+ display:block
+ }
+ #sidebar-toggle.collapsed + h2 {
+ display:block
+ }
+ .bodywrapper p {
+ margin-bottom:1em;
+ max-width:100%
+ }
+ table td,table th {
+ padding:5px 5px
+ }
+ .sectionlist {
+ padding:0
+ }
+ .sidebar > .sectionlist {
+ padding:20px
+ }
+ .sectionlist.promo {
+ max-width:46%;
+ margin:0 auto 1em auto;
+ float:left;
+ padding:0 2%
+ }
+ .sidebar .sidebar-content {
+ clear:both
+ }
+ .copy-notice {
+ float:none;
+ width:initial
+ }
+}
+[id]:target > *:first-child,
+dt[id]:target {
+ -webkit-animation:highlighter 3s;
+ animation:highlighter 3s
+}
+@-webkit-keyframes highlighter {
+ 25% {
+ background-color:#d1e8f6;
+ color:#444
+ }
+ 75% {
+ background-color:#d1e8f6;
+ color:#444
+ }
+}
+@keyframes highlighter {
+ 25% {
+ background-color:#d1e8f6;
+ color:#444
+ }
+ 75% {
+ background-color:#d1e8f6;
+ color:#444
+ }
+}
+@-webkit-keyframes copypaste {
+ 25% {
+ opacity:1
+ }
+ 100% {
+ border-radius:10px;
+ margin-top:-50px;
+ opacity:1
+ }
+}
+@keyframes copypaste {
+ 25% {
+ opacity:1
+ }
+ 100% {
+ border-radius:10px;
+ margin-top:-50px;
+ opacity:1
+ }
+}
+#footer {
+ clear:both
+}
+.footer-social i {
+ font-family: "social-icons";
+ font-style: normal;
+ font-size:150%;
+ margin: .55em;
+ color: #cecfd5
+}
+.footer-social i:hover {
+ color: #eee
+}
+.footer-social .icon-twitter:before {
+ content: '\f099'
+}
+.footer-social .icon-facebook:before {
+ content: '\f09a'
+}
+.footer-social .icon-youtube:before {
+ content: '\f16a'
+}
+.menuextraslanguages {
+ display:none;
+ visibility:hidden
+}
+form.gsc-search-box {
+ font-size: 25px !important;
+ margin-top: 0 !important;
+ margin-right: 0 !important;
+ margin-bottom: 4px !important;
+ margin-left: 0 !important;
+ width: 102.5% !important;
+}
+table.gsc-search-box {
+ border-style: none !important;
+ border-width: 0 !important;
+ border-spacing: 0 0 !important;
+ width: 100% !important;
+ margin-bottom: 2px !important;
+}
+
+table.gsc-search-box td {
+ vertical-align: middle !important;
+}
+
+table.gsc-search-box td.gsc-input {
+ padding-right: 0px !important;
+}
+table.gsc-search-box td.gsc-input input {
+ background-position: 10px center !important;
+}
+
+td.gsc-search-button {
+ width: 1% !important;
+}
+
+td.gsc-clear-button {
+ width: 14px !important;
+ visibility:hidden !important;
+ display:none !important;
+}
+table.gsc-branding td,
+table.gsc-branding {
+ margin: 0 0 0 0 !important;
+ padding: 0 0 0 0 !important;
+ border: none !important;
+}
+
+table.gsc-branding {
+ border-style: none !important;
+ border-width: 0 !important;
+ border-spacing: 0 0 !important;
+ width: 100% !important;
+}
+
+.gsc-branding-text {
+ color: #676767 !important;
+}
+
+td.gsc-branding-text {
+ vertical-align: top !important;
+}
+td.gsc-branding-text div.gsc-branding-text {
+ padding-bottom: 2px !important;
+ text-align: right !important;
+ font-size: 11px !important;
+ margin-right: 2px !important;
+}
+
+td.gsc-branding-img {
+ width: 65px !important;
+ vertical-align: bottom !important;
+}
+
+img.gsc-branding-img {
+ padding-top: 1px !important;
+ margin: 0 0 0 0 !important;
+ padding-right: 0 !important;
+ padding-left: 0 !important;
+ padding-bottom: 0 !important;
+ border: none !important;
+ display: inline !important;
+}
+
+input.gsc-search-button {
+ background-color: white !important;
+ height: 35px !important;
+ width: 25px !important;
+ color: transparent !important;
+ background-image: url("doc_search.png") !important;
+ background-size: 25px auto;
+ background-position: 0px 5px;
+ background-repeat: no-repeat;
+ margin-left: -43px !important;
+ overflow: hidden;
+ min-width: 20px !important;
+}
+
+input.gsc-search-button:hover {
+ cursor: pointer;
+}
+
+input.gsc-search-button:focus {
+ outline: none;
+ box-shadow: none;
+}
+
+.gsc-search-box-tools .gsc-clear-button {
+ display: none !important;
+ visibility: none !important;
+}
+
+.gsc-overflow-hidden {
+ overflow: hidden !important;
+}
+
+input.gsc-input {
+ background-color: #fff !important;
+ border: 1px solid #d6d6d6 !important;
+ box-sizing: border-box !important;
+ -moz-box-sizing: border-box !important;
+ color: #868482 !important;
+ outline: 0 none !important;
+ padding: 9px 10px 10px !important;
+ transition: color 0.5s ease 0s, box-shadow 0.5s ease 0s, background-color 0.5s ease 0s !important;
+}
+
+input {
+ font-family: 'Titillium Web', Arial, Helvetica, sans-serif !important;
+ line-height: 1.5 !important;
+ font-weight: 300 !important;
+ vertical-align:middle
+}
+
+input:focus {
+ border-color: #46a2da;
+ box-shadow: 0 0 5px #46a2da;
+ color: #000;
+}
+
+.animation {
+ width: 100%;
+ border-style: none;
+ border-width: 0
+}
+
+.player {
+ width: auto;
+ position: relative;
+ display: table;
+ margin-bottom:1.5em;
+}
+
+.playcontrol {
+ display: none;
+ background: url("play_icon.svg") no-repeat center,
+ linear-gradient(
+ rgba(0,0,0,0.15), rgba(0,0,0,0.15)
+ );
+ background-size: 25%;
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ left: 0%;
+ right: 0%;
+ top: 0%;
+ bottom: 0%;
+ margin: auto
+}
+
+/* expand/collapse code sections */
+pre input {
+ display:none;
+ visibility:hidden
+}
+pre label {
+ display:block;
+ margin:-3px 3px 0 -16px;
+ text-align:center;
+ color:#21be2b;
+ float:left;
+}
+pre label:hover {
+ color:#fff
+}
+pre label::before {
+ font-weight:600;
+ font-size:16px;
+ content:"+";
+ display:inline-block;
+ width:16px;
+ height:16px
+}
+#ec_expand {
+ height:16px;
+ overflow:hidden;
+ transition:height 0.35s;
+}
+#ec_expand::before {
+ content:"...*/";
+ color:#aaa;
+ background-color:#3a4055;
+ z-index:99 !important;
+ right:25px;
+ position:absolute
+}
+#ec_toggle:checked ~ #ec_expand {
+ height:initial
+}
+#ec_toggle:checked ~ #ec_expand::before {
+ content:""
+}
+#ec_toggle:checked ~ label::before {
+ content:"-"
+}
+
+/* permalinks */
+h1:hover > .headerlink,
+h2:hover > .plink,
+h2:hover > .headerlink,
+h3:hover > .plink,
+h3:hover > .headerlink,
+h4:hover > .plink,
+h4:hover > .headerlink,
+h5:hover > .plink,
+h5:hover > .headerlink {
+ opacity:1
+}
+a.plink, a.headerlink {
+ opacity: 0;
+ padding-left: 8px;
+ font-size: 0.8em;
+ font-weight: 600;
+ transition: opacity 180ms ease-in-out
+}
+a.plink::before {
+ content:'\00B6'
+}
diff --git a/sources/pyside2/doc/_themes/pysidedocs/static/pysidedocs.css b/sources/pyside2/doc/_themes/pysidedocs/static/pysidedocs.css
deleted file mode 100644
index 6b1c4274e..000000000
--- a/sources/pyside2/doc/_themes/pysidedocs/static/pysidedocs.css
+++ /dev/null
@@ -1,477 +0,0 @@
-* {
- font: 100% Verdana, Arial, Helvetica, sans-serif;
- font-size:12px;
-}
-
-html {
- height: 100%;
-}
-
-body {
- margin: 0;
- padding: 0;
- background-color: #EBEBEB;
- height: 100%;
- color: #333;
-}
-
-strong {
- font-weight:bold;
-}
-
-.document {
- padding-bottom: 90px;
-}
-
-#container {
- position: relative;
- min-height: 100%;
- background-image: url(fakebar.png);
- background-repeat: repeat-y;
- background-color: white;
-}
-
-.footer {
- position: absolute;
- bottom: 0px;
- margin-top: 50px;
- text-align:center;
- background-color: white;
- border-top: 2px solid #e0e0e0;
- white-space: normal;
- height: 90px;
- width: 100%;
-}
-
-.footer img {
- margin-left: 8px;
- margin-right: 8px;
-}
-
-.sphinxsidebar {
- float: left;
- width: 250px;
- padding: 0px 10px 0px 10px;
- text-align: left;
-}
-
-.sphinxsidebar ul {
- padding: 0px;
- margin: 0px;
- list-style-position: inside;
-}
-
-.sphinxsidebar > ul {
- padding: 0px;
- margin: 0px;
-}
-
-.sphinxsidebar ul li {
- margin-left: 10px;
- padding: 0px;
-}
-
-.sphinxsidebar h3, .sphinxsidebar h3 a {
- font-weight: bold;
- color: #333;
-}
-
-.documentwrapper {
- margin-left: 270px;
- text-align: left;
- background-color: #ffffff;
- border-left: 1px solid #989898;
- font-size:18px;
- padding: 10px 50px 15px 50px;
- height: 100%;
-}
-
-h1 {
- font-size:18px;
- padding-left: 50px;
- padding-bottom: 15px;
- padding-top: 15px;
- border-bottom: 1px solid #c2c2c2;
-/* text-transform:uppercase; */
- margin-right: -100px;
- position: relative;
- left: -50px;
- top: -10px;
-}
-
-h2 {
- font-size:12px;
- font-weight:bold;
- border-left-width: 1px;
- border-right-width: 1px;
- border-top-width: 1px;
- border-bottom-width: 2px;
- border-style: solid;
- border-left-color: #b1b1b1;
- border-right-color: #b1b1b1;
- border-top-color: #b1b1b1;
- border-bottom-color: #009491;
- background-color: #e0e0e0;
- padding:5px;
- margin-top: 20px;
- -moz-border-radius:5px;
- -webkit-border-radius:5px;
- -khtml-border-radius:5px;
-}
-
-h3, h4 {
- font-weight: bolder;
-}
-
-pre {
- border-top: 1px solid #e0e0e0;
- border-bottom: 1px solid #e0e0e0;
- background-color: #fafafa;
- padding: 5px;
- font: 100% monospace;
- overflow: auto;
-}
-
-pre * {
- font: 100% monospace;
-}
-
-.pre {
- font: 100% monospace;
-}
-
-.headerlink {
- font-size: 100%;
- color: inherit;
- float: right;
- visibility: Hidden
-}
-
-h1 .headerlink {
- padding-right: 50px;
-}
-
-h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink {
- visibility: Visible;
-}
-
-a, a:visited {
- color: #009491;
- text-decoration: none;
-}
-
-a:hover {
- text-decoration: underline;
-}
-
-/* -- admonitions ----------------------------------------------------------- */
-
-div.admonition {
- margin-top: 10px;
- margin-bottom: 10px;
- padding: 7px;
-}
-
-div.admonition dt {
- font-weight: bold;
-}
-
-div.admonition dl {
- margin-bottom: 0;
-}
-
-p.admonition-title {
- margin: 0px 10px 5px 0px;
- font-weight: bold;
-}
-
-div.body p.centered {
- text-align: center;
- margin-top: 25px;
-}
-
-div.warning {
- background-color: #ffe4e4;
- border: 1px solid #f66;
-}
-
-div.seealso {
- background-color: #ffffcc;
- border: 1px solid #ffff66;
-}
-
-div.note {
- border: 1px solid #e3e3e3;
-}
-
-table.docutils {
- margin-left: auto;
- margin-right: auto;
- margin-bottom: 10px;
- border: none;
-}
-
-table.docutils td {
- border: none;
-}
-
-table.docutils th {
- border: none;
- font-weight: bold;
- vertical-align: top;
-}
-
-h2 em {
- float: right;
- font-size: 10px;
- position: relative;
- top: -20px;
-}
-
-/* Table of pymaemo components */
-
-#development table.docutils td {
- border-bottom: 1px solid #EBEBEB;
-}
-
-#development th {
- background-color: #EBEBEB;
- color: #FC7E00;
- padding: 5px;
-}
-
-#development th:first-child {
- -moz-border-radius: 20px 0px 0px 0px;
- -webkit-border-radius: 20px 0px 0px 0px;
- -khtml-border-radius: 20px 0px 0px 0px;
- padding-left: 10px;
-}
-#development th:last-child {
- -moz-border-radius: 0px 20px 0px 0px;
- -webkit-border-radius: 0px 20px 0px 0px;
- -khtml-border-radius: 0px 20px 0px 0px;
- padding-right: 10px;
- width: 100px;
-}
-
-hr {
- border: none;
- border-bottom: 1px dashed #EBEBEB;
- width: 70%
-}
-
-.oldnews {
- text-align: right;
-}
-
-/******************* TOPO *****************************/
-.header {
- background-image: url(bg_topo.jpg);
- background-repeat: repeat-x;
- height: 147px;
-}
-
-.header_container {
- background-image: url(bg_header.png);
- background-repeat: no-repeat;
- background-position: 100px 0px;
-}
-
-.logo {
- text-align: left;
- margin-bottom: 10px;
-}
-
-#searchbox {
- border-top: 1px solid #989898;
- padding-top: 10px;
- margin-left: -10px;
- margin-right: -10px;
- padding-left: 10px;
- padding-right: 10px;
-}
-
-#search_button {
- border: 1px solid #3A393A;
- background-color: #3A393A;
- color: white;
- cursor: pointer;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- -khtml-border-radius: 5px;
-
-}
-
-form {
- margin: 0px;
- padding: 0px;
-}
-
-/* search field */
-form #q {
- width: 136px;
-/* height: 22px; */
- border: none;
- margin: 0px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- -khtml-border-radius: 5px;
- margin-top: 2px;
- padding: 4px;
- line-height: 22px
-}
-
-#search-results h2 {
- display: none;
-}
-
-#search-results h2 {
- display: none;
-}
-
-#search-results ul.search {
- margin: 0px;
- padding: 0px;
-}
-
-ul.search div.context {
- padding-left: 40px;
-}
-
-#installation td {
- text-align: center;
- font-weight: bold;
-}
-
-em {
- color: inherit;
- font-style:italic;
-}
-
-/******** REL bar *********/
-
-.related {
- display: inline;
-}
-
-.related ul {
- padding: 0px 0px 0px 10px;
- margin: 0px;
- text-align: left;
- background-image: url(relbar_bg.png);
-}
-
-.related li {
- display: inline;
- color: white;
- font-weight: bold;
-}
-
-.related li a {
- color: inherit;
- line-height: 35px;
- font-weight: bold;
- vertical-align: middle;
-}
-
-.related li.right {
- float: right;
- margin-right: 5px;
-}
-
-.related h3 {
- display: none;
-}
-
-.align-center {
- text-align: center;
-}
-
-.contentstable {
- width: 100%;
-}
-
-.contentstable td {
- padding-left: 30px;
- vertical-align: top;
-}
-
-p.biglink a {
- font-size: 20px;
-}
-
-dt:target, .highlight {
- background-color: #fbe54e;
-}
-
-img {
- border: 0px;
-}
-
-.figure .caption {
- font-style:italic;
-}
-
-table.footnote {
- margin: 0px;
-}
-
-#synopsis table, table.field-list {
- margin: 0px;
-}
-
-tt.descname {
- font-size: 120%;
- font-weight: bold;
-}
-
-#functions ul, #virtual-functions ul, #slots ul, #signals ul, #static-functions ul {
- list-style: none;
- margin: 0px;
- padding: 10px;
- border: 1px solid #ddd;
- background-color: #f4f4f4;
- -moz-border-radius:10px;
- -webkit-border-radius:10px;
- -khtml-border-radius:10px;
-}
-
-#synopsis span.pre {
- color: #009491;
- font-weight: bolder;
-}
-
-#detailed-description .class dt, #detailed-description .method dt, #detailed-description .attribute dt {
- margin: 0px;
- padding: 10px;
- border: 1px solid #ddd;
- background-color: #f4f4f4;
- -moz-border-radius:10px;
- -webkit-border-radius:10px;
- -khtml-border-radius:10px;
-}
-
-.pysidetoc ul {
- list-style: none;
- padding: 0px;
- margin: 0px;
-}
-
-.pysidetoc em {
- font-style: normal;
-}
-
-.pysidetoc strong {
- display: block;
- padding: 5px;
- border: 1px solid #ddd;
- background-color: #f4f4f4;
- -moz-border-radius:6px;
- -webkit-border-radius:6px;
- -khtml-border-radius:6px;
-}
-
-.hide {
- display: none;
-}
-
diff --git a/sources/pyside2/doc/_themes/pysidedocs/theme.conf b/sources/pyside2/doc/_themes/pysidedocs/theme.conf
index e0a652a5d..01a4dd4a1 100644
--- a/sources/pyside2/doc/_themes/pysidedocs/theme.conf
+++ b/sources/pyside2/doc/_themes/pysidedocs/theme.conf
@@ -1,6 +1,6 @@
[theme]
inherit = default
-stylesheet = pysidedocs.css
+stylesheet = pyside.css
pygments_style = none
[options]
diff --git a/sources/pyside2/doc/deployment-cxfreeze.rst b/sources/pyside2/doc/deployment-cxfreeze.rst
index 40b65621b..f0a71ca80 100644
--- a/sources/pyside2/doc/deployment-cxfreeze.rst
+++ b/sources/pyside2/doc/deployment-cxfreeze.rst
@@ -2,10 +2,9 @@
|project| & cx_Freeze
=====================
-`cx_Freeze <https://anthony-tuininga.github.io/cx_Freeze/>`_ allows you to freeze your Python
-application into executables.
-The supported platforms are Linux, macOS, Windows, FreeBSD, among others.
-
+`cx_Freeze <https://anthony-tuininga.github.io/cx_Freeze/>`_ lets you
+freeze your Python application into executables. The supported
+platforms are Linux, macOS, Windows, FreeBSD, among others.
You can read the `official documentation <https://cx-freeze.readthedocs.io/en/latest/index.html>`_
to clarify any further question, and remember to contribute to
@@ -15,7 +14,7 @@ if you find any, or contributing to `their development <https://bitbucket.org/an
Preparation
===========
-Installing `cx_Freeze` can be done via **pip**::
+Installing `cx_Freeze` can be done using **pip**::
pip install cx_freeze
@@ -34,7 +33,7 @@ There are three options to work with `cx_Freeze`:
2. Creating `setup.py` script to build the project.
3. Using the module classes directly (for advanced purposes).
-We will cover the first two uses cases.
+The following sections cover the first two use cases.
Creating an example
-------------------
@@ -83,15 +82,16 @@ Now, consider the following simple script, named `hello.py`::
Using `cxfreeze` executable
---------------------------
-The command line to proceed will look like this::
+Now that we have an application, try freezing it with the following
+command::
cxfreeze hello.py
-This command will create a `dist/` directory that will contain the
-executable and a `lib/` directory including all the shared libraries.
+This command creates a `dist/` directory containing the executable.
+and a `lib/` directory containing all the shared libraries.
-To launch the application, you need to just go to the `dist/` directory
-and execute the file::
+To launch the application, go to the `dist/` directory and execute
+the file::
cd dist/
./main
@@ -100,7 +100,7 @@ and execute the file::
Using a setuptools script
-------------------------
-For this process, you will need an additional script called `setup.py`::
+For this process, you need an additional script called `setup.py`::
import sys
from cx_Freeze import setup, Executable
@@ -110,18 +110,18 @@ For this process, you will need an additional script called `setup.py`::
description = "My GUI App",
executables = [Executable("hello.py")])
-After that, you need to build the project using it::
+Now, build the project using it::
python setup.py build
-This step will create a `build/` directory with the following structure::
+This step creates a `build/` directory with the following structure::
build
└── exe.linux-x86_64-3.7
└── lib
└── main
-The first directory inside `build/` will depend on the platform
+The first directory inside `build/` depends on the platform
you are using, in this case a `x86_64` Linux using Python 3.7.
The structure is the same as previously described, and you can simply
enter the directory and execute the file::
diff --git a/sources/pyside2/doc/deployment-fbs.rst b/sources/pyside2/doc/deployment-fbs.rst
index ff489f745..6375da61e 100644
--- a/sources/pyside2/doc/deployment-fbs.rst
+++ b/sources/pyside2/doc/deployment-fbs.rst
@@ -3,8 +3,8 @@
===============
`fbs <https://build-system.fman.io>`_ provides a powerful environment for packaging,
-creating installers, and signing your application, but also for managing the application's updates.
-Since it is based on PyInstaller, it currently supports Linux, macOS, and Windows.
+creating installers, and signing your application. It also lets you manage updates to
+your application. As it is based on PyInstaller, it supports Linux, macOS, and Windows.
You can read the `official tutorial <https://github.com/mherrmann/fbs-tutorial>`_ for more
details on how to use `fbs`, or check the
@@ -26,12 +26,12 @@ After the installation, you will be able to use the `fbs` executable.
Starting a new project
======================
-`fbs` provides nice features that allow you to create a base
+`fbs` provides nice features that lets you create a base
project structure by executing the following command::
fbs startproject
-This process will prompt you to answer many questions to configure the details
+This command prompts you to answer a few questions to configure the details
of your project, like:
* Application name
@@ -39,8 +39,8 @@ of your project, like:
* Qt bindings (PySide2 or PyQt5)
* Bundle indentified (for macOS)
-After the process finishes, you will have a `src/` directory that
-will contain the following structure::
+After it finishes, you will have a `src/` directory that
+contains the following structure::
└── src
├── build
@@ -52,10 +52,11 @@ will contain the following structure::
│ └── mac
└── python
-Inside the `settings` directory you can find a couple of `json` files
-that you can edit to include more information about your project.
+Inside the `settings` directory, you will find a couple of `json` files
+that can be edited to include more information about your project.
-The main file will be under the `python` directory, and its content by default is::
+The `main` file will be under the `python` directory, and its content
+by default is::
from fbs_runtime.application_context import ApplicationContext
from PySide2.QtWidgets import QMainWindow
@@ -70,7 +71,8 @@ The main file will be under the `python` directory, and its content by default i
exit_code = appctxt.app.exec_() # 2. Invoke appctxt.app.exec_()
sys.exit(exit_code)
-The example will show an empty `QMainWindow`, and you can execute it by running::
+This example shows an empty `QMainWindow`. You can run it using the
+following command::
fbs run
@@ -78,23 +80,24 @@ Freezing the application
========================
Once you verify that the application is properly working,
-you can continue with the freezing process::
+you can continue with the freezing process using the following
+command::
fbs freeze
After the process finishes, you will get a message stating the location
-of your executable, e.g.::
+of your executable. For example::
Done. You can now run `target/MyApp/MyApp`. If that doesn't work, see
https://build-system.fman.io/troubleshooting.
-Then executing the application will result in the same window
-you saw with the `fbs run` command::
+You can now try running the application, which will result in the same
+window that you saw with the `fbs run` command::
cd target/MyApp/
./MyApp
-.. note:: This is the case for Linux. For other platforms like macOS, you will need to
- enter the directory: `target/MyApp.app/Contents/MacOS`, and for
- Windows you will find a `MyApp.exe` executable.
+.. note:: This is the case for Linux. For other platforms like macOS,
+ you need to enter the directory: `target/MyApp.app/Contents/macOS`,
+ and for Windows find the `MyApp.exe` executable.
diff --git a/sources/pyside2/doc/deployment-pyinstaller.rst b/sources/pyside2/doc/deployment-pyinstaller.rst
index f361daf4a..7a720f558 100644
--- a/sources/pyside2/doc/deployment-pyinstaller.rst
+++ b/sources/pyside2/doc/deployment-pyinstaller.rst
@@ -2,12 +2,12 @@
|project| & PyInstaller
=======================
-`PyInstaller <https://www.pyinstaller.org/>`_ allows you to freeze your python
+`PyInstaller <https://www.pyinstaller.org/>`_ lets you freeze your python
application into a stand-alone executable.
The supported platforms are Linux, macOS, Windows, FreeBSD, and others.
One of the main goals of `PyInstaller` is to be compatible with 3rd-party
-Python modules, e.g.: |pymodname|.
+Python modules, for example: |pymodname|.
You can read the `official documentation <https://www.pyinstaller.org/documentation.html>`_
to clarify any further question, and remember to contribute to
@@ -17,7 +17,7 @@ by filing issues if you find any, or contributing to their development.
Preparation
===========
-Installing `PyInstaller` can be done via **pip**::
+Installing `PyInstaller` can be done using **pip**::
pip install pyinstaller
@@ -26,12 +26,11 @@ installing `PyInstaller` into it.
After the installation, the `pyinstaller` binary will be located in the `bin/`
directory of your virtual environment, or where your Python executable is located.
+If that directory is not in your `PATH`, include the whole path when executing `pyinstaller`.
-If that directory is not in your `PATH`, you need to include the whole path
-when executing `pyinstaller`.
-
-.. warning:: If you already have PySide2 or Shiboken2 installed in your system, PyInstaller will pick them
- instead of your virtual environment ones.
+.. warning:: If you already have a PySide2 or Shiboken2 version installed in your
+ system path, PyInstaller will pick them instead of your virtual environment
+ version.
Freezing an application
=======================
@@ -41,13 +40,12 @@ To learn more about them you can just run `pyinstaller -h`.
Two main features are the option to package the whole project
(including the shared libraries) into one executable file (`--onefile`),
-and to prepare a directory that will contain
-an executable next to all the used libraries.
+and to place it in a directory containing the libraries.
Additionally, for Windows you can enable opening a console during the
-execution with the option `-c` (or equivalent `--console` or `--nowindowed`).
+execution with the option, `-c` (or equivalent `--console` or `--nowindowed`).
Further, you can specify to not open such console window
-on macOS and Windows with the option `-w` (or equivalent `--windowed` or `--noconsole`).
+on macOS and Windows with the option, `-w` (or equivalent `--windowed` or `--noconsole`).
Creating an example
-------------------
@@ -93,32 +91,33 @@ Now, consider the following simple script, named `hello.py`::
sys.exit(app.exec_())
-Since it has a UI, we will use the `--windowed` option.
+As it has a UI, you will use the `--windowed` option.
-The command line to proceed will look like this::
+The command line to proceed looks like this::
pyinstaller --name="MyApplication" --windowed hello.py
-This process will create a `dist/` and `build/` directory.
-The executable and all the shared libraries required by your application
-will be placed inside `dist/MyApplication`.
+This process creates a `dist/` and `build/` directory.
+The application executable and the required shared libraries are
+placed in `dist/MyApplication`.
-To execute the frozen application you can go inside `dist/MyApplication` and
+To run the application you can go to `dist/MyApplication` and
execute the program::
cd dist/MyApplication/
./MyApplication
-.. note:: The directory inside `dist/` and the executable will have the same name.
+.. note:: The directory inside `dist/` and the executable will have
+the same name.
-If you prefer to have everything bundled into one executable, i.e.:
-no shared libraries next to the executable, you can use the option
+If you prefer to have everything bundled into one executable,
+without the shared libraries next to it, you can use the option
`--onefile`::
pyinstaller --name="MyApplication" --windowed --onefile hello.py
-This process will take a bit longer, but in the end you will discover
-an executable inside the `dist/` directory that you can execute::
+This process takes a bit longer, but in the end you will have one
+executable in the `dist/` directory::
cd dist/
./MyApplication
@@ -131,26 +130,29 @@ Current Caveats To Be Aware Of
PyInstaller Problem
-------------------
-As already mentioned, `PyInstaller` will pick a system installation of PySide2 or
-Shiboken2 instead of your virtualenv version without notice, if it exists.
-This may be no problem if those PySide2 or shiboken2 versions are the same.
-
-If you are working with different versions, this can result in frustrating sessions,
-when you think you are testing a new version, but `PyInstaller`
-is silently working with a different, older version.
+As already mentioned, `PyInstaller` will pick a system installation
+of PySide2 or Shiboken2 instead of your virtualenv version without
+notice, if it exists. This may not be a problem if those two
+versions are the same.
+If you are working with different versions, this can result in
+frustrating debugging sessions. You could think you are testing the
+latest version, but `PyInstaller` could be working with an older
+version.
Problem with numpy in Python 2.7.16
-----------------------------------
-A recent problem of PyInstaller is the appearance of Python 2.7.16 .
-This Python version creates a problem that is known from Python 3 as a `Tcl/Tk` problem.
-This does rarely show up in Python 3 because `Tcl/Tk` is seldom used with `PyInstaller.
+A recent problem of PyInstaller is the appearance of Python 2.7.16.
+This Python version creates a problem that is known from Python 3
+as a `Tcl/Tk` problem. This does rarely show up in Python 3 because
+`Tcl/Tk` is seldom used with `PyInstaller.
-On Python 2.7.16, this problem is very much visible, since many people are using numpy.
-For some reason, installing `numpy` creates a dependency of `Tcl/Tk`, which can
-be circumvented only by explicitly excluding `Tcl/Tk` related things by adding
-this line to the analysis section of the spec-file::
+On Python 2.7.16, this problem is very much visible, as many are
+using numpy. For some reason, installing `numpy` creates a
+dependency to `Tcl/Tk`, which can be circumvented only by explicitly
+excluding `Tcl/Tk` related things by adding this line to the analysis
+section of the spec-file::
excludes=['FixTk', 'tcl', 'tk', '_tkinter', 'tkinter', 'Tkinter'],
@@ -162,12 +164,12 @@ o When using `PyInstaller` with `virtualenv`, make sure that there is no system
installation of PySide2 or shiboken2.
o Before compiling, use `pip -uninstall pyside2 shiboken2 -y` multiple times, until
- none of the programs is found anymore.
+ none of the programs are found anymore.
o Pip is usually a good tool. But to be 100 % sure, you should directly remove
the PySide2 and shiboken2 folders from site-packages.
o Be sure to use the right version of pip. The safest way to really run the right
- pip, use the Python that you mean: Instead of the pip command, better use::
+ pip, is to use the Python that you mean: Instead of the pip command, better use::
<path/to/your/>python -m pip
diff --git a/sources/pyside2/libpyside/pyside.cpp b/sources/pyside2/libpyside/pyside.cpp
index 6e4a3efd4..fff28a9e7 100644
--- a/sources/pyside2/libpyside/pyside.cpp
+++ b/sources/pyside2/libpyside/pyside.cpp
@@ -94,6 +94,31 @@ void init(PyObject *module)
SignalManager::instance();
}
+static bool _setProperty(PyObject* qObj, PyObject *name, PyObject *value, bool *accept)
+{
+ QByteArray propName(Shiboken::String::toCString(name));
+ propName[0] = std::toupper(propName[0]);
+ propName.prepend("set");
+
+ Shiboken::AutoDecRef propSetter(PyObject_GetAttrString(qObj, propName.constData()));
+ if (!propSetter.isNull()) {
+ *accept = true;
+ Shiboken::AutoDecRef args(PyTuple_Pack(1, value));
+ Shiboken::AutoDecRef retval(PyObject_CallObject(propSetter, args));
+ if (retval.isNull())
+ return false;
+ } else {
+ PyErr_Clear();
+ Shiboken::AutoDecRef attr(PyObject_GenericGetAttr(qObj, name));
+ if (PySide::Property::checkType(attr)) {
+ *accept = true;
+ if (PySide::Property::setValue(reinterpret_cast<PySideProperty*>(attr.object()), qObj, value) < 0)
+ return false;
+ }
+ }
+ return true;
+}
+
bool fillQtProperties(PyObject* qObj, const QMetaObject* metaObj, PyObject* kwds, const char** blackList, unsigned int blackListSize)
{
@@ -103,28 +128,27 @@ bool fillQtProperties(PyObject* qObj, const QMetaObject* metaObj, PyObject* kwds
while (PyDict_Next(kwds, &pos, &key, &value)) {
if (!blackListSize || !std::binary_search(blackList, blackList + blackListSize, std::string(Shiboken::String::toCString(key)))) {
QByteArray propName(Shiboken::String::toCString(key));
+ bool accept = false;
if (metaObj->indexOfProperty(propName) != -1) {
- propName[0] = std::toupper(propName[0]);
- propName.prepend("set");
-
- Shiboken::AutoDecRef propSetter(PyObject_GetAttrString(qObj, propName.constData()));
- if (!propSetter.isNull()) {
- Shiboken::AutoDecRef args(PyTuple_Pack(1, value));
- Shiboken::AutoDecRef retval(PyObject_CallObject(propSetter, args));
- } else {
- PyObject* attr = PyObject_GenericGetAttr(qObj, key);
- if (PySide::Property::checkType(attr))
- PySide::Property::setValue(reinterpret_cast<PySideProperty*>(attr), qObj, value);
- }
+ if (!_setProperty(qObj, key, value, &accept))
+ return false;
} else {
propName.append("()");
if (metaObj->indexOfSignal(propName) != -1) {
+ accept = true;
propName.prepend('2');
- PySide::Signal::connect(qObj, propName, value);
- } else {
- PyErr_Format(PyExc_AttributeError, "'%s' is not a Qt property or a signal", propName.constData());
+ if (!PySide::Signal::connect(qObj, propName, value))
+ return false;
+ }
+ }
+ if (!accept) {
+ // PYSIDE-1019: Allow any existing attribute in the constructor.
+ if (!_setProperty(qObj, key, value, &accept))
return false;
- };
+ }
+ if (!accept) {
+ PyErr_Format(PyExc_AttributeError, "'%S' is not a Qt property or a signal", key);
+ return false;
}
}
}
diff --git a/sources/pyside2/tests/QtWidgets/application_test.py b/sources/pyside2/tests/QtWidgets/application_test.py
index bd0f94125..0b8f73cd6 100644
--- a/sources/pyside2/tests/QtWidgets/application_test.py
+++ b/sources/pyside2/tests/QtWidgets/application_test.py
@@ -31,19 +31,25 @@
import unittest
from testbinding import TestObject
from PySide2.QtWidgets import QApplication
+from PySide2 import __all__ as all
class QApplicationInstance(unittest.TestCase):
def appDestroyed(self):
- sefl.assertTrue(False)
+ self.assertTrue(False)
def testInstanceObject(self):
+ self.assertEqual(type(qApp), type(None))
TestObject.createApp()
app1 = QApplication.instance()
app2 = QApplication.instance()
app1.setObjectName("MyApp")
self.assertEqual(app1, app2)
self.assertEqual(app2.objectName(), app1.objectName())
+ if len(all) > 3:
+ # an import triggers qApp initialization
+ __import__("PySide2." + all[-1])
+ self.assertEqual(app1, qApp)
app1.destroyed.connect(self.appDestroyed)
if __name__ == '__main__':
diff --git a/sources/pyside2/tests/pysidetest/CMakeLists.txt b/sources/pyside2/tests/pysidetest/CMakeLists.txt
index cb8ba04cf..3c993cf4e 100644
--- a/sources/pyside2/tests/pysidetest/CMakeLists.txt
+++ b/sources/pyside2/tests/pysidetest/CMakeLists.txt
@@ -118,6 +118,7 @@ target_link_libraries(testbinding
add_dependencies(testbinding pyside2 QtCore QtGui QtWidgets pysidetest)
create_generator_target(testbinding)
+PYSIDE_TEST(constructor_properties_test.py)
PYSIDE_TEST(decoratedslot_test.py)
# Will always crash when built against Qt 5.6, no point in running it.
if (Qt5Core_VERSION VERSION_GREATER 5.7.0)
diff --git a/sources/pyside2/tests/pysidetest/constructor_properties_test.py b/sources/pyside2/tests/pysidetest/constructor_properties_test.py
new file mode 100644
index 000000000..48e2a7aae
--- /dev/null
+++ b/sources/pyside2/tests/pysidetest/constructor_properties_test.py
@@ -0,0 +1,64 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of Qt for Python.
+##
+## $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 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 Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 3 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL3 included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 3 requirements
+## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 2.0 or (at your option) the GNU General
+## Public license version 3 or any later version approved by the KDE Free
+## Qt Foundation. The licenses are as published by the Free Software
+## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+## 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-2.0.html and
+## https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import unittest
+
+from helper import UsesQApplication
+from PySide2.QtCore import Qt
+from PySide2.QtWidgets import QApplication, QLabel, QFrame
+
+
+class ConstructorPropertiesTest(UsesQApplication):
+
+ def testCallConstructor(self):
+ label = QLabel(
+ frameStyle=QFrame.Panel | QFrame.Sunken,
+ text="first line\nsecond line",
+ alignment=Qt.AlignBottom | Qt.AlignRight
+ )
+ self.assertRaises(AttributeError, lambda: QLabel(
+ somethingelse=42,
+ text="first line\nsecond line",
+ alignment=Qt.AlignBottom | Qt.AlignRight
+ ))
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/shiboken2/ApiExtractor/CMakeLists.txt b/sources/shiboken2/ApiExtractor/CMakeLists.txt
index c55dba973..6cc8cd583 100644
--- a/sources/shiboken2/ApiExtractor/CMakeLists.txt
+++ b/sources/shiboken2/ApiExtractor/CMakeLists.txt
@@ -33,8 +33,7 @@ add_library(apiextractor STATIC ${apiextractor_SRC})
target_include_directories(apiextractor PRIVATE ${CLANG_EXTRA_INCLUDES}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/parser
- ${CMAKE_CURRENT_SOURCE_DIR}/parser/rpp)
+ ${CMAKE_CURRENT_SOURCE_DIR}/parser)
target_link_libraries(apiextractor PUBLIC Qt5::Core)
target_link_libraries(apiextractor PRIVATE ${CLANG_EXTRA_LIBRARIES})
diff --git a/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp b/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
index 6cb0d1fe5..c4f51737c 100644
--- a/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
+++ b/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
@@ -1616,11 +1616,11 @@ AbstractMetaFunction* AbstractMetaBuilderPrivate::traverseFunction(const AddedFu
metaFunction->setType(translateType(addedFunc->returnType()));
- QVector<AddedFunction::TypeInfo> args = addedFunc->arguments();
+ const auto &args = addedFunc->arguments();
AbstractMetaArgumentList metaArguments;
for (int i = 0; i < args.count(); ++i) {
- AddedFunction::TypeInfo& typeInfo = args[i];
+ const AddedFunction::TypeInfo& typeInfo = args.at(i).typeInfo;
AbstractMetaArgument *metaArg = new AbstractMetaArgument;
AbstractMetaType *type = translateType(typeInfo);
if (Q_UNLIKELY(!type)) {
@@ -1631,6 +1631,8 @@ AbstractMetaFunction* AbstractMetaBuilderPrivate::traverseFunction(const AddedFu
return nullptr;
}
type->decideUsagePattern();
+ if (!args.at(i).name.isEmpty())
+ metaArg->setName(args.at(i).name);
metaArg->setType(type);
metaArg->setArgumentIndex(i);
metaArg->setDefaultValueExpression(typeInfo.defaultValue);
diff --git a/sources/shiboken2/ApiExtractor/tests/testaddfunction.cpp b/sources/shiboken2/ApiExtractor/tests/testaddfunction.cpp
index 8c443527e..c50084b8e 100644
--- a/sources/shiboken2/ApiExtractor/tests/testaddfunction.cpp
+++ b/sources/shiboken2/ApiExtractor/tests/testaddfunction.cpp
@@ -46,17 +46,21 @@ void TestAddFunction::testParsingFuncNameAndConstness()
QCOMPARE(retval.isReference, false);
// test with a ugly template as argument and other ugly stuff
- const char sig2[] = " _fu__nc_ ( type1, const type2, const Abc<int& , C<char*> * > * *, const type3* const ) const ";
+ const char sig2[] = " _fu__nc_ ( type1, const type2, const Abc<int& , C<char*> * > * *@my_name@, const type3* const ) const ";
AddedFunction f2(QLatin1String(sig2), QLatin1String("const Abc<int& , C<char*> * > * *"));
QCOMPARE(f2.name(), QLatin1String("_fu__nc_"));
- QVector< AddedFunction::TypeInfo > args = f2.arguments();
+ const auto &args = f2.arguments();
QCOMPARE(args.count(), 4);
retval = f2.returnType();
QCOMPARE(retval.name, QLatin1String("Abc<int& , C<char*> * >"));
QCOMPARE(retval.indirections, 2);
QCOMPARE(retval.isConstant, true);
QCOMPARE(retval.isReference, false);
- retval = args[2];
+ retval = args.at(2).typeInfo;
+ QVERIFY(args.at(0).name.isEmpty());
+ QVERIFY(args.at(1).name.isEmpty());
+ QCOMPARE(args.at(2).name, QLatin1String("my_name"));
+ QVERIFY(args.at(3).name.isEmpty());
QCOMPARE(retval.name, QLatin1String("Abc<int& , C<char*> * >"));
QCOMPARE(retval.indirections, 2);
QCOMPARE(retval.isConstant, true);
diff --git a/sources/shiboken2/ApiExtractor/typesystem.cpp b/sources/shiboken2/ApiExtractor/typesystem.cpp
index 434134be9..344313e87 100644
--- a/sources/shiboken2/ApiExtractor/typesystem.cpp
+++ b/sources/shiboken2/ApiExtractor/typesystem.cpp
@@ -3279,7 +3279,9 @@ QString FunctionModification::toString() const
return str;
}
-static AddedFunction::TypeInfo parseType(const QString& signature, int startPos = 0, int* endPos = 0)
+static AddedFunction::TypeInfo parseType(const QString& signature,
+ int startPos = 0, int *endPos = nullptr,
+ QString *argumentName = nullptr)
{
AddedFunction::TypeInfo result;
static const QRegularExpression regex(QLatin1String("\\w"));
@@ -3330,6 +3332,19 @@ static AddedFunction::TypeInfo parseType(const QString& signature, int startPos
paramString.remove(0, sizeof("const")/sizeof(char));
paramString = paramString.trimmed();
}
+
+ // Extract argument name from "T<bla,blub>* @foo@"
+ const int nameStartPos = paramString.indexOf(QLatin1Char('@'));
+ if (nameStartPos != -1) {
+ const int nameEndPos = paramString.indexOf(QLatin1Char('@'), nameStartPos + 1);
+ if (nameEndPos > nameStartPos) {
+ if (argumentName)
+ *argumentName = paramString.mid(nameStartPos + 1, nameEndPos - nameStartPos - 1);
+ paramString.remove(nameStartPos, nameEndPos - nameStartPos + 1);
+ paramString = paramString.trimmed();
+ }
+ }
+
// check reference
if (paramString.endsWith(QLatin1Char('&'))) {
result.isReference = true;
@@ -3364,9 +3379,10 @@ AddedFunction::AddedFunction(QString signature, const QString &returnType) :
m_name = signature.left(endPos).trimmed();
int signatureLength = signature.length();
while (endPos < signatureLength) {
- TypeInfo arg = parseType(signature, endPos, &endPos);
+ QString argumentName;
+ TypeInfo arg = parseType(signature, endPos, &endPos, &argumentName);
if (!arg.name.isEmpty())
- m_arguments.append(arg);
+ m_arguments.append({argumentName, arg});
// end of parameters...
if (signature[endPos] == QLatin1Char(')'))
break;
@@ -3512,6 +3528,19 @@ QDebug operator<<(QDebug d, const AddedFunction::TypeInfo &ti)
return d;
}
+QDebug operator<<(QDebug d, const AddedFunction::Argument &a)
+{
+ QDebugStateSaver saver(d);
+ d.noquote();
+ d.nospace();
+ d << "Argument(";
+ d << a.typeInfo;
+ if (!a.name.isEmpty())
+ d << ' ' << a.name;
+ d << ')';
+ return d;
+}
+
QDebug operator<<(QDebug d, const AddedFunction &af)
{
QDebugStateSaver saver(d);
diff --git a/sources/shiboken2/ApiExtractor/typesystem.h b/sources/shiboken2/ApiExtractor/typesystem.h
index 2e4578a1d..82a698107 100644
--- a/sources/shiboken2/ApiExtractor/typesystem.h
+++ b/sources/shiboken2/ApiExtractor/typesystem.h
@@ -424,6 +424,12 @@ struct AddedFunction
bool isReference = false;
};
+ struct Argument
+ {
+ QString name;
+ TypeInfo typeInfo;
+ };
+
/// Creates a new AddedFunction with a signature and a return type.
explicit AddedFunction(QString signature, const QString &returnType);
AddedFunction() = default;
@@ -453,7 +459,7 @@ struct AddedFunction
}
/// Returns a list of argument type infos.
- QVector<TypeInfo> arguments() const
+ const QVector<Argument> &arguments() const
{
return m_arguments;
}
@@ -480,7 +486,7 @@ struct AddedFunction
private:
QString m_name;
- QVector<TypeInfo> m_arguments;
+ QVector<Argument> m_arguments;
TypeInfo m_returnType;
Access m_access = Protected;
bool m_isConst = false;
@@ -489,6 +495,7 @@ private:
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug d, const AddedFunction::TypeInfo &ti);
+QDebug operator<<(QDebug d, const AddedFunction::Argument &a);
QDebug operator<<(QDebug d, const AddedFunction &af);
#endif
diff --git a/sources/shiboken2/doc/_themes/pysidedocs/static/pyside.css b/sources/shiboken2/doc/_themes/pysidedocs/static/pyside.css
new file mode 100644
index 000000000..956e3113b
--- /dev/null
+++ b/sources/shiboken2/doc/_themes/pysidedocs/static/pyside.css
@@ -0,0 +1,1892 @@
+@import url('cookie-confirm.css') screen;
+
+/* -- admonitions -- */
+
+div.admonition {
+ margin: 1em 0 1em;
+ padding: 7px;
+}
+
+div.admonition dt {
+ font-weight: bold;
+}
+
+div.admonition dl {
+ margin-bottom: 0;
+}
+
+p.admonition-title {
+ margin: 0px 10px 5px 0px;
+ font-weight: bold;
+}
+.body {
+ width: 100%
+}
+.bodywrapper .admonition p.admonition-title {
+ margin-bottom:5px
+}
+
+.bodywrapper .admonition p {
+ margin:0
+}
+
+div.body p.centered {
+ text-align: center;
+ margin-top: 25px;
+}
+
+div.warning {
+ background-color: #ffe4e4;
+ border: 1px solid #f66;
+}
+
+div.seealso {
+ background-color: #ffffcc;
+ border: 1px solid #ffff66;
+}
+
+div.note {
+ border: 1px solid #e3e3e3;
+}
+
+table.docutils {
+ margin-right: auto;
+ margin-bottom: 10px;
+ border: none;
+ width: initial;
+}
+
+table.docutils.colwidths-given td {
+ float: none;
+}
+
+table.docutils th,
+table.docutils td {
+ padding-left:0;
+ border: none;
+}
+
+table.docutils td ul {
+ margin:0
+}
+
+table.docutils td ul > li {
+ margin: 0 0 0.5em;
+}
+h2 em {
+ float: right;
+ font-size: 10px;
+ position: relative;
+ top: -20px;
+}
+
+.document {
+ padding-bottom: 20px;
+}
+
+.documentwrapper {
+ margin-left: 255px;
+}
+
+.body blockquote {
+ border: none;
+ padding-left: 0;
+ margin-bottom: 2em;
+}
+
+.sphinxsidebar {
+ float: left;
+ width: 186px;
+ padding: 25px;
+ text-align: left;
+ background-color: #fff;
+}
+
+.sphinxsidebar ul {
+ padding: 0px;
+ margin: 0px;
+ list-style-position: inside;
+}
+
+.sphinxsidebar > ul {
+ padding: 0px;
+ margin: 0px;
+}
+
+.sphinxsidebar ul li li {
+ margin-left: 10px;
+ padding: 0px;
+ font-size: 0.95em;
+}
+
+.sphinxsidebar ul a,
+.sphinxsidebar p.topless a {
+ word-break: break-word;
+}
+
+.sphinxsidebar h3, .sphinxsidebar h3 a {
+ color: #333;
+}
+
+.sphinxsidebar p.topless {
+ margin: 1em 0 1em;
+}
+
+.pysidetoc ul {
+ list-style: none;
+ padding: 0px;
+ margin: 0px;
+}
+
+.pysidetoc em {
+ font-style: normal;
+}
+
+.pysidetoc strong {
+ display: block;
+ padding: 5px;
+ margin: 0 10px 10px 0;
+ border: 1px solid #ddd;
+ background-color: #f4f4f4;
+ -moz-border-radius:6px;
+ -webkit-border-radius:6px;
+ -khtml-border-radius:6px;
+}
+
+.section .docutils.container td {
+ float:left;
+}
+
+.hide {
+ display: none;
+}
+
+/* copy-notice */
+.document + p {
+ margin-left: 255px;
+ width: 70%;
+ font-size: 0.75em;
+ margin: 0 35px 15px 280px;
+}
+
+#searchbox {
+ border-top: 1px solid #989898;
+ padding-top: 10px;
+ margin-left: -10px;
+ margin-right: -10px;
+ padding-left: 10px;
+ padding-right: 10px;
+}
+
+#search_button {
+ border: 1px solid #3A393A;
+ background-color: #3A393A;
+ color: white;
+ cursor: pointer;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ -khtml-border-radius: 5px;
+
+}
+
+form {
+ margin: 0px;
+ padding: 0px;
+}
+
+#searchbox h3 {
+ padding: 10px 0 0 0;
+ margin-bottom: 5px;
+}
+
+/* search field */
+form #q {
+ width: 136px;
+ /* height: 22px; */
+ /* border: none; */
+ margin: 0px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ -khtml-border-radius: 5px;
+ margin-top: 2px;
+ padding: 4px;
+ line-height: 22px;
+}
+
+#search-results h2 {
+ display: none;
+}
+
+#search-results h2 {
+ display: none;
+}
+
+#search-results ul.search {
+ margin: 0px;
+ padding: 0px;
+}
+
+ul.search div.context {
+ padding-left: 40px;
+}
+
+#installation td {
+ text-align: center;
+ font-weight: bold;
+}
+
+em {
+ color: inherit;
+ font-style:italic;
+}
+
+/******** REL bar *********/
+
+.related {
+ display: inline;
+}
+
+.related h3 {
+ display: none;
+}
+
+.align-center {
+ text-align: center;
+}
+
+.contentstable {
+ width: 100%;
+}
+
+.contentstable td {
+ padding-left: 30px;
+ vertical-align: top;
+}
+
+p.biglink a {
+ font-size: 20px;
+}
+
+dt:target, .highlight {
+ background-color: #fbe54e;
+}
+
+p.highlight-link {
+ margin-top: 10px;
+ font-size: 0.8em;
+}
+
+#synopsis table, table.field-list {
+ margin: 1em 0 1em 0;
+}
+
+table.field-list tr {
+ text-align: left;
+}
+
+tt.descname {
+ font-size: 120%;
+ font-weight: bold;
+}
+
+#functions ul, #virtual-functions ul, #slots ul, #signals ul, #static-functions ul {
+ list-style: none;
+ margin: 0px;
+ padding: 10px;
+ border: 1px solid #ddd;
+ background-color: #f4f4f4;
+ -moz-border-radius:10px;
+ -webkit-border-radius:10px;
+ -khtml-border-radius:10px;
+}
+
+#synopsis span.pre {
+ color: #009491;
+ font-weight: bolder;
+}
+
+#detailed-description .class dt,
+#detailed-description .method dt,
+#detailed-description .staticmethod dt,
+#detailed-description .attribute dt {
+ margin: 0px;
+ margin-bottom: 10px;
+ padding: 10px;
+ border: 1px solid #ddd;
+ background-color: #f4f4f4;
+ -moz-border-radius:10px;
+ -webkit-border-radius:10px;
+ -khtml-border-radius:10px;
+}
+
+.document dl.attribute,
+.document dl.class,
+.document dl.method,
+.document dl.staticmethod {
+ margin-top: 2em;
+}
+
+.document dl.attribute dd,
+.document dl.class dd,
+.document dl.method dd,
+.document dl.staticmethod dd {
+ padding-left: 1em;
+}
+
+/* Qt theme */
+#navbar {
+ position:fixed;
+ top:0;
+ left:0;
+ z-index:100;
+ background:#fff;
+ width:100%
+}
+#navbar .container, .fixed .container {
+ max-width:1280px;
+ margin:0 auto;
+ padding:0 3.9%; /* 0? */
+ position:relative;
+ overflow:visible
+}
+#navbar .navbar-header {
+ position:relative
+}
+#menuextras li a:hover span {
+ color: #41cd52;
+}
+/* new header */
+#mm-wrap, #mm-wrap #mm-helper,
+#mm-wrap #mm-helper li.mm-item,
+#mm-wrap #mm-helper a.mm-link {
+ -moz-transition: none;
+ -o-transition: none;
+ -webkit-transition: none;
+ transition: none;
+ -webkit-border-radius: 0 0 0 0;
+ -moz-border-radius: 0 0 0 0;
+ -ms-border-radius: 0 0 0 0;
+ -o-border-radius: 0 0 0 0;
+ border-radius: 0 0 0 0;
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ -ms-box-shadow: none;
+ -o-box-shadow: none;
+ box-shadow: none;
+ background: none;
+ border: 0;
+ bottom: auto;
+ box-sizing: border-box;
+ clip: auto;
+ color: #090e21;
+ display: block;
+ float: none;
+ font-family: inherit;
+ font-size: 14px;
+ height: auto;
+ left: auto;
+ line-height: 1.7;
+ list-style-type: none;
+ margin: 0;
+ min-height: 0;
+ opacity: 1;
+ outline: none;
+ overflow: visible;
+ padding: 0;
+ position: relative;
+ right: auto;
+ text-align: left;
+ text-decoration: none;
+ text-transform: none;
+ top: auto;
+ vertical-align: baseline;
+ visibility: inherit;
+ width: auto;
+}
+#mm-wrap #mm-helper {
+ visibility:visible;
+ text-align:right;
+ padding:0 0px 0 0px
+}
+#navbar #mm-wrap #mm-helper li.mm-item {
+ border-right:solid #f3f3f4 1px;
+ padding-right:30px;
+ padding-left:30px
+}
+#navbar #mm-wrap #mm-helper li.mm-item > a:hover {
+ opacity: .5
+}
+#mm-wrap #mm-helper > li.mm-item {
+ margin:0 0 0 0;
+ display:inline-block;
+ height:auto;
+ vertical-align:middle
+}
+#navbar #mm-wrap #mm-helper li.mm-item:nth-child(3) {
+ border-right:0
+}
+#mm-wrap #mm-helper a.mm-link {
+ cursor: pointer
+}
+@media (max-width: 1279px) {
+ #navbar {
+ padding:0;
+ position:relative;
+ }
+ #navbar .container {
+ max-width:100%
+ }
+ .container {
+ padding:0 2%
+ }
+}
+#navbar .navbar-oneQt {
+ display:inline;
+ float:left;
+ width:31px;
+ color:#41cd52
+}
+#navbar .navbar-oneQt:before {
+ content:attr(data-icon);
+ position:absolute;
+ top:14px;
+ left:0;
+ color:#41cd52;
+ font-family:'Qt Icons';
+ line-height:1;
+ font-size:40px;
+ transition:all 0.3s ease-in-out;
+}
+#mm-wrap {
+ clear:both;
+ background:rgba(255, 255, 255, 0.1);
+ -webkit-border-radius:0px 0px 0px 0px;
+ -moz-border-radius:0px 0px 0px 0px;
+ -ms-border-radius:0px 0px 0px 0px;
+ -o-border-radius:0px 0px 0px 0px;
+ border-radius:0px 0px 0px 0px
+}
+#mm-wrap #mm-helper li.mm-item:last-child a {
+ background:transparent url("icon_avatar.png") 50% 50% no-repeat !important;
+ background-size:24px !important;
+ width:24px !important;
+ height:24px !important;
+}
+#navbar #mm-wrap #mm-helper li.mm-item > a {
+ opacity:1;
+ -webkit-transition:all 0.3s ease-in-out;
+ -moz-transition:all 0.3s ease-in-out;
+ -ms-transition:all 0.3s ease-in-out;
+ -o-transition:all 0.3s ease-in-out;
+ transition:all 0.3s ease-in-out;
+}
+#mm-wrap #mm-helper > li.mm-item > a.mm-link {
+ border-top:0px solid #fff;
+ border-left:0px solid #fff;
+ border-right:0px solid #fff;
+ border-bottom:0px solid #fff;
+ outline:none;
+ text-decoration:none;
+ padding:0 0 0 0;
+ line-height:70px;
+ font-weight:normal;
+ height:70px;
+ vertical-align:baseline;
+ text-align:left;
+ width:auto;
+ display:block;
+ color:#090e21;
+ text-transform:none;
+ text-decoration:none;
+ background:rgba(0, 0, 0, 0);
+ -webkit-border-radius:0px 0px 0px 0px;
+ -moz-border-radius:0px 0px 0px 0px;
+ -ms-border-radius:0px 0px 0px 0px;
+ -o-border-radius:0px 0px 0px 0px;
+ border-radius:0px 0px 0px 0px;
+ font-family:inherit;
+ font-size:14px;
+}
+/* end new header */
+@media (min-width: 1320px) {
+ .body .flowListDiv dl.flowList {
+ -webkit-column-count:3;
+ -moz-column-count:3;
+ column-count:3
+ }
+}
+@media (min-width: 1120px) {
+ #navbar.fixed {
+ -moz-box-shadow:0px 0px 8px rgba(0,0,0,0.23);
+ -webkit-box-shadow:0px 0px 8px rgba(0,0,0,0.23);
+ box-shadow:0px 0px 8px rgba(0,0,0,0.23)
+ }
+ #navbar.fixed #mm-wrap #mm-helper > li.mm-item > a.mm-link {
+ height:50px;
+ line-height:50px
+ }
+ #navbar.fixed .navbar-oneQt:before {
+ font-size:35px;
+ top:7px
+ }
+
+ .flowListDiv dl.flowList {
+ -webkit-column-count:2;
+ -moz-column-count:2;
+ column-count:2
+ }
+}
+@media (max-width: 1120px) {
+ #navbar {
+ padding:0;
+ position:relative
+ }
+ #navbar .navbar-oneQt:before {
+ left:10px
+ }
+ #navbar .container {
+ max-width:100%;
+ padding:0
+ }
+ #footerbar .container {
+ padding:0
+ }
+ body .main {
+ margin-top:0px
+ }
+ #footerbar .footer-main .footer-nav {
+ padding:3.9% 0 3.9% 3%;
+ border-bottom:1px solid #413d3b;
+ float:none;
+ display:block;
+ width:auto
+ }
+ #footerbar .footer-main .theqtcompany {
+ clear:both;
+ float:left;
+ margin:30px 0 8px 3%
+ }
+ #footerbar .footer-main .footer-social {
+ float:left;
+ padding:50px 0px 0px 3%
+ }
+ #footerbar #menu-footer-submenu {
+ clear:both;
+ float:none;
+ display:block;
+ padding:0px 0px 3.9% 3%
+ }
+ ul#menu-footer-submenu {
+ margin-left: 0
+ }
+}
+.cookies_yum {
+ background-color:#cecfd5;
+ display:none;
+ width:100%
+}
+.cookies_yum img {
+ width:25px;
+ top:6px;
+ display:inline-block;
+ position:absolute;
+ left:13px
+}
+.cookies_yum div {
+ margin:0 auto;
+ max-width:1280px;
+ min-height:30px;
+ padding:6px 0px 6px 0px;
+ position:relative
+}
+.cookies_yum p {
+ color:#09102b;
+ margin:0px;
+ font-size:0.79em;
+ display:inline-block;
+ line-height:1.2;
+ padding:0 30px 0 50px
+}
+.cookies_yum p a {
+ white-space:nowrap
+}
+.cookies_yum a:hover {
+ color:#46a2da
+}
+.cookies_yum .close {
+ width:15px;
+ height:15px;
+ background-image:url("cookiebar-x.png");
+ background-size:15px 30px;
+ background-position:top left;
+ cursor:pointer;
+ top:13px;
+ right:13px;
+ position:absolute;
+ transition:none
+}
+.cookies_yum .close:hover {
+ background-position:bottom left
+}
+#sidebar-toggle,#toc-toggle {
+ width:24px;
+ height:14px;
+ background-size:24px 28px;
+ cursor:pointer;
+ background-image:url("list_expand.png");
+ float:right
+}
+#sidebar-toggle.collapsed,
+#toc-toggle.collapsed {
+ background-position:bottom left
+}
+#sidebar-content > h2 {
+ display:none
+}
+#footerbar {
+ background:#222840;
+ color:#fff;
+ font-size: 0.9em;
+}
+#footerbar.fixed {
+ bottom:0;
+ left:0;
+ width:100%
+}
+#footerbar .footer-nav {
+ display:inline;
+ float:left
+}
+#footerbar .footer-main .footer-nav li {
+ float:left;
+ margin-right:1em
+}
+#footerbar .footer-main .footer-nav li a {
+ display:block;
+ padding:30px 0 10px 0;
+ line-height:20px;
+ height:20px;
+ color:#fff;
+ font-weight: 600;
+}
+#footerbar .footer-main .footer-nav li a:hover,#footerbar .footer-main .footer-nav li.current-menu-item a {
+ color:#eee
+}
+#footerbar .footer-main .footer-nav .sub-menu {
+ margin-left:0;
+ margin-bottom:0
+}
+#footerbar .footer-main .footer-nav .sub-menu li {
+ float:none;
+ width: 100%;
+}
+#footerbar .footer-main .footer-nav .sub-menu ul {
+ padding:1px 1em;
+ font-size:0.786em;
+ line-height:8px;
+ float:none;
+ color:#5d5b59;
+ margin-bottom:0
+}
+#footerbar .footer-main .footer-nav .sub-menu li a {
+ padding:2px 0;
+ font-size:1em;
+ float:none;
+ color:#cecfd5;
+ font-weight: 400;
+}
+#footerbar .footer-main .footer-nav .sub-menu li a:hover,#footerbar .footer-main .footer-nav .sub-menu li.current-menu-item a {
+ color:#eee
+}
+#footerbar .theqtcompany {
+ background:url("theqtcompany.png") no-repeat;
+ background-size:100%;
+ width:215px;
+ height:68px;
+ display:inline;
+ float:right;
+ margin:29px 0 28px 30px
+}
+#footerbar .footer-social {
+ display:inline;
+ float:right;
+ width:164px
+}
+#footerbar .footer-main .footer-social>div {
+ margin-left:0.1em;
+ margin-bottom:10px
+}
+#footerbar .disclaimer {
+ font-size:0.786em;
+ line-height:2.73;
+ color:#868584;
+ padding-top:20px;
+ padding-bottom:0.5%
+}
+#footerbar .disclaimer a {
+ color:#bdbebf
+}
+#footerbar .disclaimer a:hover {
+ color:#d6d6d6
+}
+#footerbar .disclaimer ul li {
+ float:left;
+ vertical-align:middle;
+ margin-left:1.18em
+}
+#footerbar .disclaimer ul li:first-child {
+ margin-left:0
+}
+#footerbar .disclaimer ul.lang-selector a {
+ color:#506a34;
+ color:rgba(128,195,66,0.3)
+}
+#footerbar .disclaimer ul.lang-selector a:hover {
+ color:#80c342;
+ color:rgba(128,195,66,0.7)
+}
+#menu-footer-menu, #menu-footer-menu ul {
+ margin-left:0;
+ margin-bottom:0
+}
+@font-face {
+ font-family: 'Titillium Web';
+ font-style: normal;
+ font-weight: 400;
+ src: url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.eot");
+ /* IE9 Compat Modes */
+ src: local("Titillium Web"), local("TitilliumWeb-Regular"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.eot?#iefix") format("embedded-opentype"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.woff2") format("woff2"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.woff") format("woff"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.ttf") format("truetype"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.svg#TitilliumWeb") format("svg");
+ /* Legacy iOS */
+}
+/* titillium-web-italic - latin_latin-ext */
+@font-face {
+ font-family: 'Titillium Web';
+ font-style: italic;
+ font-weight: 400;
+ src: url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-italic.eot");
+ /* IE9 Compat Modes */
+ src: local("Titillium WebItalic"), local("TitilliumWeb-Italic"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-italic.eot?#iefix") format("embedded-opentype"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-italic.woff2") format("woff2"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-italic.woff") format("woff"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-italic.ttf") format("truetype"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-italic.svg#TitilliumWeb") format("svg");
+ /* Legacy iOS */
+}
+/* titillium-web-600 - latin_latin-ext */
+@font-face {
+ font-family: 'Titillium Web';
+ font-style: normal;
+ font-weight: 600;
+ src: url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-600.eot");
+ /* IE9 Compat Modes */
+ src: local("Titillium WebSemiBold"), local("TitilliumWeb-SemiBold"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-600.eot?#iefix") format("embedded-opentype"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-600.woff2") format("woff2"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-600.woff") format("woff"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-600.ttf") format("truetype"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-600.svg#TitilliumWeb") format("svg");
+ /* Legacy iOS */
+}
+@font-face {
+ font-family:'Droid Sans Mono';
+ font-style:normal;
+ font-weight:400;
+ src:local("Droid Sans Mono"),local("DroidSansMono"),url(//fonts.gstatic.com/s/droidsansmono/v7/ns-m2xQYezAtqh7ai59hJUYuTAAIFFn5GTWtryCmBQ4.woff) format("woff")
+}
+@font-face {
+ font-family:'Qt Icons';
+ src:url("../style/icomoon.eot?-tgjuoj");
+ src:url("../style/icomoon.eot?#iefix-tgjuoj") format("embedded-opentype"),url("../style/icomoon.woff?-tgjuoj") format("woff"),url("../style/icomoon.ttf?-tgjuoj") format("truetype"),url("../style/icomoon.svg?-tgjuoj#icomoon") format("svg");
+ font-weight:normal;
+ font-style:normal
+}
+@font-face {
+ font-family:'social-icons';
+ src:url("../style/social-icons.eot?54625607");
+ src:url("../style/social-icons.eot?54625607#iefix") format("embedded-opentype"),
+ url("../style/social-icons.woff?54625607") format("woff");
+ font-weight:normal;
+ font-style:normal
+}
+.clearfix:before,.clearfix:after {
+ content:" ";
+ display:table
+}
+.clearfix:after {
+ clear:both
+}
+.clearfix {
+ *zoom:1
+}
+.clearfix .right {
+ float:right
+}
+html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video {
+ margin:0;
+ padding:0;
+ border:0;
+ font-size:100%
+}
+html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,caption,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video {
+ vertical-align:baseline
+}
+h1,h2,h3,h4,h5,h6 {
+ font-weight:300
+}
+.body h2,.body h3,.body h4,.body h5,.body h6 {
+ margin:1.5em 0 0.75em
+}
+.body h1 {
+ margin-bottom:0.75em;
+ font-size:2.25em;
+}
+.body h3.fn,.body h3.flags {
+ color:#26282a;
+ font-size:1.46em;
+ padding:15px 0 15px 0;
+ border-bottom:2px #eee solid;
+ word-wrap:break-word
+}
+.body .fngroup {
+ border-bottom:2px #eee solid;
+ padding-bottom:15px;
+ margin-bottom:1.5em
+}
+.body .fngroup h3.fngroupitem {
+ margin:0;
+ padding-bottom:0;
+ border:none
+}
+.body h3.fn .name,
+.body h3 span.type,
+.qmlname span.name {
+ font-weight: 400
+}
+.qmlname {
+ font-size:1.46em
+}
+.qmlproto table {
+ border:none;
+ border-bottom:2px #eee solid
+}
+.qmlproto table p {
+ max-width:100%
+}
+.qmlproto table tr {
+ background-color:#fff
+}
+.qmlname td, .qmlname th {
+ border:none;
+ text-align:left;
+ padding:5px 0 0 0
+}
+.qmlreadonly,.qmldefault {
+ padding:0 5px 0 5px;
+ font-size:0.75em;
+ background-color:#eee;
+ float:right
+}
+.qmlreadonly {
+ color:#414141
+}
+.qmldefault {
+ color:#D14141
+}
+.rightAlign {
+ padding:3px 5px 3px 10px;
+ text-align:right
+}
+.centerAlign.functionIndex {
+ text-align:center;
+ font-size:150%;
+ margin-bottom: 1em
+}
+article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section {
+ display:block
+}
+body {
+ line-height:1;
+ font-family:'Titillium Web', Arial, Helvetica, sans-serif;
+ font-weight:400;
+ transition-duration:1s;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ font-size: 16px;
+ background-color:#f3f3f4;
+ color:#404244;
+}
+ol,ul {
+ list-style:none
+}
+.body ol,.body ul {
+ margin-top:0.75em;
+ margin-left:20px
+}
+.bodywrapper ol>li {
+ list-style-type:decimal;
+ margin-left:15px
+}
+.bodywrapper ol.a >li {
+ list-style-type:lower-alpha;
+}
+.bodywrapper ol.A >li {
+ list-style-type:upper-alpha;
+}
+.bodywrapper ol.i >li {
+ list-style-type:lower-roman;
+}
+.bodywrapper ol.I >li {
+ list-style-type:upper-roman;
+}
+.body li p {
+ margin-top:1em
+}
+blockquote,q {
+ quotes:none;
+ border-left:10px solid #ddd;
+ padding-left:10px
+}
+blockquote:before,blockquote:after,q:before,q:after {
+ content:'';
+ content:none;
+ width:100%
+}
+table {
+ border-collapse:collapse;
+ border-spacing:0;
+ margin-bottom:5px;
+ width:100%
+}
+a {
+ color:#17a81a;
+ text-decoration:none;
+ transition-duration:0.3s
+}
+a:hover {
+ color:#17a81a
+}
+.main,#footerbar>div {
+ max-width:1280px;
+ width:95%;
+ margin:0 auto
+}
+.main {
+ margin-top:80px
+}
+@media (max-width: 1120px) {
+ .main,.navbar-header,#footerbar>div {
+ width: 100%;
+ margin: 0;
+ }
+ .main .main-rounded {
+ padding: 0 15px;
+ }
+}
+.main_index {
+ background-color:#fff
+}
+.sectionlist {
+ margin-bottom:2em
+}
+[class*="col-"] {
+ letter-spacing:normal
+}
+.landing,.main_index .row {
+ letter-spacing:-0.31em
+}
+.main_index .row>div {
+ letter-spacing:normal
+}
+.col-1,.body {
+ display:inline-block;
+ background-color:#fff;
+ padding: 25px 35px 20px 30px;
+ -webkit-box-sizing:border-box;
+ -moz-box-sizing:border-box;
+ -ms-box-sizing:border-box;
+ box-sizing:border-box;
+}
+.col-1 h2 {
+ font-size:1.8em;
+ font-weight:300;
+ line-height:1.1;
+ margin-bottom:0.83em;
+ margin-top:1em
+}
+.icons1of3 img {
+ display:inline-block;
+ float:left;
+ margin-right:0.75em;
+ margin-top:-5px;
+ width:2.75em
+}
+div.multi-column {
+ position:relative
+}
+div.multi-column div {
+ display:-moz-inline-box;
+ display:inline-block;
+ vertical-align:top;
+ margin-top:1em;
+ margin-right:2em;
+ width:16em
+}
+.sidebar {
+ display:block;
+ position:relative;
+ position:sticky;
+ float:left;
+ -webkit-box-sizing:border-box;
+ -moz-box-sizing:border-box;
+ -ms-box-sizing:border-box;
+ box-sizing:border-box;
+ width:20%;
+ padding-right:20px
+}
+.sidebar li {
+ text-overflow:ellipsis;
+ overflow:hidden
+}
+.toc,.sectionlist {
+ padding:25px;
+ background-color:#fff;
+ margin-bottom:1.25em
+}
+.sidebar .sectionlist p {
+ margin-bottom:0
+}
+.sectionlist.promo {
+ padding:0;
+ background-color:#f3f3f4
+}
+.sidebar-content:empty {
+ display:none;
+ visibility:hidden
+}
+.col-2 h2,.toc h3,.sidebar-content h2,
+.sidebar-content h3,.sectionlist h2,
+.sphinxsidebar h3 {
+ font-weight:400;
+ margin-bottom:1em
+}
+.toc h3 a {
+ color:#404244
+}
+.title {
+ font-size:2.25em;
+ font-weight:300;
+ letter-spacing:-1px;
+ line-height:1.15em;
+ margin-bottom:0.5em;
+ word-wrap:break-word
+}
+.navigationbar,col-1 h2 {
+ font-size:0.85em
+}
+.navigationbar h1 {
+ font-size:2.5em;
+ margin-bottom:0.85em;
+ margin-top:0.85em
+}
+.navigationbar li {
+ display:inline-block;
+ margin-right:5px;
+ position:relative;
+ padding-right:10px;
+ color:#585a5c
+}
+.navigationbar ul:last-of-type li a {
+ color:#404244
+}
+.sectionlist li, .sphinxsidebar li {
+ padding-bottom: 10px;
+ line-height: 1.75em;
+}
+.col-1 ul {
+ margin-bottom:1.56em
+}
+.bodywrapper li {
+ margin-top:0.5em;
+ line-height:1.25em
+}
+.bodywrapper li.level2 {
+ margin-left:10px;
+ margin-top:0.4em;
+ font-size:0.9375em;
+}
+.bodywrapper p,
+.bodywrapper dd {
+ line-height:1.25em;
+ margin:1em 0 1em;
+ color:#404244
+}
+.bodywrapper b {
+ font-weight:600
+}
+.body ul,.body ol {
+ /* margin-bottom:1.5em */
+}
+.bodywrapper ul ul {
+ margin-top:0.5em
+}
+.bodywrapper .naviNextPrevious {
+ margin-top:25px;
+ max-width:100%
+}
+.naviNextPrevious.headerNavi,
+p.naviNextPrevious + p {
+ display:none
+}
+.nextPage {
+ float:right
+}
+.prevPage:before {
+ content:"< "
+}
+.nextPage:after {
+ content:" >"
+}
+.navigationbar li a {
+ color:#404244
+}
+.navigationbar li:after {
+ color:#404244;
+ content:"›";
+ display:inline-block;
+ font-size:1.5em;
+ line-height:1;
+ position:absolute;
+ right:-2px;
+ top:-4px
+}
+.sub-navigation {
+ margin-top:10px
+}
+.navigationbar li:last-child:after,.sub-navigation li:after {
+ content:none
+}
+.navigationbar {
+ margin-bottom:10px;
+ line-height:1em
+}
+#buildversion {
+ margin-bottom:10px;
+ font-style:italic;
+ font-size:small;
+ float:right
+}
+.copy-notice {
+ width:75%;
+ font-size:0.75em;
+ margin:20px 35px 0 10px;
+ line-height:1.75em;
+ float:right;
+ color:#585a5c
+}
+.copy-notice.index {
+ margin-top:10px;
+ float:none
+}
+li a.active {
+ color:#585a5c
+}
+.flowList {
+ padding:25px
+}
+.flowListDiv dl {
+ -webkit-column-count:1;
+ -moz-column-count:1;
+ column-count:1
+}
+.flowList dd {
+ display:inline-block;
+ margin-left:10px;
+ width:90%;
+ line-height:1.15em;
+ overflow-x:hidden;
+ text-overflow:ellipsis
+}
+.alphaChar {
+ font-size:2em;
+ position:absolute
+}
+.flowList.odd {
+ background-color:#f9f9f9
+}
+.body ul>li,.doc-column ul>li {
+ list-style-image:url("list_arrow.png");
+ margin-left:15px;
+ color:#404244;
+ margin-top:0.65em;
+ line-height:1em
+}
+.bodywrapper table p {
+ margin:0px;
+ padding:0px
+}
+.bodywrapper table p {
+ margin:0px;
+ padding:0px;
+ min-height:1.25em
+}
+.bodywrapper .qmldoc {
+ margin-top:0.75em
+}
+.body h2 {
+ margin-top: 1.5em;
+ font-size:1.75em
+}
+.body h3 {
+ font-size:1.35em
+}
+.body h4 {
+ font-size:1.15em
+}
+.body p img {
+ margin-top:0.75em;
+ max-width:100%
+}
+.body .border img {
+ box-shadow:3px 3px 8px 3px rgba(200,200,200,0.5)
+}
+.body .border .player {
+ box-shadow:3px 3px 8px 3px rgba(200,200,200,0.5)
+}
+.body p.figCaption {
+ transform:translateY(-30px);
+ color:#606366;
+ font-size:95%;
+ margin-left:3px;
+ font-style:italic
+}
+.body table {
+ width:initial;
+ vertical-align:initial
+}
+table .odd {
+ background-color:#f9f9f9
+}
+table thead {
+ text-align:left;
+ padding-left:20px
+}
+table,table td,table th {
+ border:1px solid #eee
+}
+table td,table th {
+ padding:5px 20px;
+ line-height:1.3
+}
+.body .fixed table td {
+ min-width:50%;
+ width:50%
+}
+table.alignedsummary,table.propsummary {
+ width:initial
+}
+table.valuelist td.tblval {
+ font-size:0.75em
+}
+div.main_index .row {
+ border-bottom:10px solid #f3f3f4
+}
+div.main_index .row {
+ position:relative
+}
+div.main_index .row>div {
+ display:inline-block;
+ width:50%;
+ vertical-align:top;
+ padding:2em 3em;
+ -webkit-box-sizing:border-box;
+ -moz-box-sizing:border-box;
+ -ms-box-sizing:border-box;
+ box-sizing:border-box
+}
+div.main_index h2 {
+ font-size:2.1875em;
+ margin-bottom:1em
+}
+#search_bar {
+ width:40%;
+ float:right
+}
+div.main_index .row:after {
+ content:"";
+ position:absolute;
+ top:0;
+ right:50%;
+ height:100%;
+ width:10px;
+ background-color:#f3f3f4
+}
+div.table {
+ overflow-x:auto
+}
+.body tr > td > pre {
+ font-size:0.75em
+}
+p.qt_commercial {
+ border:3px solid #5caa15;
+ margin:0 auto;
+ padding:15px;
+ width:28%;
+ text-align:center;
+ clear:both
+}
+h1.qt_commercial {
+ padding:20px;
+ background-color:#5caa15;
+ display:inline;
+ float:right;
+ font-size:1.25em;
+ line-height:1.25em;
+ height:1.25em;
+ color:#fff
+}
+div.qt_commercial {
+ border-top:5px solid #5caa15;
+ margin-bottom:50px
+}
+div.pre {
+ position:relative;
+ height:auto
+}
+pre, .LegaleseLeft {
+ background-color:#3a4055;
+ color:#fff;
+ display:block;
+ font-family:"Droid Sans Mono";
+ line-height:1.5;
+ overflow-x:auto;
+ margin-bottom:25px;
+ padding:25px;
+ margin-top:0.75em;
+ font-size: .8em;
+}
+.bodywrapper .LegaleseLeft p {
+ color:#fff;
+ white-space: pre-wrap
+}
+pre .str,code .str {
+ color:#aaaaaa
+}
+pre .kwd,code .kwd {
+ color:#ffff55
+}
+pre .com,code .com {
+ color:#55ffff
+}
+pre .typ,code .typ {
+ color:#4f9d08
+}
+pre a .typ,code a .typ {
+ color:#21be2b
+}
+pre .lit,code .lit {
+ color:#ff55ff
+}
+pre .pun,code .pun {
+ color:#fff
+}
+pre .pln,code .pln {
+ color:#fff
+}
+@media print {
+ pre {
+ background-color:#eee !important
+ }
+ pre .str,code .str {
+ color:#060
+ }
+ pre .kwd,code .kwd{
+ color:#006;
+ font-weight:bold
+ }
+ pre .com,code .com {
+ color:#600
+ }
+ pre .typ,code .typ {
+ color:#404;
+ font-weight:bold
+ }
+ pre .lit,code .lit {
+ color:#044
+ }
+ pre .pun,code .pun {
+ color:#440
+ }
+ pre .pln,code .pln {
+ color:#000
+ }
+}
+pre.wrap {
+ white-space:pre-wrap
+}
+pre span.wrap {
+ display:none;
+ background:url("wrap.png") no-repeat;
+ right:0;
+ top:2px;
+ position:absolute;
+ width:20px;
+ height:14px;
+ margin:4px;
+ opacity:0.65
+}
+span.wrap:hover {
+ opacity:1
+}
+span.wrap:active {
+ opacity:0.75
+}
+.copy_text {
+ background-color:#46a2da;
+ color:#fff;
+ border:2px solid #46a2da;
+ padding:10px 16px;
+ margin-left:-10px;
+ margin-top:-50px;
+ position:absolute;
+ opacity:0;
+ cursor:pointer;
+ float:right
+}
+.copy_text:hover {
+ background-color:#fff;
+ color:#46a2da
+}
+code,.codelike {
+ font-family:"Droid Sans Mono"
+}
+h3.fn code {
+ font-size:0.75em;
+ float:right;
+ background-color:#eee;
+ padding:3px;
+ margin: 3px 0 0 20px
+}
+pre:hover>.copy_text {
+ display:inline-block;
+ opacity:1;
+ transition:0.5s ease
+}
+#main_title_bar {
+ background:url("pyside-logo.png") no-repeat;
+ background-size:100%;
+ width:366px;
+ height:86px;
+ margin:15px 0 15px 0
+}
+#main_title_bar h1 {
+ visibility:hidden
+}
+#main_title_bar .search_bar {
+ letter-spacing:normal;
+ width:50%;
+ display:inline-block;
+ -webkit-box-sizing:border-box;
+ -moz-box-sizing:border-box;
+ -ms-box-sizing:border-box;
+ box-sizing:border-box;
+ vertical-align:middle
+}
+#main_title_bar h1 {
+ letter-spacing:normal;
+ display:inline-block;
+ -webkit-box-sizing:border-box;
+ -moz-box-sizing:border-box;
+ -ms-box-sizing:border-box;
+ box-sizing:border-box;
+ vertical-align:middle
+}
+#main_title_bar .search_bar * {
+ letter-spacing:normal;
+ padding:0;
+ margin:0;
+ border:none
+}
+#sidebar-toggle,#toc-toggle {
+ display:none
+}
+@media (max-width: 980px) {
+ body {
+ font-size:calc-em(14px)
+ }
+ #main_title_bar>h1,#main_title_bar .search_bar {
+ width:100%
+ }
+ #main_title_bar .search_bar {
+ margin-bottom:15px
+ }
+ .main {
+ margin-top:0px
+ }
+ .main_index .row {
+ border:none !important
+ }
+ .title {
+ font-size:1.5em;
+ font-weight:400;
+ word-wrap:break-word
+ }
+ .col-1,.body,.naviNextPrevious,.sidebar {
+ padding:10px
+ }
+ .sidebar {
+ position:relative;
+ padding-top:0
+ }
+ .search .sidebar {
+ display:none;
+ visibility:hidden
+ }
+ .col-2 h2,.toc h3,.sidebar-content h2,.sidebar-content h3,.sectionlist h2 {
+ text-align:center;
+ margin-bottom:5px
+ }
+ div.main_index .row:after {
+ content:none
+ }
+ div.main_index .row>div {
+ display:block !important;
+ width:100%;
+ padding:15px;
+ margin:0
+ }
+ .body,.sidebar,.col-1 {
+ width:100%
+ }
+ .sidebar-content,.col-2,.toc {
+ background-color:#fff;
+ margin-bottom:1em;
+ padding:20px
+ }
+ #sidebar-toggle,#toc-toggle {
+ display:block
+ }
+ #sidebar-toggle.collapsed + h2 {
+ display:block
+ }
+ .bodywrapper p {
+ margin-bottom:1em;
+ max-width:100%
+ }
+ table td,table th {
+ padding:5px 5px
+ }
+ .sectionlist {
+ padding:0
+ }
+ .sidebar > .sectionlist {
+ padding:20px
+ }
+ .sectionlist.promo {
+ max-width:46%;
+ margin:0 auto 1em auto;
+ float:left;
+ padding:0 2%
+ }
+ .sidebar .sidebar-content {
+ clear:both
+ }
+ .copy-notice {
+ float:none;
+ width:initial
+ }
+}
+[id]:target > *:first-child,
+dt[id]:target {
+ -webkit-animation:highlighter 3s;
+ animation:highlighter 3s
+}
+@-webkit-keyframes highlighter {
+ 25% {
+ background-color:#d1e8f6;
+ color:#444
+ }
+ 75% {
+ background-color:#d1e8f6;
+ color:#444
+ }
+}
+@keyframes highlighter {
+ 25% {
+ background-color:#d1e8f6;
+ color:#444
+ }
+ 75% {
+ background-color:#d1e8f6;
+ color:#444
+ }
+}
+@-webkit-keyframes copypaste {
+ 25% {
+ opacity:1
+ }
+ 100% {
+ border-radius:10px;
+ margin-top:-50px;
+ opacity:1
+ }
+}
+@keyframes copypaste {
+ 25% {
+ opacity:1
+ }
+ 100% {
+ border-radius:10px;
+ margin-top:-50px;
+ opacity:1
+ }
+}
+#footer {
+ clear:both
+}
+.footer-social i {
+ font-family: "social-icons";
+ font-style: normal;
+ font-size:150%;
+ margin: .55em;
+ color: #cecfd5
+}
+.footer-social i:hover {
+ color: #eee
+}
+.footer-social .icon-twitter:before {
+ content: '\f099'
+}
+.footer-social .icon-facebook:before {
+ content: '\f09a'
+}
+.footer-social .icon-youtube:before {
+ content: '\f16a'
+}
+.menuextraslanguages {
+ display:none;
+ visibility:hidden
+}
+form.gsc-search-box {
+ font-size: 25px !important;
+ margin-top: 0 !important;
+ margin-right: 0 !important;
+ margin-bottom: 4px !important;
+ margin-left: 0 !important;
+ width: 102.5% !important;
+}
+table.gsc-search-box {
+ border-style: none !important;
+ border-width: 0 !important;
+ border-spacing: 0 0 !important;
+ width: 100% !important;
+ margin-bottom: 2px !important;
+}
+
+table.gsc-search-box td {
+ vertical-align: middle !important;
+}
+
+table.gsc-search-box td.gsc-input {
+ padding-right: 0px !important;
+}
+table.gsc-search-box td.gsc-input input {
+ background-position: 10px center !important;
+}
+
+td.gsc-search-button {
+ width: 1% !important;
+}
+
+td.gsc-clear-button {
+ width: 14px !important;
+ visibility:hidden !important;
+ display:none !important;
+}
+table.gsc-branding td,
+table.gsc-branding {
+ margin: 0 0 0 0 !important;
+ padding: 0 0 0 0 !important;
+ border: none !important;
+}
+
+table.gsc-branding {
+ border-style: none !important;
+ border-width: 0 !important;
+ border-spacing: 0 0 !important;
+ width: 100% !important;
+}
+
+.gsc-branding-text {
+ color: #676767 !important;
+}
+
+td.gsc-branding-text {
+ vertical-align: top !important;
+}
+td.gsc-branding-text div.gsc-branding-text {
+ padding-bottom: 2px !important;
+ text-align: right !important;
+ font-size: 11px !important;
+ margin-right: 2px !important;
+}
+
+td.gsc-branding-img {
+ width: 65px !important;
+ vertical-align: bottom !important;
+}
+
+img.gsc-branding-img {
+ padding-top: 1px !important;
+ margin: 0 0 0 0 !important;
+ padding-right: 0 !important;
+ padding-left: 0 !important;
+ padding-bottom: 0 !important;
+ border: none !important;
+ display: inline !important;
+}
+
+input.gsc-search-button {
+ background-color: white !important;
+ height: 35px !important;
+ width: 25px !important;
+ color: transparent !important;
+ background-image: url("doc_search.png") !important;
+ background-size: 25px auto;
+ background-position: 0px 5px;
+ background-repeat: no-repeat;
+ margin-left: -43px !important;
+ overflow: hidden;
+ min-width: 20px !important;
+}
+
+input.gsc-search-button:hover {
+ cursor: pointer;
+}
+
+input.gsc-search-button:focus {
+ outline: none;
+ box-shadow: none;
+}
+
+.gsc-search-box-tools .gsc-clear-button {
+ display: none !important;
+ visibility: none !important;
+}
+
+.gsc-overflow-hidden {
+ overflow: hidden !important;
+}
+
+input.gsc-input {
+ background-color: #fff !important;
+ border: 1px solid #d6d6d6 !important;
+ box-sizing: border-box !important;
+ -moz-box-sizing: border-box !important;
+ color: #868482 !important;
+ outline: 0 none !important;
+ padding: 9px 10px 10px !important;
+ transition: color 0.5s ease 0s, box-shadow 0.5s ease 0s, background-color 0.5s ease 0s !important;
+}
+
+input {
+ font-family: 'Titillium Web', Arial, Helvetica, sans-serif !important;
+ line-height: 1.5 !important;
+ font-weight: 300 !important;
+ vertical-align:middle
+}
+
+input:focus {
+ border-color: #46a2da;
+ box-shadow: 0 0 5px #46a2da;
+ color: #000;
+}
+
+.animation {
+ width: 100%;
+ border-style: none;
+ border-width: 0
+}
+
+.player {
+ width: auto;
+ position: relative;
+ display: table;
+ margin-bottom:1.5em;
+}
+
+.playcontrol {
+ display: none;
+ background: url("play_icon.svg") no-repeat center,
+ linear-gradient(
+ rgba(0,0,0,0.15), rgba(0,0,0,0.15)
+ );
+ background-size: 25%;
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ left: 0%;
+ right: 0%;
+ top: 0%;
+ bottom: 0%;
+ margin: auto
+}
+
+/* expand/collapse code sections */
+pre input {
+ display:none;
+ visibility:hidden
+}
+pre label {
+ display:block;
+ margin:-3px 3px 0 -16px;
+ text-align:center;
+ color:#21be2b;
+ float:left;
+}
+pre label:hover {
+ color:#fff
+}
+pre label::before {
+ font-weight:600;
+ font-size:16px;
+ content:"+";
+ display:inline-block;
+ width:16px;
+ height:16px
+}
+#ec_expand {
+ height:16px;
+ overflow:hidden;
+ transition:height 0.35s;
+}
+#ec_expand::before {
+ content:"...*/";
+ color:#aaa;
+ background-color:#3a4055;
+ z-index:99 !important;
+ right:25px;
+ position:absolute
+}
+#ec_toggle:checked ~ #ec_expand {
+ height:initial
+}
+#ec_toggle:checked ~ #ec_expand::before {
+ content:""
+}
+#ec_toggle:checked ~ label::before {
+ content:"-"
+}
+
+/* permalinks */
+h1:hover > .headerlink,
+h2:hover > .plink,
+h2:hover > .headerlink,
+h3:hover > .plink,
+h3:hover > .headerlink,
+h4:hover > .plink,
+h4:hover > .headerlink,
+h5:hover > .plink,
+h5:hover > .headerlink {
+ opacity:1
+}
+a.plink, a.headerlink {
+ opacity: 0;
+ padding-left: 8px;
+ font-size: 0.8em;
+ font-weight: 600;
+ transition: opacity 180ms ease-in-out
+}
+a.plink::before {
+ content:'\00B6'
+}
diff --git a/sources/shiboken2/doc/_themes/pysidedocs/static/pysidedocs.css b/sources/shiboken2/doc/_themes/pysidedocs/static/pysidedocs.css
deleted file mode 100644
index 708ddf77c..000000000
--- a/sources/shiboken2/doc/_themes/pysidedocs/static/pysidedocs.css
+++ /dev/null
@@ -1,475 +0,0 @@
-* {
- font: 100% Verdana, Arial, Helvetica, sans-serif;
- font-size:12px;
-}
-
-html {
- height: 100%;
-}
-
-body {
- margin: 0;
- padding: 0;
- background-color: #EBEBEB;
- height: 100%;
- color: #333;
-}
-
-strong {
- font-weight:bold;
-}
-
-.document {
- padding-bottom: 90px;
-}
-
-#container {
- position: relative;
- min-height: 100%;
- background-image: url(fakebar.png);
- background-repeat: repeat-y;
- background-color: white;
-}
-
-.footer {
- position: absolute;
- bottom: 0px;
- margin-top: 50px;
- text-align:center;
- background-color: white;
- border-top: 2px solid #e0e0e0;
- white-space: nowrap;
- height: 90px;
- width: 100%;
-}
-
-.footer img {
- margin-left: 8px;
- margin-right: 8px;
-}
-
-.sphinxsidebar {
- float: left;
- width: 250px;
- padding: 0px 10px 0px 10px;
- text-align: left;
-}
-
-.sphinxsidebar ul {
- padding: 0px;
- margin: 0px;
- list-style-position: inside;
-}
-
-.sphinxsidebar > ul {
- padding: 0px;
- margin: 0px;
-}
-
-.sphinxsidebar ul li {
- margin-left: 10px;
- padding: 0px;
-}
-
-.sphinxsidebar h3, .sphinxsidebar h3 a {
- font-weight: bold;
- color: #333;
-}
-
-.documentwrapper {
- margin-left: 270px;
- text-align: left;
- background-color: #ffffff;
- border-left: 1px solid #989898;
- font-size:18px;
- padding: 10px 50px 15px 50px;
- height: 100%;
-}
-
-h1 {
- font-size:18px;
- padding-left: 50px;
- padding-bottom: 15px;
- padding-top: 15px;
- border-bottom: 1px solid #c2c2c2;
- margin-right: -100px;
- position: relative;
- left: -50px;
- top: -10px;
-}
-
-h2 {
- font-size:12px;
- font-weight:bold;
- border-left-width: 1px;
- border-right-width: 1px;
- border-top-width: 1px;
- border-bottom-width: 2px;
- border-style: solid;
- border-left-color: #b1b1b1;
- border-right-color: #b1b1b1;
- border-top-color: #b1b1b1;
- border-bottom-color: #009491;
- background-color: #e0e0e0;
- padding:5px;
- margin-top: 20px;
- -moz-border-radius:5px;
- -webkit-border-radius:5px;
- -khtml-border-radius:5px;
-}
-
-h3, h4 {
- font-weight: bolder;
-}
-
-pre {
- border-top: 1px solid #e0e0e0;
- border-bottom: 1px solid #e0e0e0;
- background-color: #fafafa;
- padding: 5px;
- font: 100% monospace;
- overflow: auto;
-}
-
-pre * {
- font: 100% monospace;
-}
-
-.pre {
- font: 100% monospace;
-}
-
-.headerlink {
- font-size: 100%;
- color: inherit;
- float: right;
- visibility: Hidden
-}
-
-h1 .headerlink {
- padding-right: 50px;
-}
-
-h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink {
- visibility: Visible;
-}
-
-a, a:visited {
- color: #009491;
- text-decoration: none;
-}
-
-a:hover {
- text-decoration: underline;
-}
-
-/* -- admonitions ----------------------------------------------------------- */
-
-div.admonition {
- margin-top: 10px;
- margin-bottom: 10px;
- padding: 7px;
-}
-
-div.admonition dt {
- font-weight: bold;
-}
-
-div.admonition dl {
- margin-bottom: 0;
-}
-
-p.admonition-title {
- margin: 0px 10px 5px 0px;
- font-weight: bold;
-}
-
-div.body p.centered {
- text-align: center;
- margin-top: 25px;
-}
-
-div.warning {
- background-color: #ffe4e4;
- border: 1px solid #f66;
-}
-
-div.seealso {
- background-color: #ffffcc;
- border: 1px solid #ffff66;
-}
-
-div.note {
- border: 1px solid #e3e3e3;
-}
-
-table.docutils {
- margin-left: auto;
- margin-right: auto;
- margin-bottom: 10px;
- border: none;
-}
-
-table.docutils td {
- border: none;
-}
-
-table.docutils th {
- border: none;
- font-weight: bold;
- vertical-align: top;
-}
-
-h2 em {
- float: right;
- font-size: 10px;
- position: relative;
- top: -20px;
-}
-
-/* Table of pymaemo components */
-
-#development table.docutils td {
- border-bottom: 1px solid #EBEBEB;
-}
-
-#development th {
- background-color: #EBEBEB;
- color: #FC7E00;
- padding: 5px;
-}
-
-#development th:first-child {
- -moz-border-radius: 20px 0px 0px 0px;
- -webkit-border-radius: 20px 0px 0px 0px;
- -khtml-border-radius: 20px 0px 0px 0px;
- padding-left: 10px;
-}
-#development th:last-child {
- -moz-border-radius: 0px 20px 0px 0px;
- -webkit-border-radius: 0px 20px 0px 0px;
- -khtml-border-radius: 0px 20px 0px 0px;
- padding-right: 10px;
- width: 100px;
-}
-
-hr {
- border: none;
- border-bottom: 1px dashed #EBEBEB;
- width: 70%
-}
-
-.oldnews {
- text-align: right;
-}
-
-/******************* TOPO *****************************/
-.header {
- background-image: url(bg_topo.jpg);
- background-repeat: repeat-x;
- height: 147px;
-}
-
-.header_container {
- background-image: url(bg_header.png);
- background-repeat: no-repeat;
- background-position: 100px 0px;
-}
-
-.logo {
- text-align: left;
- margin-bottom: 10px;
-}
-
-#searchbox {
- border-top: 1px solid #989898;
- padding-top: 10px;
- margin-left: -10px;
- margin-right: -10px;
- padding-left: 10px;
- padding-right: 10px;
-}
-
-#search_button {
- border: 1px solid #3A393A;
- background-color: #3A393A;
- color: white;
- cursor: pointer;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- -khtml-border-radius: 5px;
-
-}
-
-form {
- margin: 0px;
- padding: 0px;
-}
-
-/* search field */
-form #q {
- width: 136px;
-/* height: 22px; */
- border: none;
- margin: 0px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- -khtml-border-radius: 5px;
- margin-top: 2px;
- padding: 4px;
- line-height: 22px
-}
-
-#search-results h2 {
- display: none;
-}
-
-#search-results h2 {
- display: none;
-}
-
-#search-results ul.search {
- margin: 0px;
- padding: 0px;
-}
-
-ul.search div.context {
- padding-left: 40px;
-}
-
-#installation td {
- text-align: center;
- font-weight: bold;
-}
-
-em {
- color: inherit;
- font-style:italic;
-}
-
-/******** REL bar *********/
-
-.related {
- display: inline;
-}
-
-.related ul {
- padding: 0px 0px 0px 10px;
- margin: 0px;
- text-align: left;
- background-image: url(relbar_bg.png);
-}
-
-.related li {
- display: inline;
- color: white;
- font-weight: bold;
-}
-
-.related li a {
- color: inherit;
- line-height: 35px;
- font-weight: bold;
- vertical-align: middle;
-}
-
-.related li.right {
- float: right;
- margin-right: 5px;
-}
-
-.related h3 {
- display: none;
-}
-
-.align-center {
- text-align: center;
-}
-
-.contentstable {
- width: 100%;
-}
-
-.contentstable td {
- padding-left: 30px;
- vertical-align: top;
-}
-
-p.biglink a {
- font-size: 20px;
-}
-
-dt:target, .highlight {
- background-color: #fbe54e;
-}
-
-img {
- border: 0px;
-}
-
-.figure .caption {
- font-style:italic;
-}
-
-table.footnote {
- margin: 0px;
-}
-
-#synopsis table, table.field-list {
- margin: 0px;
-}
-
-tt.descname {
- font-size: 120%;
- font-weight: bold;
-}
-
-#functions ul, #virtual-functions ul, #slots ul, #signals ul, #static-functions ul {
- list-style: none;
- margin: 0px;
- padding: 10px;
- border: 1px solid #ddd;
- background-color: #f4f4f4;
- -moz-border-radius:10px;
- -webkit-border-radius:10px;
- -khtml-border-radius:10px;
-}
-
-#synopsis span.pre {
- color: #009491;
- font-weight: bolder;
-}
-
-#detailed-description .class dt, #detailed-description .method dt, #detailed-description .attribute dt, #detailed-description .function dt {
- margin: 0px;
- padding: 10px;
- border: 1px solid #ddd;
- background-color: #f4f4f4;
- -moz-border-radius:10px;
- -webkit-border-radius:10px;
- -khtml-border-radius:10px;
-}
-
-.pysidetoc ul {
- list-style: none;
- padding: 0px;
- margin: 0px;
-}
-
-.pysidetoc em {
- font-style: normal;
-}
-
-.pysidetoc strong {
- display: block;
- padding: 5px;
- border: 1px solid #ddd;
- background-color: #f4f4f4;
- -moz-border-radius:6px;
- -webkit-border-radius:6px;
- -khtml-border-radius:6px;
-}
-
-.hide {
- display: none;
-}
diff --git a/sources/shiboken2/doc/_themes/pysidedocs/theme.conf b/sources/shiboken2/doc/_themes/pysidedocs/theme.conf
index e0a652a5d..01a4dd4a1 100644
--- a/sources/shiboken2/doc/_themes/pysidedocs/theme.conf
+++ b/sources/shiboken2/doc/_themes/pysidedocs/theme.conf
@@ -1,6 +1,6 @@
[theme]
inherit = default
-stylesheet = pysidedocs.css
+stylesheet = pyside.css
pygments_style = none
[options]
diff --git a/sources/shiboken2/doc/typesystem_manipulating_objects.rst b/sources/shiboken2/doc/typesystem_manipulating_objects.rst
index 12b866ad7..c04a4fa27 100644
--- a/sources/shiboken2/doc/typesystem_manipulating_objects.rst
+++ b/sources/shiboken2/doc/typesystem_manipulating_objects.rst
@@ -157,6 +157,13 @@ add-function
The ``since`` attribute specify the API version when this function was added.
+ Within the signature, names for the function parameters can be specified by
+ enclosing them within the delimiter *@*:
+
+ .. code-block:: c++
+
+ void foo(int @parameter1@,float)
+
.. _conversion-rule-on-types:
conversion-rule
diff --git a/sources/shiboken2/generator/generator.cpp b/sources/shiboken2/generator/generator.cpp
index fe03d3489..49064a6a5 100644
--- a/sources/shiboken2/generator/generator.cpp
+++ b/sources/shiboken2/generator/generator.cpp
@@ -219,9 +219,12 @@ void Generator::addInstantiatedContainersAndSmartPointers(const AbstractMetaType
const AbstractMetaTypeList &instantiations = type->instantiations();
for (const AbstractMetaType* t : instantiations)
addInstantiatedContainersAndSmartPointers(t, context);
- if (!type->typeEntry()->isContainer() && !type->typeEntry()->isSmartPointer())
+ const auto typeEntry = type->typeEntry();
+ const bool isContainer = typeEntry->isContainer();
+ if (!isContainer
+ && !(typeEntry->isSmartPointer() && typeEntry->generateCode())) {
return;
- bool isContainer = type->typeEntry()->isContainer();
+ }
if (type->hasTemplateChildren()) {
QString piece = isContainer ? QStringLiteral("container") : QStringLiteral("smart pointer");
QString warning =
@@ -244,6 +247,13 @@ void Generator::addInstantiatedContainersAndSmartPointers(const AbstractMetaType
// Is smart pointer.
if (!m_d->instantiatedSmartPointerNames.contains(typeName)) {
m_d->instantiatedSmartPointerNames.append(typeName);
+ if (type->isConstant() || type->referenceType() != NoReference) {
+ // Strip a "const QSharedPtr<Foo> &" or similar to "QSharedPtr<Foo>" (PYSIDE-1016)
+ auto fixedType = type->copy();
+ fixedType->setReferenceType(NoReference);
+ fixedType->setConstant(false);
+ type = fixedType;
+ }
m_d->instantiatedSmartPointers.append(type);
}
}
@@ -912,7 +922,6 @@ QString getClassTargetFullName(const AbstractMetaType *metaType, bool includePac
QString getFilteredCppSignatureString(QString signature)
{
- TypeInfo::stripQualifiers(&signature); // for const refs to smart pointers
signature.replace(QLatin1String("::"), QLatin1String("_"));
signature.replace(QLatin1Char('<'), QLatin1Char('_'));
signature.replace(QLatin1Char('>'), QLatin1Char('_'));
diff --git a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
index 5fbc6ed3e..95f93fd42 100644
--- a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
@@ -3686,14 +3686,29 @@ void CppGenerator::writeEnumConverterInitialization(QTextStream& s, const TypeEn
}
s << INDENT << "Shiboken::Enum::setTypeConverter(" << enumPythonType << ", converter);" << endl;
- QStringList cppSignature = enumType->qualifiedCppName().split(QLatin1String("::"), QString::SkipEmptyParts);
- while (!cppSignature.isEmpty()) {
- QString signature = cppSignature.join(QLatin1String("::"));
- s << INDENT << "Shiboken::Conversions::registerConverterName(converter, \"";
- if (flags)
- s << "QFlags<";
- s << signature << "\");" << endl;
- cppSignature.removeFirst();
+
+ QString signature = enumType->qualifiedCppName();
+ // Replace "QFlags<Class::Option>" by "Class::Options"
+ if (flags && signature.startsWith(QLatin1String("QFlags<")) && signature.endsWith(QLatin1Char('>'))) {
+ signature.chop(1);
+ signature.remove(0, 7);
+ const int lastQualifierPos = signature.lastIndexOf(QLatin1String("::"));
+ if (lastQualifierPos != -1) {
+ signature.replace(lastQualifierPos + 2, signature.size() - lastQualifierPos - 2,
+ flags->flagsName());
+ } else {
+ signature = flags->flagsName();
+ }
+ }
+
+ while (true) {
+ s << INDENT << "Shiboken::Conversions::registerConverterName(converter, \""
+ << signature << "\");\n";
+ const int qualifierPos = signature.indexOf(QLatin1String("::"));
+ if (qualifierPos != -1)
+ signature.remove(0, qualifierPos + 2);
+ else
+ break;
}
}
s << INDENT << '}' << endl;
@@ -5806,7 +5821,7 @@ bool CppGenerator::finishGeneration()
if (usePySideExtensions()) {
// initialize the qApp module.
- s << INDENT << "NotifyModuleForQApp(module);" << endl;
+ s << INDENT << "NotifyModuleForQApp(module, qApp);" << endl;
}
s << endl;
s << "SBK_MODULE_INIT_FUNCTION_END" << endl;
diff --git a/sources/shiboken2/generator/shiboken2/headergenerator.cpp b/sources/shiboken2/generator/shiboken2/headergenerator.cpp
index 17ebbcde9..a55539d7c 100644
--- a/sources/shiboken2/generator/shiboken2/headergenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/headergenerator.cpp
@@ -593,10 +593,8 @@ void HeaderGenerator::writeSbkTypeFunction(QTextStream& s, const AbstractMetaCla
void HeaderGenerator::writeSbkTypeFunction(QTextStream &s, const AbstractMetaType *metaType)
{
- QString signature = metaType->cppSignature();
- TypeInfo::stripQualifiers(&signature); // for const refs to smart pointers
- s << "template<> inline PyTypeObject *SbkType< ::" << signature << " >() "
- << "{ return reinterpret_cast<PyTypeObject *>(" << cpythonTypeNameExt(metaType) << "); }\n";
+ s << "template<> inline PyTypeObject* SbkType< ::" << metaType->cppSignature() << " >() "
+ << "{ return reinterpret_cast<PyTypeObject*>(" << cpythonTypeNameExt(metaType) << "); }\n";
}
void HeaderGenerator::writeInheritedOverloads(QTextStream& s)
diff --git a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
index 5d599fe95..2b3b20c75 100644
--- a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
@@ -2681,11 +2681,8 @@ QString ShibokenGenerator::getTypeIndexVariableName(const TypeEntry* type)
QString ShibokenGenerator::getTypeIndexVariableName(const AbstractMetaType* type)
{
QString result = QLatin1String("SBK");
- const auto *typeEntry = type->typeEntry();
- if (typeEntry->isContainer()
- || typeEntry->isSmartPointer()) { // PYSIDE-1024
+ if (type->typeEntry()->isContainer())
result += QLatin1Char('_') + moduleName().toUpper();
- }
result += processInstantiationsVariableName(type);
appendIndexSuffix(&result);
return result;
diff --git a/sources/shiboken2/libshiboken/basewrapper.cpp b/sources/shiboken2/libshiboken/basewrapper.cpp
index faaca5e4b..f38b55b56 100644
--- a/sources/shiboken2/libshiboken/basewrapper.cpp
+++ b/sources/shiboken2/libshiboken/basewrapper.cpp
@@ -76,11 +76,21 @@ extern "C"
static void SbkObjectTypeDealloc(PyObject* pyObj);
static PyObject* SbkObjectTypeTpNew(PyTypeObject* metatype, PyObject* args, PyObject* kwds);
+// PYSIDE-908: The function PyType_Modified does not work in PySide, so we need to
+// explicitly pass __doc__. For __signature__ it _did_ actually work, because
+// it was not existing before. We add them both for clarity.
+static PyGetSetDef SbkObjectType_Type_getsetlist[] = {
+ {const_cast<char*>("__signature__"), (getter)Sbk_TypeGet___signature__},
+ {const_cast<char*>("__doc__"), (getter)Sbk_TypeGet___doc__},
+ {nullptr} // Sentinel
+};
+
static PyType_Slot SbkObjectType_Type_slots[] = {
{Py_tp_dealloc, (void *)SbkObjectTypeDealloc},
{Py_tp_setattro, (void *)PyObject_GenericSetAttr},
{Py_tp_base, (void *)&PyType_Type},
{Py_tp_alloc, (void *)PyType_GenericAlloc},
+ {Py_tp_getset, (void *)SbkObjectType_Type_getsetlist},
{Py_tp_new, (void *)SbkObjectTypeTpNew},
{Py_tp_free, (void *)PyObject_GC_Del},
{0, 0}
diff --git a/sources/shiboken2/libshiboken/qapp_macro.cpp b/sources/shiboken2/libshiboken/qapp_macro.cpp
index 19e985b20..ea9cf0c86 100644
--- a/sources/shiboken2/libshiboken/qapp_macro.cpp
+++ b/sources/shiboken2/libshiboken/qapp_macro.cpp
@@ -38,6 +38,7 @@
****************************************************************************/
#include "basewrapper.h"
+#include "autodecref.h"
extern "C"
{
@@ -93,13 +94,14 @@ static int qApp_var_ref = 0;
static int qApp_content_ref = 0;
static int
-reset_qApp_var()
+reset_qApp_var(void)
{
PyObject **mod_ptr;
- for (mod_ptr = qApp_moduledicts; *mod_ptr != NULL; mod_ptr++) {
+ for (mod_ptr = qApp_moduledicts; *mod_ptr != nullptr; mod_ptr++) {
// We respect whatever the user may have set.
- if (PyDict_GetItem(*mod_ptr, qApp_var) == NULL) {
+ PyObject *existing = PyDict_GetItem(*mod_ptr, qApp_var);
+ if (existing == nullptr || Py_TYPE(existing) == Py_NONE_TYPE) {
if (PyDict_SetItem(*mod_ptr, qApp_var, qApp_content) < 0)
return -1;
}
@@ -135,8 +137,13 @@ MakeSingletonQAppWrapper(PyTypeObject *type)
if (Py_REFCNT(qApp_content) > qApp_content_ref)
qApp_content_ref = Py_REFCNT(qApp_content);
- if (Py_TYPE(qApp_content) != Py_NONE_TYPE)
+ if (Py_TYPE(qApp_content) != Py_NONE_TYPE) {
+ // Remove the "_" variable which might hold a reference to qApp.
+ Shiboken::AutoDecRef pymain(PyImport_ImportModule("__main__"));
+ if (pymain.object() && PyObject_HasAttrString(pymain.object(), "_"))
+ PyObject_DelAttrString(pymain.object(), "_");
Py_REFCNT(qApp_var) = 1; // fuse is armed...
+ }
if (type == Py_NONE_TYPE) {
// Debug mode showed that we need to do more than just remove the
// reference. To keep everything in the right order, it is easiest
@@ -149,8 +156,8 @@ MakeSingletonQAppWrapper(PyTypeObject *type)
Py_TYPE(qApp_content) = Py_NONE_TYPE;
Py_REFCNT(qApp_var) = qApp_var_ref;
Py_REFCNT(qApp_content) = Py_REFCNT(Py_None);
- if (__moduleShutdown != NULL)
- Py_DECREF(PyObject_CallFunction(__moduleShutdown, (char *)"()"));
+ if (__moduleShutdown != nullptr)
+ Py_XDECREF(PyObject_CallFunction(__moduleShutdown, const_cast<char *>("()")));
}
else
(void)PyObject_INIT(qApp_content, type);
@@ -216,9 +223,29 @@ setup_qApp_var(PyObject *module)
}
void
-NotifyModuleForQApp(PyObject *module)
+NotifyModuleForQApp(PyObject *module, void *qApp)
{
setup_qApp_var(module);
+ /*
+ * PYSIDE-571: Check if an QApplication instance exists before the import.
+ * This happens in scriptableapplication and application_test.py .
+ *
+ * Crucial Observation
+ * ===================
+ *
+ * A Q*Application object from C++ does not have a wrapper or constructor
+ * like instances created by Python. It makes no sense to support
+ * deletion or special features like qApp resurrection.
+ *
+ * Therefore, the implementation is very simple and just redirects the
+ * qApp_contents variable and assigns the instance, instead of vice-versa.
+ */
+ if (qApp != nullptr) {
+ Shiboken::AutoDecRef pycore(PyImport_ImportModule("PySide2.QtCore"));
+ Shiboken::AutoDecRef coreapp(PyObject_GetAttrString(pycore, "QCoreApplication"));
+ qApp_content = PyObject_CallMethod(coreapp, "instance", "");
+ reset_qApp_var();
+ }
}
diff --git a/sources/shiboken2/libshiboken/qapp_macro.h b/sources/shiboken2/libshiboken/qapp_macro.h
index ded892383..be45241de 100644
--- a/sources/shiboken2/libshiboken/qapp_macro.h
+++ b/sources/shiboken2/libshiboken/qapp_macro.h
@@ -46,7 +46,7 @@ extern "C"
{
LIBSHIBOKEN_API PyObject *MakeSingletonQAppWrapper(PyTypeObject *type);
-LIBSHIBOKEN_API void NotifyModuleForQApp(PyObject *module);
+LIBSHIBOKEN_API void NotifyModuleForQApp(PyObject *module, void *qApp);
} // extern "C"
diff --git a/sources/shiboken2/libshiboken/signature.cpp b/sources/shiboken2/libshiboken/signature.cpp
index c83f90d64..8003f142a 100644
--- a/sources/shiboken2/libshiboken/signature.cpp
+++ b/sources/shiboken2/libshiboken/signature.cpp
@@ -1180,4 +1180,24 @@ SetError_Argument(PyObject *args, const char *func_name)
PyErr_SetObject(err, msg);
}
+/*
+ * Support for the metatype SbkObjectType_Type's tp_getset.
+ *
+ * This was not necessary for __signature__, because PyType_Type inherited it.
+ * But the __doc__ attribute existed already by inheritance, and calling
+ * PyType_Modified() is not supported. So we added the getsets explicitly
+ * to the metatype.
+ */
+
+PyObject *
+Sbk_TypeGet___signature__(PyObject *ob, const char *modifier)
+{
+ return pyside_tp_get___signature__(ob, modifier);
+}
+
+PyObject *Sbk_TypeGet___doc__(PyObject *ob)
+{
+ return pyside_tp_get___doc__(ob);
+}
+
} //extern "C"
diff --git a/sources/shiboken2/libshiboken/signature.h b/sources/shiboken2/libshiboken/signature.h
index 6b477c52e..57fd4047a 100644
--- a/sources/shiboken2/libshiboken/signature.h
+++ b/sources/shiboken2/libshiboken/signature.h
@@ -48,6 +48,8 @@ extern "C"
LIBSHIBOKEN_API int SbkSpecial_Type_Ready(PyObject *, PyTypeObject *, const char *[]);
LIBSHIBOKEN_API void FinishSignatureInitialization(PyObject *, const char *[]);
LIBSHIBOKEN_API void SetError_Argument(PyObject *, const char *);
+LIBSHIBOKEN_API PyObject *Sbk_TypeGet___signature__(PyObject *, const char *);
+LIBSHIBOKEN_API PyObject *Sbk_TypeGet___doc__(PyObject *);
} // extern "C"
diff --git a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
index 306103304..5f92446cf 100644
--- a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
+++ b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
@@ -208,25 +208,20 @@ class Reloader(object):
This is a singleton class which provides the update function for the
shiboken and PySide classes.
"""
- _uninitialized = "Shiboken minimal sample other smart".split()
- _prefixes = [""]
- try:
- import PySide2
- _uninitialized += PySide2.__all__ + ["testbinding"]
- _prefixes += ["PySide2."]
- except ImportError:
- pass
-
def __init__(self):
self.sys_module_count = 0
- self.uninitialized = self._uninitialized
+
+ @staticmethod
+ def module_valid(mod):
+ if getattr(mod, "__file__", None) and not os.path.isdir(mod.__file__):
+ ending = os.path.splitext(mod.__file__)[-1]
+ return ending not in (".py", ".pyc", ".pyo", ".pyi")
+ return False
def update(self):
"""
- update is responsible to import all modules from shiboken and PySide
- which are already in sys.modules.
- The purpose is to follow all user imports without introducing new
- ones.
+ 'update' imports all binary modules which are already in sys.modules.
+ The reason is to follow all user imports without introducing new ones.
This function is called by pyside_type_init to adapt imports
when the number of imported modules has changed.
"""
@@ -234,37 +229,32 @@ class Reloader(object):
return
self.sys_module_count = len(sys.modules)
g = globals()
- for mod_name in self.uninitialized[:]:
- for prefix in self._prefixes:
- import_name = prefix + mod_name
- if import_name in sys.modules:
- # check if this is a real module
- check_module(sys.modules[import_name])
- # module is real
- self.uninitialized.remove(mod_name)
- proc_name = "init_" + mod_name
- if proc_name in g:
- # Do the 'import {import_name}' first.
- # 'top' is PySide2 when we do 'import PySide.QtCore'
- # or Shiboken if we do 'import Shiboken'.
- # Convince yourself that these two lines below have the same
- # global effect as "import Shiboken" or "import PySide2.QtCore".
- top = __import__(import_name)
- g[top.__name__] = top
- # Modules are in place, we can update the type_map.
- g.update(g[proc_name]())
+ # PYSIDE-1009: Try to recognize unknown modules in errorhandler.py
+ candidates = list(mod_name for mod_name in sys.modules
+ if self.module_valid(sys.modules[mod_name]))
+ for mod_name in candidates:
+ # 'top' is PySide2 when we do 'import PySide.QtCore'
+ # or Shiboken if we do 'import Shiboken'.
+ # Convince yourself that these two lines below have the same
+ # global effect as "import Shiboken" or "import PySide2.QtCore".
+ top = __import__(mod_name)
+ g[top.__name__] = top
+ proc_name = "init_" + mod_name.replace(".", "_")
+ if proc_name in g:
+ # Modules are in place, we can update the type_map.
+ g.update(g.pop(proc_name)())
+
def check_module(mod):
# During a build, there exist the modules already as directories,
# although the '*.so' was not yet created. This causes a problem
# in Python 3, because it accepts folders as namespace modules
# without enforcing an '__init__.py'.
- if not getattr(mod, "__file__", None) or os.path.isdir(mod.__file__):
+ if not Reloader.module_valid(mod):
mod_name = mod.__name__
- raise ImportError("Module '{mod_name}' is at most a namespace!"
+ raise ImportError("Module '{mod_name}' is not a binary module!"
.format(**locals()))
-
update_mapping = Reloader().update
type_map = {}
namespace = globals() # our module's __dict__
@@ -274,6 +264,7 @@ type_map.update({
"QVector": typing.List,
"QSet": typing.Set,
"QPair": Pair,
+ "QMap": typing.Dict,
})
@@ -348,7 +339,7 @@ def init_smart():
return locals()
# The PySide Part
-def init_QtCore():
+def init_PySide2_QtCore():
from PySide2.QtCore import Qt, QUrl, QDir
from PySide2.QtCore import QRect, QSize, QPoint, QLocale, QByteArray
from PySide2.QtCore import QMarginsF # 5.9
@@ -401,7 +392,6 @@ def init_QtCore():
"list of QAbstractState": typing.List[PySide2.QtCore.QAbstractState],
"list of QAbstractAnimation": typing.List[PySide2.QtCore.QAbstractAnimation],
"QVariant()": Invalid(Variant),
- "QMap": typing.Dict,
"PySide2.QtCore.bool": bool,
"QHash": typing.Dict,
"PySide2.QtCore.QChar": Char,
@@ -495,7 +485,7 @@ def init_QtCore():
return locals()
-def init_QtGui():
+def init_PySide2_QtGui():
from PySide2.QtGui import QPageLayout, QPageSize # 5.12 macOS
type_map.update({
"QVector< QTextLayout.FormatRange >()": [], # do we need more structure?
@@ -525,7 +515,7 @@ def init_QtGui():
return locals()
-def init_QtWidgets():
+def init_PySide2_QtWidgets():
from PySide2.QtWidgets import QWidget, QMessageBox, QStyleOption, QStyleHintReturn, QStyleOptionComplex
from PySide2.QtWidgets import QGraphicsItem, QStyleOptionGraphicsItem # 5.9
type_map.update({
@@ -557,7 +547,7 @@ def init_QtWidgets():
return locals()
-def init_QtSql():
+def init_PySide2_QtSql():
from PySide2.QtSql import QSqlDatabase
type_map.update({
"QLatin1String(defaultConnection)": QSqlDatabase.defaultConnection,
@@ -566,7 +556,7 @@ def init_QtSql():
return locals()
-def init_QtNetwork():
+def init_PySide2_QtNetwork():
type_map.update({
"QMultiMap": MultiMap,
"zero(unsigned short)": 0,
@@ -576,7 +566,7 @@ def init_QtNetwork():
return locals()
-def init_QtXmlPatterns():
+def init_PySide2_QtXmlPatterns():
from PySide2.QtXmlPatterns import QXmlName
type_map.update({
"QXmlName.PrefixCode": Missing("PySide2.QtXmlPatterns.QXmlName.PrefixCode"),
@@ -585,7 +575,7 @@ def init_QtXmlPatterns():
return locals()
-def init_QtMultimedia():
+def init_PySide2_QtMultimedia():
import PySide2.QtMultimediaWidgets
# Check if foreign import is valid. See mapping.py in shiboken2.
check_module(PySide2.QtMultimediaWidgets)
@@ -596,7 +586,7 @@ def init_QtMultimedia():
return locals()
-def init_QtOpenGL():
+def init_PySide2_QtOpenGL():
type_map.update({
"GLuint": int,
"GLenum": int,
@@ -612,7 +602,7 @@ def init_QtOpenGL():
return locals()
-def init_QtQml():
+def init_PySide2_QtQml():
type_map.update({
"QJSValueList()": [],
"PySide2.QtQml.bool volatile": bool,
@@ -624,7 +614,7 @@ def init_QtQml():
return locals()
-def init_QtQuick():
+def init_PySide2_QtQuick():
type_map.update({
"PySide2.QtQuick.QSharedPointer": int,
"PySide2.QtCore.uint": int,
@@ -635,35 +625,35 @@ def init_QtQuick():
return locals()
-def init_QtScript():
+def init_PySide2_QtScript():
type_map.update({
"QScriptValueList()": [],
})
return locals()
-def init_QtTest():
+def init_PySide2_QtTest():
type_map.update({
"PySide2.QtTest.QTouchEventSequence": PySide2.QtTest.QTest.QTouchEventSequence,
})
return locals()
# from 5.9
-def init_QtWebEngineWidgets():
+def init_PySide2_QtWebEngineWidgets():
type_map.update({
"zero(PySide2.QtWebEngineWidgets.QWebEnginePage.FindFlags)": 0,
})
return locals()
# from 5.6, MSVC
-def init_QtWinExtras():
+def init_PySide2_QtWinExtras():
type_map.update({
"QList< QWinJumpListItem* >()": [],
})
return locals()
# from 5.12, macOS
-def init_QtDataVisualization():
+def init_PySide2_QtDataVisualization():
from PySide2.QtDataVisualization import QtDataVisualization
QtDataVisualization.QBarDataRow = typing.List[QtDataVisualization.QBarDataItem]
QtDataVisualization.QBarDataArray = typing.List[QtDataVisualization.QBarDataRow]