aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-04-26 08:03:54 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-04-26 08:04:41 +0200
commit9b01aae7777c7ccde9eed1a8c55aead1524e00e5 (patch)
treec62834ca412f290485dd96d2a7522809b8fce6e1
parent2156651b39fbb6717ed936c94dcd28295436e0a4 (diff)
parent0b842db3a95a44fbda3379d2093cb52f8ae2a1ff (diff)
Merge remote-tracking branch 'origin/5.9' into 5.11
-rw-r--r--checklibs.py153
-rw-r--r--ez_setup.py49
-rw-r--r--missing_bindings.py67
-rw-r--r--popenasync.py70
-rw-r--r--prepare_coin_sources.py134
-rw-r--r--qt_attribution.json12
-rw-r--r--qtinfo.py15
-rw-r--r--setup.py891
-rw-r--r--sources/pyside2/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/CMakeLists.txt19
-rw-r--r--sources/pyside2/PySide2/QtCore/typesystem_core_common.xml244
-rw-r--r--sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml164
-rw-r--r--sources/pyside2/PySide2/QtHelp/typesystem_help.xml2
-rw-r--r--sources/pyside2/PySide2/QtLocation/CMakeLists.txt80
-rw-r--r--sources/pyside2/PySide2/QtLocation/typesystem_location.xml112
-rw-r--r--sources/pyside2/PySide2/QtMultimedia/typesystem_multimedia_common.xml42
-rw-r--r--sources/pyside2/PySide2/QtNetwork/typesystem_network.xml22
-rw-r--r--sources/pyside2/PySide2/QtOpenGL/typesystem_opengl.xml82
-rw-r--r--sources/pyside2/PySide2/QtPositioning/CMakeLists.txt55
-rw-r--r--sources/pyside2/PySide2/QtPositioning/typesystem_positioning.xml80
-rw-r--r--sources/pyside2/PySide2/QtPrintSupport/typesystem_printsupport.xml2
-rw-r--r--sources/pyside2/PySide2/QtQml/typesystem_qml.xml8
-rw-r--r--sources/pyside2/PySide2/QtQuick/typesystem_quick.xml2
-rw-r--r--sources/pyside2/PySide2/QtSensors/CMakeLists.txt106
-rw-r--r--sources/pyside2/PySide2/QtSensors/typesystem_sensors.xml127
-rw-r--r--sources/pyside2/PySide2/QtSql/typesystem_sql.xml10
-rw-r--r--sources/pyside2/PySide2/QtSvg/typesystem_svg.xml4
-rw-r--r--sources/pyside2/PySide2/QtTest/typesystem_test.xml22
-rw-r--r--sources/pyside2/PySide2/QtUiTools/typesystem_uitools.xml12
-rw-r--r--sources/pyside2/PySide2/QtWebEngineCore/CMakeLists.txt37
-rw-r--r--sources/pyside2/PySide2/QtWebEngineCore/typesystem_webenginecore.xml69
-rw-r--r--sources/pyside2/PySide2/QtWebEngineWidgets/CMakeLists.txt1
-rw-r--r--sources/pyside2/PySide2/QtWebEngineWidgets/typesystem_webenginewidgets.xml2
-rw-r--r--sources/pyside2/PySide2/QtWebKitWidgets/typesystem_webkitwidgets.xml6
-rw-r--r--sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml314
-rw-r--r--sources/pyside2/PySide2/QtWidgets/typesystem_widgets_mac.xml2
-rw-r--r--sources/pyside2/PySide2/QtXml/typesystem_xml.xml16
-rw-r--r--sources/pyside2/PySide2/QtXmlPatterns/typesystem_xmlpatterns.xml6
-rw-r--r--sources/pyside2/PySide2/__init__.py.in12
-rw-r--r--sources/pyside2/PySide2/qt.conf.in2
-rw-r--r--sources/pyside2/PySide2/support/signature/qt_attribution.json12
-rw-r--r--sources/pyside2/libpyside/pyside.cpp52
-rw-r--r--sources/pyside2/libpyside/pyside.h3
-rw-r--r--sources/pyside2/libpyside/signalmanager.cpp.in12
-rw-r--r--sources/pyside2/tests/QtCore/qobject_inherits_test.py37
-rw-r--r--sources/pyside2/tests/QtLocation/CMakeLists.txt1
-rw-r--r--sources/pyside2/tests/QtLocation/location.py41
-rw-r--r--sources/pyside2/tests/QtPositioning/CMakeLists.txt1
-rw-r--r--sources/pyside2/tests/QtPositioning/positioning.py43
-rw-r--r--sources/pyside2/tests/QtSensors/CMakeLists.txt1
-rw-r--r--sources/pyside2/tests/QtSensors/sensors.py55
-rw-r--r--sources/pyside2/tests/QtWebEngineCore/CMakeLists.txt29
-rw-r--r--sources/pyside2/tests/QtWebEngineCore/web_engine_custom_scheme.py64
-rw-r--r--sources/pyside2/tests/QtWebEngineWidgets/pyside-474-qtwebengineview.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/CMakeLists.txt3
-rw-r--r--sources/pyside2/tests/QtWidgets/qapp_issue_585.py68
-rw-r--r--sources/pyside2/tests/QtWidgets/qgraphicsobjectreimpl_test.py76
-rw-r--r--sources/pyside2/tests/QtWidgets/qtreeview_test.py9
-rw-r--r--sources/pyside2/tests/QtWidgets/qtreewidget_test.py64
-rw-r--r--sources/shiboken2/ApiExtractor/CMakeLists.txt4
-rw-r--r--sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp246
-rw-r--r--sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h7
-rw-r--r--sources/shiboken2/ApiExtractor/abstractmetalang.cpp12
-rw-r--r--sources/shiboken2/ApiExtractor/abstractmetalang.h17
-rw-r--r--sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp72
-rw-r--r--sources/shiboken2/ApiExtractor/doc/CMakeLists.txt10
-rw-r--r--sources/shiboken2/ApiExtractor/doc/conf.py.in3
-rw-r--r--sources/shiboken2/ApiExtractor/doc/typesystem_specifying_types.rst4
-rw-r--r--sources/shiboken2/ApiExtractor/parser/codemodel.cpp33
-rw-r--r--sources/shiboken2/ApiExtractor/parser/codemodel.h30
-rw-r--r--sources/shiboken2/ApiExtractor/parser/codemodel_enums.h6
-rw-r--r--sources/shiboken2/ApiExtractor/parser/enumvalue.cpp76
-rw-r--r--sources/shiboken2/ApiExtractor/parser/enumvalue.h70
-rw-r--r--sources/shiboken2/ApiExtractor/qtdocparser.cpp14
-rw-r--r--sources/shiboken2/ApiExtractor/tests/testarrayargument.cpp4
-rw-r--r--sources/shiboken2/ApiExtractor/tests/testenum.cpp69
-rw-r--r--sources/shiboken2/ApiExtractor/typesystem.cpp5
-rw-r--r--sources/shiboken2/ApiExtractor/typesystem.h13
-rw-r--r--sources/shiboken2/CMakeLists.txt9
-rw-r--r--sources/shiboken2/doc/README.md12
-rw-r--r--sources/shiboken2/doc/codeinjectionsemantics.rst20
-rw-r--r--sources/shiboken2/doc/dependency-pyqtb.svg600
-rw-r--r--sources/shiboken2/doc/faq.rst37
-rw-r--r--sources/shiboken2/doc/images/bindinggen-development.pngbin34333 -> 32698 bytes
-rw-r--r--sources/shiboken2/doc/images/bindinggen-development.svg475
-rw-r--r--sources/shiboken2/doc/images/boostqtarch.pngbin34257 -> 0 bytes
-rw-r--r--sources/shiboken2/doc/images/boostqtarch.svg226
-rw-r--r--sources/shiboken2/doc/images/converter.dot14
-rw-r--r--sources/shiboken2/doc/images/converter.pngbin37485 -> 22467 bytes
-rw-r--r--sources/shiboken2/doc/images/converter.svg349
-rw-r--r--sources/shiboken2/doc/images/shibokenqtarch.pngbin0 -> 17602 bytes
-rw-r--r--sources/shiboken2/doc/images/shibokenqtarch.svg188
-rw-r--r--sources/shiboken2/doc/overview.rst4
-rw-r--r--sources/shiboken2/doc/ownership.rst8
-rw-r--r--sources/shiboken2/doc/projectfile.rst16
-rw-r--r--sources/shiboken2/doc/sequenceprotocol.rst16
-rw-r--r--sources/shiboken2/doc/typeconverters.rst65
-rw-r--r--sources/shiboken2/doc/typesystemvariables.rst7
-rw-r--r--sources/shiboken2/doc/wordsofadvice.rst9
-rw-r--r--sources/shiboken2/generator/main.cpp23
-rw-r--r--sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp43
-rw-r--r--sources/shiboken2/generator/qtdoc/qtdocgenerator.h2
-rw-r--r--sources/shiboken2/generator/shiboken2/cppgenerator.cpp10
-rw-r--r--sources/shiboken2/generator/shiboken2/shibokengenerator.cpp20
-rw-r--r--sources/shiboken2/libshiboken/qapp_macro.cpp24
-rw-r--r--sources/shiboken2/libshiboken/sbkconverter.cpp5
-rw-r--r--sources/shiboken2/tests/samplebinding/typesystem_sample.xml2
-rw-r--r--utils.py353
108 files changed, 4076 insertions, 2788 deletions
diff --git a/checklibs.py b/checklibs.py
index 172508706..ecedf836d 100644
--- a/checklibs.py
+++ b/checklibs.py
@@ -64,7 +64,7 @@ class MachOFile:
self.header_info = {}
self.load_info()
self.add_to_cache()
-
+
def load_info(self):
if not self.image_path.exists():
return
@@ -72,18 +72,24 @@ class MachOFile:
self.load_rpaths()
def load_header(self):
- # Get the mach-o header info, we're interested in the file type (executable, dylib)
+ # Get the mach-o header info, we're interested in the file type
+ # (executable, dylib)
cmd = 'otool -arch {0} -h "{1}"'
- output = self.shell(cmd, [self.arch, self.image_path.resolved_path], fatal = True)
+ output = self.shell(cmd, [self.arch, self.image_path.resolved_path],
+ fatal = True)
if not output:
- print >> sys.stderr, 'Unable to load mach header for {0} ({1}), architecture mismatch? Use --arch option to pick architecture'.format(self.image_path.resolved_path, self.arch)
+ print("Unable to load mach header for {} ({}), architecture "
+ "mismatch? Use --arch option to pick architecture".format(
+ self.image_path.resolved_path, self.arch), file=sys.stderr)
exit()
(keys, values) = output.splitlines()[2:]
self.header_info = dict(zip(keys.split(), values.split()))
def load_rpaths(self):
- output = self.shell('otool -arch {0} -l "{1}"', [self.arch, self.image_path.resolved_path], fatal = True)
- load_commands = re.split('Load command (\d+)', output)[1:] # skip file name on first line
+ output = self.shell('otool -arch {0} -l "{1}"',
+ [self.arch, self.image_path.resolved_path], fatal = True)
+ # skip file name on first line
+ load_commands = re.split('Load command (\d+)', output)[1:]
self._rpaths = []
load_commands = collections.deque(load_commands)
while load_commands:
@@ -91,7 +97,7 @@ class MachOFile:
command = load_commands.popleft().strip().splitlines()
if command[0].find('LC_RPATH') == -1:
continue
-
+
path = re.findall('path (.+) \(offset \d+\)$', command[2])[0]
image_path = self.image_path_for_recorded_path(path)
image_path.rpath_source = self
@@ -103,26 +109,26 @@ class MachOFile:
while parent:
ancestors.append(parent)
parent = parent.parent
-
+
return ancestors
def self_and_ancestors(self):
return [self] + self.ancestors()
-
+
def rpaths(self):
return self._rpaths
-
+
def all_rpaths(self):
rpaths = []
for image in self.self_and_ancestors():
rpaths.extend(image.rpaths())
return rpaths
-
+
def root(self):
if not self.parent:
return self
return self.ancestors()[-1]
-
+
def executable_path(self):
root = self.root()
if root.is_executable():
@@ -131,26 +137,26 @@ class MachOFile:
def filetype(self):
return long(self.header_info.get('filetype', 0))
-
+
def is_dylib(self):
return self.filetype() == MachOFile.MH_DYLIB
def is_executable(self):
return self.filetype() == MachOFile.MH_EXECUTE
-
+
def all_dependencies(self):
self.walk_dependencies()
return self.cache()['order']
-
+
def walk_dependencies(self, known = {}):
if known.get(self.image_path.resolved_path):
return
-
+
known[self.image_path.resolved_path] = self
-
+
for item in self.dependencies():
item.walk_dependencies(known)
-
+
def dependencies(self):
if not self.image_path.exists():
return []
@@ -158,11 +164,13 @@ class MachOFile:
if self._dependencies:
return self._dependencies
- output = self.shell('otool -arch {0} -L "{1}"', [self.arch, self.image_path.resolved_path], fatal = True)
+ output = self.shell('otool -arch {0} -L "{1}"',
+ [self.arch, self.image_path.resolved_path], fatal = True)
output = [line.strip() for line in output.splitlines()]
del(output[0])
if self.is_dylib():
- del(output[0]) # In the case of dylibs, the first line is the id line
+ # In the case of dylibs, the first line is the id line
+ del(output[0])
self._dependencies = []
for line in output:
@@ -173,25 +181,26 @@ class MachOFile:
image_path = self.image_path_for_recorded_path(recorded_path)
image = self.lookup_or_make_item(image_path)
self._dependencies.append(image)
-
+
return self._dependencies
- # The root item holds the cache, all lower-level requests bubble up the parent chain
+ # The root item holds the cache, all lower-level requests bubble up
+ # the parent chain
def cache(self):
if self.parent:
return self.parent.cache()
return self._cache
-
+
def add_to_cache(self):
cache = self.cache()
cache['paths'][self.image_path.resolved_path] = self
cache['order'].append(self)
-
+
def cached_item_for_path(self, path):
if not path:
return None
return self.cache()['paths'].get(path)
-
+
def lookup_or_make_item(self, image_path):
image = self.cached_item_for_path(image_path.resolved_path)
if not image: # cache miss
@@ -201,20 +210,26 @@ class MachOFile:
def image_path_for_recorded_path(self, recorded_path):
path = ImagePath(None, recorded_path)
- # handle @executable_path
+ # handle @executable_path
if recorded_path.startswith(ImagePath.EXECUTABLE_PATH_TOKEN):
executable_image_path = self.executable_path()
if executable_image_path:
- path.resolved_path = os.path.normpath(recorded_path.replace(ImagePath.EXECUTABLE_PATH_TOKEN, os.path.dirname(executable_image_path.resolved_path)))
+ path.resolved_path = os.path.normpath(
+ recorded_path.replace(
+ ImagePath.EXECUTABLE_PATH_TOKEN,
+ os.path.dirname(executable_image_path.resolved_path)))
# handle @loader_path
elif recorded_path.startswith(ImagePath.LOADER_PATH_TOKEN):
- path.resolved_path = os.path.normpath(recorded_path.replace(ImagePath.LOADER_PATH_TOKEN, os.path.dirname(self.image_path.resolved_path)))
+ path.resolved_path = os.path.normpath(recorded_path.replace(
+ ImagePath.LOADER_PATH_TOKEN,
+ os.path.dirname(self.image_path.resolved_path)))
# handle @rpath
elif recorded_path.startswith(ImagePath.RPATH_TOKEN):
for rpath in self.all_rpaths():
- resolved_path = os.path.normpath(recorded_path.replace(ImagePath.RPATH_TOKEN, rpath.resolved_path))
+ resolved_path = os.path.normpath(recorded_path.replace(
+ ImagePath.RPATH_TOKEN, rpath.resolved_path))
if os.path.exists(resolved_path):
path.resolved_path = resolved_path
path.rpath_source = rpath.rpath_source
@@ -228,19 +243,20 @@ class MachOFile:
def __repr__(self):
return str(self.image_path)
-
+
def dump(self):
- print self.image_path
+ print(self.image_path)
for dependency in self.dependencies():
- print '\t{0}'.format(dependency)
-
+ print('\t{0}'.format(dependency))
+
@staticmethod
def shell(cmd_format, args, fatal = False):
cmd = cmd_format.format(*args)
popen = subprocess.Popen(cmd, shell = True, stdout = subprocess.PIPE)
output = popen.communicate()[0]
if popen.returncode and fatal:
- print >> sys.stderr, 'Nonzero exit status for shell command "{0}"'.format(cmd)
+ print("Nonzero exit status for shell command '{}'".format(cmd),
+ file=sys.stderr)
sys.exit(1)
return output
@@ -250,13 +266,14 @@ class MachOFile:
output = cls.shell('file "{}"', [path])
file_architectures = re.findall(r' executable (\w+)', output)
ordering = 'x86_64 i386'.split()
- file_architectures = sorted(file_architectures, lambda a, b: cmp(ordering.index(a), ordering.index(b)))
+ file_architectures = sorted(file_architectures, lambda a, b: cmp(
+ ordering.index(a), ordering.index(b)))
return file_architectures
MH_EXECUTE = 0x2
MH_DYLIB = 0x6
MH_BUNDLE = 0x8
-
+
# ANSI terminal coloring sequences
class Color:
@@ -265,25 +282,27 @@ class Color:
GREEN = '\033[92m'
RED = '\033[91m'
ENDC = '\033[0m'
-
+
@staticmethod
def red(string):
return Color.wrap(string, Color.RED)
-
+
@staticmethod
def blue(string):
return Color.wrap(string, Color.BLUE)
-
+
@staticmethod
def wrap(string, color):
return Color.HEADER + color + string + Color.ENDC
-# This class holds path information for a mach-0 image file. It holds the path as it was recorded
-# in the loading binary as well as the effective, resolved file system path.
+# This class holds path information for a mach-0 image file.
+# It holds the path as it was recorded in the loading binary as well as
+# the effective, resolved file system path.
# The former can contain @-replacement tokens.
-# In the case where the recorded path contains an @rpath token that was resolved successfully, we also
-# capture the path of the binary that supplied the rpath value that was used.
+# In the case where the recorded path contains an @rpath token that was
+# resolved successfully, we also capture the path of the binary that
+# supplied the rpath value that was used.
# That path itself can contain replacement tokens such as @loader_path.
class ImagePath:
@@ -291,35 +310,38 @@ class ImagePath:
self.recorded_path = recorded_path
self.resolved_path = resolved_path
self.rpath_source = None
-
+
def __repr__(self):
description = None
-
+
if self.resolved_equals_recorded() or self.recorded_path == None:
description = self.resolved_path
else:
- description = '{0} ({1})'.format(self.resolved_path, self.recorded_path)
-
+ description = '{0} ({1})'.format(self.resolved_path,
+ self.recorded_path)
+
if (not self.is_system_location()) and (not self.uses_dyld_token()):
description = Color.blue(description)
-
+
if self.rpath_source:
- description += ' (rpath source: {0})'.format(self.rpath_source.image_path.resolved_path)
-
+ description += ' (rpath source: {0})'.format(
+ self.rpath_source.image_path.resolved_path)
+
if not self.exists():
description += Color.red(' (missing)')
-
+
return description
-
+
def exists(self):
return self.resolved_path and os.path.exists(self.resolved_path)
-
+
def resolved_equals_recorded(self):
- return self.resolved_path and self.recorded_path and self.resolved_path == self.recorded_path
-
+ return (self.resolved_path and self.recorded_path and
+ self.resolved_path == self.recorded_path)
+
def uses_dyld_token(self):
return self.recorded_path and self.recorded_path.startswith('@')
-
+
def is_system_location(self):
system_prefixes = ['/System/Library', '/usr/lib']
for prefix in system_prefixes:
@@ -332,9 +354,13 @@ class ImagePath:
# Command line driver
-parser = optparse.OptionParser(usage = "Usage: %prog [options] path_to_mach_o_file")
-parser.add_option("--arch", dest = "arch", help = "architecture", metavar = "ARCH")
-parser.add_option("--all", dest = "include_system_libraries", help = "Include system frameworks and libraries", action="store_true")
+parser = optparse.OptionParser(
+ usage = "Usage: %prog [options] path_to_mach_o_file")
+parser.add_option(
+ "--arch", dest = "arch", help = "architecture", metavar = "ARCH")
+parser.add_option(
+ "--all", dest = "include_system_libraries",
+ help = "Include system frameworks and libraries", action="store_true")
(options, args) = parser.parse_args()
if len(args) < 1:
@@ -343,15 +369,18 @@ if len(args) < 1:
archs = MachOFile.architectures_for_image_at_path(args[0])
if archs and not options.arch:
- print >> sys.stderr, 'Analyzing architecture {}, override with --arch if needed'.format(archs[0])
+ print('Analyzing architecture {}, override with --arch if needed'.format(
+ archs[0]), file=sys.stderr)
options.arch = archs[0]
toplevel_image = MachOFile(ImagePath(args[0]), options.arch)
for dependency in toplevel_image.all_dependencies():
- if dependency.image_path.exists() and (not options.include_system_libraries) and dependency.image_path.is_system_location():
+ if (dependency.image_path.exists() and
+ (not options.include_system_libraries) and
+ dependency.image_path.is_system_location()):
continue
dependency.dump()
- print
+ print("\n")
diff --git a/ez_setup.py b/ez_setup.py
index eee5013c4..48d86d2a4 100644
--- a/ez_setup.py
+++ b/ez_setup.py
@@ -38,7 +38,8 @@
##
#############################################################################
-"""Bootstrap setuptools installation
+"""
+Bootstrap setuptools installation
To use setuptools in your package's setup.py, include this
file in the same directory and add this to the top of your setup.py::
@@ -100,7 +101,7 @@ def _install(archive_filename, install_args=()):
def _build_egg(egg, archive_filename, to_dir):
with archive_context(archive_filename):
# building an egg
- log.warn('Building a Setuptools egg in %s', to_dir)
+ log.warn('Building a Setuptools egg in {}'.format(to_dir))
_python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir)
# returning the result
log.warn(egg)
@@ -132,7 +133,7 @@ class ContextualZipFile(zipfile.ZipFile):
def archive_context(filename):
# extracting the archive
tmpdir = tempfile.mkdtemp()
- log.warn('Extracting in %s', tmpdir)
+ log.warn('Extracting in {}'.format(tmpdir))
old_wd = os.getcwd()
try:
os.chdir(tmpdir)
@@ -142,7 +143,7 @@ def archive_context(filename):
# going in the directory
subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0])
os.chdir(subdir)
- log.warn('Now working in %s', subdir)
+ log.warn('Now working in {}'.format(subdir))
yield
finally:
@@ -185,9 +186,9 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
except pkg_resources.VersionConflict as VC_err:
if imported:
msg = textwrap.dedent("""
- The required version of setuptools (>={version}) is not available,
- and can't be installed while this script is running. Please
- install a more recent version first, using
+ The required version of setuptools (>={version}) is not
+ available, and can't be installed while this script is running.
+ Please install a more recent version first, using
'easy_install -U setuptools'.
(Currently using {VC_err.args[0]!r})
@@ -201,8 +202,8 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
def _clean_check(cmd, target):
"""
- Run the command to download target. If the command fails, clean up before
- re-raising the error.
+ Run the command to download target.
+ If the command fails, clean up before re-raising the error.
"""
try:
subprocess.check_call(cmd)
@@ -213,15 +214,16 @@ def _clean_check(cmd, target):
def download_file_powershell(url, target):
"""
- Download the file at url to target using Powershell (which will validate
- trust). Raise an exception if the command cannot complete.
+ Download the file at url to target using Powershell
+ (which will validate trust).
+ Raise an exception if the command cannot complete.
"""
target = os.path.abspath(target)
ps_cmd = (
"[System.Net.WebRequest]::DefaultWebProxy.Credentials = "
"[System.Net.CredentialCache]::DefaultCredentials; "
- "(new-object System.Net.WebClient).DownloadFile(%(url)r, %(target)r)"
- % vars()
+ "(new-object System.Net.WebClient).DownloadFile({}, {})".format(
+ url, target))
)
cmd = [
'powershell',
@@ -275,8 +277,8 @@ download_file_wget.viable = has_wget
def download_file_insecure(url, target):
"""
- Use Python to download the file, even though it cannot authenticate the
- connection.
+ Use Python to download the file, even though it cannot authenticate
+ the connection.
"""
src = urlopen(url)
try:
@@ -304,11 +306,13 @@ def get_best_downloader():
def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
to_dir=os.curdir, delay=15, downloader_factory=get_best_downloader):
"""
- Download setuptools from a specified location and return its filename
+ Download setuptools from a specified location and return its
+ filename
- `version` should be a valid setuptools version number that is available
- as an sdist for download under the `download_base` URL (which should end
- with a '/'). `to_dir` is the directory where the egg will be downloaded.
+ `version` should be a valid setuptools version number that is
+ available as an sdist for download under the `download_base` URL
+ (which should end with a '/').
+ `to_dir` is the directory where the egg will be downloaded.
`delay` is the number of seconds to pause before an actual download
attempt.
@@ -317,18 +321,19 @@ def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
"""
# making sure we use the absolute path
to_dir = os.path.abspath(to_dir)
- zip_name = "setuptools-%s.zip" % version
+ zip_name = "setuptools-{}.zip".format(version)
url = download_base + zip_name
saveto = os.path.join(to_dir, zip_name)
if not os.path.exists(saveto): # Avoid repeated downloads
- log.warn("Downloading %s", url)
+ log.warn("Downloading {}".format(url))
downloader = downloader_factory()
downloader(url, saveto)
return os.path.realpath(saveto)
def _build_install_args(options):
"""
- Build the arguments to 'python setup.py install' on the setuptools package
+ Build the arguments to 'python setup.py install' on the
+ setuptools package
"""
return ['--user'] if options.user_install else []
diff --git a/missing_bindings.py b/missing_bindings.py
index 894fdbd58..ddc33a04d 100644
--- a/missing_bindings.py
+++ b/missing_bindings.py
@@ -37,19 +37,21 @@
##
#############################################################################
-# This script is used to generate a summary of missing types / classes which are present in C++ Qt5,
-# but are missing in PySide2.
+# This script is used to generate a summary of missing types / classes
+# which are present in C++ Qt5, but are missing in PySide2.
#
# Required packages: bs4
# Installed via: pip install bs4
#
-# The script uses beautiful soup 4 to parse out the class names from the online Qt
-# documentation. It then tries to import the types from PySide2.
+# The script uses beautiful soup 4 to parse out the class names from
+# the online Qt documentation. It then tries to import the types from
+# PySide2.
#
# Example invocation of script:
# python missing_bindings.py --qt-version 5.9 -w all
# --qt-version - specify which version of qt documentation to load.
-# -w - if PyQt5 is an installed package, check if the tested class also exists there.
+# -w - if PyQt5 is an installed package, check if the tested
+# class also exists there.
from __future__ import print_function
@@ -237,8 +239,8 @@ parser.add_argument("--which-missing",
choices=['all', 'in-pyqt', 'not-in-pyqt'],
type=str,
dest='which_missing',
- help="Which missing types to show (all, or just those that are not present in "
- "PyQt)")
+ help="Which missing types to show (all, or just those "
+ "that are not present in PyQt)")
args = parser.parse_args()
@@ -292,18 +294,18 @@ def log(*pargs, **kw):
log('PySide2 bindings for Qt {}'.format(args.version), style='heading1')
-log("""
-Using Qt version {} documentation to find public API Qt types and test if the types are present \
-in the PySide2 package.""".format(args.version))
+log("""Using Qt version {} documentation to find public API Qt types and test "
+ "if the types are present in the PySide2 package.""".format(args.version))
-log("""
-Results are usually stored at https://wiki.qt.io/PySide2_Missing_Bindings so consider \
-taking the contents of the generated missing_bindings_for_wiki_qt_io.txt file and updating \
-the linked wiki page.""", style='end')
+log("""Results are usually stored at
+https://wiki.qt.io/PySide2_Missing_Bindings
+so consider taking the contents of the generated
+missing_bindings_for_wiki_qt_io.txt file and updating the linked wiki page.""",
+style='end')
-log("""
-Similar report: https://gist.github.com/ethanhs/6c626ca4e291f3682589699296377d3a \
-""", style='text_with_link')
+log("""Similar report:
+https://gist.github.com/ethanhs/6c626ca4e291f3682589699296377d3a""",
+style='text_with_link')
python_executable = os.path.basename(sys.executable or '')
command_line_arguments = ' '.join(sys.argv)
@@ -324,20 +326,22 @@ for module_name in modules_to_test.keys():
# Import the tested module
try:
- pyside_tested_module = getattr(__import__(pyside_package_name, fromlist=[module_name]),
- module_name)
+ pyside_tested_module = getattr(__import__(pyside_package_name,
+ fromlist=[module_name]), module_name)
except Exception as e:
- log('\nCould not load {}.{}. Received error: {}. Skipping.\n'
- .format(pyside_package_name, module_name, str(e).replace("'", '')), style='error')
+ log('\nCould not load {}.{}. Received error: {}. Skipping.\n'.format(
+ pyside_package_name, module_name, str(e).replace("'", '')),
+ style='error')
total_missing_modules_count += 1
continue
try:
- pyqt_tested_module = getattr(__import__(pyqt_package_name, fromlist=[module_name]),
- module_name)
+ pyqt_tested_module = getattr(__import__(pyqt_package_name,
+ fromlist=[module_name]), module_name)
except Exception as e:
- log('\nCould not load {}.{} for comparison. Received error: {}.\n'
- .format(pyqt_package_name, module_name, str(e).replace("'", '')), style='error')
+ log("\nCould not load {}.{} for comparison. "
+ "Received error: {}.\n".format(pyqt_package_name, module_name,
+ str(e).replace("'", '')), style='error')
# Get C++ class list from documentation page.
page = urllib2.urlopen(url)
@@ -353,8 +357,8 @@ for module_name in modules_to_test.keys():
if link_text not in types_to_ignore:
types_on_html_page.append(link_text)
- log('Number of types in {}: {}'.format(module_name, len(types_on_html_page)),
- style='bold_colon')
+ log('Number of types in {}: {}'.format(module_name,
+ len(types_on_html_page)), style='bold_colon')
missing_types_count = 0
missing_types_compared_to_pyqt = 0
@@ -383,7 +387,8 @@ for module_name in modules_to_test.keys():
missing_types.append(missing_type)
elif args.which_missing == 'in-pyqt' and is_present_in_pyqt:
missing_types.append(missing_type)
- elif args.which_missing == 'not-in-pyqt' and not is_present_in_pyqt:
+ elif (args.which_missing == 'not-in-pyqt' and
+ not is_present_in_pyqt):
missing_types.append(missing_type)
if len(missing_types) > 0:
@@ -393,7 +398,8 @@ for module_name in modules_to_test.keys():
log(missing_type, style='code')
log('')
- log('Number of missing types: {}'.format(missing_types_count), style='bold_colon')
+ log('Number of missing types: {}'.format(missing_types_count),
+ style='bold_colon')
if len(missing_types) > 0:
log('Number of missing types that are present in PyQt5: {}'
.format(missing_types_compared_to_pyqt), style='bold_colon')
@@ -402,7 +408,8 @@ for module_name in modules_to_test.keys():
log('', style='end')
log('Summary', style='heading5')
-log('Total number of missing types: {}'.format(total_missing_types_count), style='bold_colon')
+log('Total number of missing types: {}'.format(total_missing_types_count),
+ style='bold_colon')
log('Total number of missing types that are present in PyQt5: {}'
.format(total_missing_types_count_compared_to_pyqt), style='bold_colon')
log('Total number of missing modules: {}'
diff --git a/popenasync.py b/popenasync.py
index eedc2fd8b..2a5af3dd8 100644
--- a/popenasync.py
+++ b/popenasync.py
@@ -76,10 +76,10 @@ if mswindows:
# Strings only; do nothing
def encode(s):
return s
-
+
def decode(b):
return b
-
+
try:
import ctypes
from ctypes.wintypes import DWORD
@@ -87,12 +87,15 @@ if mswindows:
TerminateProcess = ctypes.windll.kernel32.TerminateProcess
def WriteFile(handle, data, ol = None):
c_written = DWORD()
- success = ctypes.windll.kernel32.WriteFile(handle, ctypes.create_string_buffer(encode(data)), len(data), ctypes.byref(c_written), ol)
+ success = ctypes.windll.kernel32.WriteFile(handle,
+ ctypes.create_string_buffer(encode(data)), len(data),
+ ctypes.byref(c_written), ol)
return ctypes.windll.kernel32.GetLastError(), c_written.value
def ReadFile(handle, desired_bytes, ol = None):
c_read = DWORD()
buffer = ctypes.create_string_buffer(desired_bytes+1)
- success = ctypes.windll.kernel32.ReadFile(handle, buffer, desired_bytes, ctypes.byref(c_read), ol)
+ success = ctypes.windll.kernel32.ReadFile(handle, buffer,
+ desired_bytes, ctypes.byref(c_read), ol)
buffer[c_read.value] = null_byte
return ctypes.windll.kernel32.GetLastError(), decode(buffer.value)
def PeekNamedPipe(handle, desired_bytes):
@@ -101,19 +104,23 @@ if mswindows:
if desired_bytes > 0:
c_read = DWORD()
buffer = ctypes.create_string_buffer(desired_bytes+1)
- success = ctypes.windll.kernel32.PeekNamedPipe(handle, buffer, desired_bytes, ctypes.byref(c_read), ctypes.byref(c_avail), ctypes.byref(c_message))
+ success = ctypes.windll.kernel32.PeekNamedPipe(handle, buffer,
+ desired_bytes, ctypes.byref(c_read), ctypes.byref(c_avail),
+ ctypes.byref(c_message))
buffer[c_read.value] = null_byte
return decode(buffer.value), c_avail.value, c_message.value
else:
- success = ctypes.windll.kernel32.PeekNamedPipe(handle, None, desired_bytes, None, ctypes.byref(c_avail), ctypes.byref(c_message))
+ success = ctypes.windll.kernel32.PeekNamedPipe(handle, None,
+ desired_bytes, None, ctypes.byref(c_avail),
+ ctypes.byref(c_message))
return "", c_avail.value, c_message.value
-
+
except ImportError:
from win32file import ReadFile, WriteFile
from win32pipe import PeekNamedPipe
from win32api import TerminateProcess
import msvcrt
-
+
else:
from signal import SIGINT, SIGTERM, SIGKILL
import select
@@ -128,16 +135,16 @@ PIPE = subprocess.PIPE
class Popen(subprocess.Popen):
def __init__(self, *args, **kwargs):
subprocess.Popen.__init__(self, *args, **kwargs)
-
+
def recv(self, maxsize=None):
return self._recv('stdout', maxsize)
-
+
def recv_err(self, maxsize=None):
return self._recv('stderr', maxsize)
def send_recv(self, input='', maxsize=None):
return self.send(input), self.recv(maxsize), self.recv_err(maxsize)
-
+
def read_async(self, wait=.1, e=1, tr=5, stderr=0):
if tr < 1:
tr = 1
@@ -159,21 +166,21 @@ class Popen(subprocess.Popen):
else:
time.sleep(max((x-time.time())/tr, 0))
return ''.join(y)
-
+
def send_all(self, data):
while len(data):
sent = self.send(data)
if sent is None:
raise Exception("Other end disconnected!")
data = buffer(data, sent)
-
+
def get_conn_maxsize(self, which, maxsize):
if maxsize is None:
maxsize = 1024
elif maxsize < 1:
maxsize = 1
return getattr(self, which), maxsize
-
+
def _close(self, which):
conn = getattr(self, which)
flags = fcntl.fcntl(conn, fcntl.F_GETFL)
@@ -182,13 +189,13 @@ class Popen(subprocess.Popen):
assert conn.read() == ''
getattr(self, which).close()
setattr(self, which, None)
-
+
if mswindows:
def kill(self):
# Recipes
#http://me.in-berlin.de/doc/python/faq/windows.html#how-do-i-emulate-os-kill-in-windows
#http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/347462
-
+
"""kill function for Win32"""
TerminateProcess(int(self._handle), 0) # returns None
@@ -212,7 +219,7 @@ class Popen(subprocess.Popen):
conn, maxsize = self.get_conn_maxsize(which, maxsize)
if conn is None:
return None
-
+
try:
x = msvcrt.get_osfhandle(conn.fileno())
(read, nAvail, nMessage) = PeekNamedPipe(x, 0)
@@ -226,7 +233,7 @@ class Popen(subprocess.Popen):
if geterror()[0] in (109, errno.ESHUTDOWN):
return self._close(which)
raise
-
+
if self.universal_newlines:
# Translate newlines. For Python 3.x assume read is text.
# If bytes then another solution is needed.
@@ -241,7 +248,7 @@ class Popen(subprocess.Popen):
killed_pid, stat = os.waitpid(self.pid, os.WNOHANG)
if killed_pid != 0: return
-
+
def send(self, input):
if not self.stdin:
return None
@@ -262,15 +269,15 @@ class Popen(subprocess.Popen):
conn, maxsize = self.get_conn_maxsize(which, maxsize)
if conn is None:
return None
-
+
flags = fcntl.fcntl(conn, fcntl.F_GETFL)
if not conn.closed:
fcntl.fcntl(conn, fcntl.F_SETFL, flags| os.O_NONBLOCK)
-
+
try:
if not select.select([conn], [], [], 0)[0]:
return ''
-
+
try:
r = conn.read(maxsize)
except IOError as e:
@@ -279,7 +286,7 @@ class Popen(subprocess.Popen):
raise
if not r:
return self._close(which)
-
+
if self.universal_newlines:
r = r.replace("\r\n", "\n").replace("\r", "\n")
return r
@@ -292,7 +299,7 @@ class Popen(subprocess.Popen):
def proc_in_time_or_kill(cmd, time_out, wd = None, env = None):
proc = Popen (
cmd, cwd = wd, env = env,
- stdin = subprocess.PIPE, stdout = subprocess.PIPE,
+ stdin = subprocess.PIPE, stdout = subprocess.PIPE,
stderr = subprocess.STDOUT, universal_newlines = 1
)
@@ -305,13 +312,13 @@ def proc_in_time_or_kill(cmd, time_out, wd = None, env = None):
response += [proc.read_async(wait=0.1, e=0)]
if ret_code is None:
- ret_code = '"Process timed out (time_out = %s secs) ' % time_out
+ ret_code = '"Process timed out (time_out = {} secs) '.format(time_out)
try:
proc.kill()
ret_code += 'and was successfully terminated"'
except Exception:
- ret_code += ('and termination failed (exception: %s)"' %
- (geterror(),))
+ ret_code += ("and termination failed "
+ "(exception: {})".format(geterror(),))
return ret_code, ''.join(response)
@@ -322,7 +329,7 @@ class AsyncTest(unittest.TestCase):
ret_code, response = proc_in_time_or_kill(
[sys.executable, '-c', 'while 1: pass'], time_out = 1
)
-
+
self.assert_( 'rocess timed out' in ret_code )
self.assert_( 'successfully terminated' in ret_code )
@@ -330,10 +337,11 @@ class AsyncTest(unittest.TestCase):
def _example():
if sys.platform == 'win32':
- shell, commands, tail = ('cmd', ('echo "hello"', 'echo "HELLO WORLD"'), '\r\n')
+ shell, commands, tail = ('cmd', ('echo "hello"', 'echo "HELLO WORLD"'),
+ '\r\n')
else:
shell, commands, tail = ('sh', ('ls', 'echo HELLO WORLD'), '\n')
-
+
a = Popen(shell, stdin=PIPE, stdout=PIPE)
sys.stdout.write(a.read_async())
sys.stdout.write(" ")
@@ -346,7 +354,7 @@ def _example():
a.wait()
################################################################################
-
+
if __name__ == '__main__':
if 1: unittest.main()
else: _example()
diff --git a/prepare_coin_sources.py b/prepare_coin_sources.py
deleted file mode 100644
index 7ef291d77..000000000
--- a/prepare_coin_sources.py
+++ /dev/null
@@ -1,134 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of PySide2.
-##
-## $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$
-##
-#############################################################################
-
-from __future__ import print_function
-import os
-import sys
-import shutil
-from subprocess import PIPE, Popen
-from utils import option_value
-from utils import run_process
-
-git_server = "git://code.qt.io"
-
-QT_CI_TESTED_SUBMODULE = option_value("module")
-SUBMODULE_BRANCH = option_value("branch")
-
-submodules = {
- "pyside2-tools" : "pyside-tools"
-}
-
-def usage():
- print("""\
-This is a utility script for pyside-setup to prepare its source tree for testing
-by the Qt Continuous Integration (CI). The script will checkout all submodules in the
-pyside-setup/ sources directory except the one under test in the CI. The submodule
-to be tested is expected to be found as a sibling directory of pyside-setup,
-from which it is moved under the pyside-setup/sources directory.
-
-Usage:
-python prepare-sources.py --module=pyside/<submodule> --branch=<branch>
-
---module
- Module is one of the submodules in the pyside-setup/source directory.
- The script expects to find this module as a sibling directory of
- pyside-setup. The directory is moved under pyside-setup/sources and
- renamed as expected.
-
---branch
- Branch is the one that will be checked out when cloning pyside-setup's
- submodules from git.
- """)
- sys.exit(0)
-
-def prepare_sources():
- for module_name, repo_name in submodules.items():
- module_dir = os.path.join("sources", module_name)
- if os.path.exists(module_dir) and repo_name != QT_CI_TESTED_SUBMODULE:
- sub_repo = git_server + "/pyside/" + repo_name + ".git"
- try:
- shutil.move(module_dir, module_dir + "_removed")
- except Exception as e:
- raise Exception("!!!!!!!!!!!!! Failed to rename %s " % module_dir)
- git_checkout_cmd = ["git", "clone", sub_repo, module_dir]
- if run_process(git_checkout_cmd) != 0:
- raise Exception("!!!!!!!!!!!!! Failed to clone the git submodule %s" % sub_repo)
- print("************************* CLONED **********************")
- for module_name, repo_name in submodules.items():
- print("***** Preparing %s" % module_name)
- if repo_name == QT_CI_TESTED_SUBMODULE:
- print("Skipping tested module %s and using sources from Coin storage instead" % module_name)
- module_dir = os.path.join("sources", module_name)
- storage_dir = os.path.join("..", QT_CI_TESTED_SUBMODULE)
- try:
- shutil.move(module_dir, module_dir + "_replaced_as_tested")
- except Exception as e:
- raise Exception("!!!!!!!!!!!!! Failed to rename %s " % module_dir)
- shutil.move(storage_dir, module_dir)
- else:
- module_dir = os.path.join("sources", module_name)
- os.chdir(module_dir)
- #Make sure the branch exists, if not use dev
- _branch = SUBMODULE_BRANCH
- git_list_branch_cmd = ["git", "ls-remote", "origin", "refs/heads/" + _branch]
- shell = (sys.platform == "win32")
- result = Popen(git_list_branch_cmd, stdout=PIPE, shell=shell)
- if len(result.communicate()[0].split())==0:
- print("Warning: Requested %s branch doesn't exist so we'll fall back to 'dev' branch instead"\
- % SUBMODULE_BRANCH)
- _branch = "dev"
- print("Checking out submodule %s to branch %s" % (module_name, _branch))
- git_checkout_cmd = ["git", "checkout", _branch]
- if run_process(git_checkout_cmd) != 0:
- print("Failed to initialize the git submodule %s" % module_name)
- else:
- print("Submodule %s has branch %s checked out" % (module_name, _branch))
- os.chdir(script_dir)
-
-
-if QT_CI_TESTED_SUBMODULE is not None:
- QT_CI_TESTED_SUBMODULE = QT_CI_TESTED_SUBMODULE.split('/')[1]
-
-if SUBMODULE_BRANCH is None:
- usage()
-
-script_dir = os.getcwd()
-
-if __name__ == "__main__":
- prepare_sources()
diff --git a/qt_attribution.json b/qt_attribution.json
deleted file mode 100644
index 7a005587d..000000000
--- a/qt_attribution.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "Id": "python",
- "Name": "Python",
- "QDocModule": "",
- "QtUsage": "Used for PySide in the signature extension.",
-
- "Description": "PySide is an add-on for Python. The signature packages of PySide uses certain copied source files (inspect.py, typing.py) to fix the version, and backport_inspect, an adaptation by QtC to Python 2.7 . See the folder sources/pyside2/PySide2/support/signature .",
- "Homepage": "http://www.python.org/",
- "Version": "3.6.2",
- "License": "PSF LICENSE AGREEMENT FOR PYTHON 3.6.2",
- "Copyright": "© Copyright 2001-2017, Python Software Foundation."
-}
diff --git a/qtinfo.py b/qtinfo.py
index c61e796b0..e3591d987 100644
--- a/qtinfo.py
+++ b/qtinfo.py
@@ -100,7 +100,9 @@ class QtInfo(object):
return self.getProperty("QMAKE_MACOSX_DEPLOYMENT_TARGET")
def getBuildType(self):
- """ Return value is either debug, release, debug_release, or None. """
+ """
+ Return value is either debug, release, debug_release, or None.
+ """
return self.getProperty("BUILD_TYPE")
def getSrcDir(self):
@@ -168,8 +170,8 @@ class QtInfo(object):
return None
def _getOtherProperties(self):
- # Get the src property separately, because it is not returned by qmake unless explicitly
- # specified.
+ # Get the src property separately, because it is not returned by
+ # qmake unless explicitly specified.
key = 'QT_INSTALL_PREFIX/src'
result = self._getQMakeOutput(['-query', key])
self._query_dict[key] = result
@@ -182,7 +184,8 @@ class QtInfo(object):
if key in self._mkspecs_dict:
self._query_dict[key] = self._mkspecs_dict[key]
- # Figure out how Qt was built: debug mode, release mode, or both.
+ # Figure out how Qt was built:
+ # debug mode, release mode, or both.
build_type = self._parseQtBuildType()
if build_type:
self._query_dict['BUILD_TYPE'] = build_type
@@ -207,8 +210,8 @@ class QtInfo(object):
value = found.group(2).strip()
self._mkspecs_dict[key] = value
- # We need to clean up after qmake, which always creates a .qmake.stash file after a -E
- # invocation.
+ # We need to clean up after qmake, which always creates a
+ # .qmake.stash file after a -E invocation.
qmake_stash_file = os.path.join(os.getcwd(), ".qmake.stash")
if os.path.exists(qmake_stash_file):
os.remove(qmake_stash_file)
diff --git a/setup.py b/setup.py
index 7500b79d8..5b1faf0ff 100644
--- a/setup.py
+++ b/setup.py
@@ -173,16 +173,16 @@ OPTIONAL:
* macOS SDK:
You can specify which macOS SDK should be used for compilation with
the option:
- --osx-sysroot=</path/to/sdk>.
+ --macos-sysroot=</path/to/sdk>.
- e.g.: "--osx-sysroot=/Applications/.../Developer/SDKs/MacOSX10.11.sdk/"
+ e.g.: "--macos-sysroot=/Applications/Xcode.app/.../Developer/SDKs/MacOSX10.12.sdk/"
* macOS minimum deployment target:
You can specify a custom macOS minimum deployment target with the
option:
- --osx-deployment-target=<value>
+ --macos-deployment-target=<value>
- e.g.: "--osx-deployment-target=10.10"
+ e.g.: "--macos-deployment-target=10.10"
If the option is not set, the minimum deployment target of the used
Qt library will be used instead. Thus it is not necessary to use
@@ -221,28 +221,32 @@ def get_package_timestamp():
@memoize
def get_package_version():
""" Returns the version string for the PySide2 package. """
- pyside_version_py = os.path.join(script_dir, "sources", "pyside2", "pyside_version.py")
+ pyside_version_py = os.path.join(
+ script_dir, "sources", "pyside2", "pyside_version.py")
d = get_python_dict(pyside_version_py)
- final_version = "{}.{}.{}".format(d['major_version'], d['minor_version'], d['patch_version'])
+ final_version = "{}.{}.{}".format(
+ d['major_version'], d['minor_version'], d['patch_version'])
pre_release_version_type = d['pre_release_version_type']
pre_release_version = d['pre_release_version']
if pre_release_version and pre_release_version:
final_version += pre_release_version_type + pre_release_version
- # Add the current timestamp to the version number, to suggest it is a development snapshot
- # build.
+ # Add the current timestamp to the version number, to suggest it
+ # is a development snapshot build.
if OPTION_SNAPSHOT_BUILD:
final_version += ".dev{}".format(get_package_timestamp())
return final_version
-# The __version__ variable is just for PEP compliancy, and shoudn't be used as a value source.
+# The __version__ variable is just for PEP compliancy, and shouldn't be
+# used as a value source.
__version__ = get_package_version()
# Buildable extensions.
containedModules = ['shiboken2', 'pyside2', 'pyside2-tools']
-# Git submodules: ["submodule_name", "location_relative_to_sources_folder"]
+# Git submodules: ["submodule_name",
+# "location_relative_to_sources_folder"]
submodules = [["pyside2-tools"]]
pyside_package_dir_name = "pyside_package"
@@ -297,7 +301,7 @@ from utils import update_env_path
from utils import init_msvc_env
from utils import regenerate_qt_resources
from utils import filter_match
-from utils import osx_fix_rpaths_for_library
+from utils import macos_fix_rpaths_for_library
from utils import copy_icu_libs
from utils import find_files_using_glob
@@ -333,19 +337,21 @@ OPTION_CMAKE = option_value("cmake")
OPTION_OPENSSL = option_value("openssl")
OPTION_ONLYPACKAGE = has_option("only-package")
OPTION_STANDALONE = has_option("standalone")
-OPTION_VERSION = option_value("version") # Deprecated
-OPTION_LISTVERSIONS = has_option("list-versions") # Deprecated
OPTION_MAKESPEC = option_value("make-spec")
OPTION_IGNOREGIT = has_option("ignore-git")
-OPTION_NOEXAMPLES = has_option("no-examples") # don't include pyside2-examples
-OPTION_JOBS = option_value('jobs') # number of parallel build jobs
-OPTION_JOM = has_option('jom') # Legacy, not used any more.
-OPTION_NO_JOM = has_option('no-jom') # Do not use jom instead of nmake with msvc
+# don't include pyside2-examples
+OPTION_NOEXAMPLES = has_option("no-examples")
+# number of parallel build jobs
+OPTION_JOBS = option_value('jobs')
+# Legacy, not used any more.
+OPTION_JOM = has_option('jom')
+# Do not use jom instead of nmake with msvc
+OPTION_NO_JOM = has_option('no-jom')
OPTION_BUILDTESTS = has_option("build-tests")
-OPTION_OSXARCH = option_value("osx-arch")
-OPTION_OSX_USE_LIBCPP = has_option("osx-use-libc++")
-OPTION_OSX_SYSROOT = option_value("osx-sysroot")
-OPTION_OSX_DEPLOYMENT_TARGET = option_value("osx-deployment-target")
+OPTION_MACOS_ARCH = option_value("macos-arch")
+OPTION_MACOS_USE_LIBCPP = has_option("macos-use-libc++")
+OPTION_MACOS_SYSROOT = option_value("macos-sysroot")
+OPTION_MACOS_DEPLOYMENT_TARGET = option_value("macos-deployment-target")
OPTION_XVFB = has_option("use-xvfb")
OPTION_REUSE_BUILD = has_option("reuse-build")
OPTION_SKIP_CMAKE = has_option("skip-cmake")
@@ -355,12 +361,11 @@ OPTION_MODULE_SUBSET = option_value("module-subset")
OPTION_RPATH_VALUES = option_value("rpath")
OPTION_QT_CONF_PREFIX = option_value("qt-conf-prefix")
OPTION_QT_SRC = option_value("qt-src-dir")
-OPTION_ICULIB = option_value("iculib-url") # Deprecated
OPTION_VERBOSE_BUILD = has_option("verbose-build")
OPTION_SANITIZE_ADDRESS = has_option("sanitize-address")
-# This is used automatically by distutils.command.install object, to specify final installation
-# location.
+# This is used automatically by distutils.command.install object, to
+# specify final installation location.
OPTION_FINAL_INSTALL_PREFIX = option_value("prefix")
@@ -378,10 +383,13 @@ if OPTION_CMAKE is not None and os.path.exists(OPTION_CMAKE):
OPTION_CMAKE = os.path.abspath(OPTION_CMAKE)
QMAKE_COMMAND = None
-if OPTION_QMAKE is not None and os.path.exists(OPTION_QMAKE): # Checking whether qmake executable exists
- if os.path.islink(OPTION_QMAKE) and os.path.lexists(OPTION_QMAKE): # Looking whether qmake path is a link and whether the link exists
- if "qtchooser" in os.readlink(OPTION_QMAKE): # Set -qt=X here.
- QMAKE_COMMAND = [OPTION_QMAKE, "-qt=%s" %(OPTION_QT_VERSION)]
+# Checking whether qmake executable exists
+if OPTION_QMAKE is not None and os.path.exists(OPTION_QMAKE):
+ # Looking whether qmake path is a link and whether the link exists
+ if os.path.islink(OPTION_QMAKE) and os.path.lexists(OPTION_QMAKE):
+ # Set -qt=X here.
+ if "qtchooser" in os.readlink(OPTION_QMAKE):
+ QMAKE_COMMAND = [OPTION_QMAKE, "-qt={}".format(OPTION_QT_VERSION)]
if not QMAKE_COMMAND:
QMAKE_COMMAND = [OPTION_QMAKE]
@@ -389,7 +397,7 @@ if len(QMAKE_COMMAND) == 0 or QMAKE_COMMAND[0] is None:
print("qmake could not be found.")
sys.exit(1)
if not os.path.exists(QMAKE_COMMAND[0]):
- print("'%s' does not exist." % QMAKE_COMMAND[0])
+ print("'{}' does not exist.".format(QMAKE_COMMAND[0]))
sys.exit(1)
if OPTION_CMAKE is None:
OPTION_CMAKE = find_executable("cmake")
@@ -398,20 +406,22 @@ if OPTION_CMAKE is None:
print("cmake could not be found.")
sys.exit(1)
if not os.path.exists(OPTION_CMAKE):
- print("'%s' does not exist." % OPTION_CMAKE)
+ print("'{}' does not exist.".format(OPTION_CMAKE))
sys.exit(1)
if sys.platform == "win32":
if OPTION_MAKESPEC is None:
OPTION_MAKESPEC = "msvc"
if not OPTION_MAKESPEC in ["msvc", "mingw"]:
- print("Invalid option --make-spec. Available values are %s" % (["msvc", "mingw"]))
+ print("Invalid option --make-spec. Available values are {}".format(
+ ["msvc", "mingw"]))
sys.exit(1)
else:
if OPTION_MAKESPEC is None:
OPTION_MAKESPEC = "make"
if not OPTION_MAKESPEC in ["make"]:
- print("Invalid option --make-spec. Available values are %s" % (["make"]))
+ print("Invalid option --make-spec. Available values are {}".format(
+ ["make"]))
sys.exit(1)
if OPTION_JOBS:
@@ -424,17 +434,16 @@ if OPTION_JOBS:
else:
OPTION_JOBS = ''
-if OPTION_ICULIB:
- if not OPTION_STANDALONE:
- print("--iculib-url option is a no-op option and will be removed soon.")
-
def is_debug_python():
return getattr(sys, "gettotalrefcount", None) is not None
# Return a prefix suitable for the _install/_build directory
def prefix():
virtualEnvName = os.environ.get('VIRTUAL_ENV', None)
- name = os.path.basename(virtualEnvName) if virtualEnvName is not None else 'pyside'
+ if virtualEnvName is not None:
+ name = os.path.basename(virtualEnvName)
+ else:
+ name = "pyside"
name += str(sys.version_info[0])
if OPTION_DEBUG:
name += 'd'
@@ -444,11 +453,12 @@ def prefix():
# Initialize, pull and checkout submodules
def prepareSubModules():
- print("Initializing submodules for PySide2 version: {}".format(get_package_version()))
+ print("Initializing submodules for PySide2 version: {}".format(
+ get_package_version()))
submodules_dir = os.path.join(script_dir, "sources")
- # Create list of [name, desired branch, absolute path, desired branch]
- # and determine whether all submodules are present
+ # Create list of [name, desired branch, absolute path, desired
+ # branch] and determine whether all submodules are present
needInitSubModules = False
for m in submodules:
@@ -463,11 +473,13 @@ def prepareSubModules():
if needInitSubModules:
git_update_cmd = ["git", "submodule", "update", "--init"]
if run_process(git_update_cmd) != 0:
- m = "Failed to initialize the git submodules: update --init failed"
+ m = ("Failed to initialize the git submodules: "
+ "update --init failed")
raise DistutilsSetupError(m)
git_pull_cmd = ["git", "submodule", "foreach", "git", "fetch", "--all"]
if run_process(git_pull_cmd) != 0:
- m = "Failed to initialize the git submodules: git fetch --all failed"
+ m = ("Failed to initialize the git submodules: "
+ "git fetch --all failed")
raise DistutilsSetupError(m)
else:
print("All submodules present.")
@@ -477,31 +489,34 @@ def prepareSubModules():
m = "Failed to checkout the correct git submodules SHA1s."
raise DistutilsSetupError(m)
-# Single global instance of QtInfo to be used later in multiple code paths.
+# Single global instance of QtInfo to be used later in multiple code
+# paths.
qtinfo = QtInfo(QMAKE_COMMAND)
def get_qt_version():
qt_version = qtinfo.version
if not qt_version:
- log.error("Failed to query the Qt version with qmake {0}".format(self.qtinfo.qmake_command))
+ log.error("Failed to query the Qt version with qmake {0}".format(
+ self.qtinfo.qmake_command))
sys.exit(1)
if LooseVersion(qtinfo.version) < LooseVersion("5.7"):
- m = "Incompatible Qt version detected: {0}. A Qt version >= 5.7 is required."
- log.error(m.format(qt_version))
+ log.error("Incompatible Qt version detected: {}. "
+ "A Qt version >= 5.7 is required.".format(qt_version))
sys.exit(1)
return qt_version
def prepareBuild():
- if os.path.isdir(".git") and not OPTION_IGNOREGIT and not OPTION_ONLYPACKAGE and not OPTION_REUSE_BUILD:
+ if (os.path.isdir(".git") and not OPTION_IGNOREGIT and
+ not OPTION_ONLYPACKAGE and not OPTION_REUSE_BUILD):
prepareSubModules()
# Clean up temp and package folders
for n in [pyside_package_dir_name, "build"]:
d = os.path.join(script_dir, n)
if os.path.isdir(d):
- print("Removing %s" % d)
+ print("Removing {}".format(d))
try:
rmtree(d)
except Exception as e:
@@ -509,7 +524,9 @@ def prepareBuild():
print('ignored error: {}'.format(e))
# Prepare package folders
ppdn = pyside_package_dir_name
- for pkg in [os.path.join(ppdn, "PySide2"), os.path.join(ppdn, "pyside2uic")]:
+ absolute_paths = [os.path.join(ppdn, "PySide2"),
+ os.path.join(ppdn, "pyside2uic")]
+ for pkg in absolute_paths:
pkg_dir = os.path.join(script_dir, pkg)
os.makedirs(pkg_dir)
# locate Qt sources for the documentation
@@ -517,10 +534,12 @@ def prepareBuild():
installPrefix = qtinfo.prefix_dir
if installPrefix:
global qtSrcDir
- if installPrefix.endswith("qtbase"): # In-source, developer build
+ # In-source, developer build
+ if installPrefix.endswith("qtbase"):
qtSrcDir = installPrefix
else: # SDK: Use 'Src' directory
- qtSrcDir = os.path.join(os.path.dirname(installPrefix), 'Src', 'qtbase')
+ qtSrcDir = os.path.join(os.path.dirname(installPrefix),
+ 'Src', 'qtbase')
class pyside_install(_install):
def __init__(self, *args, **kwargs):
@@ -530,16 +549,17 @@ class pyside_install(_install):
_install.initialize_options(self)
if sys.platform == 'darwin':
- # Because we change the plat_name to include a correct deployment target on macOS
- # distutils thinks we are cross-compiling, and throws an exception when trying to
- # execute setup.py install.
- # The check looks like this
- #if self.warn_dir and build_plat != get_platform():
- # raise DistutilsPlatformError("Can't install when "
+ # Because we change the plat_name to include a correct
+ # deployment target on macOS distutils thinks we are
+ # cross-compiling, and throws an exception when trying to
+ # execute setup.py install. The check looks like this
+ # if self.warn_dir and build_plat != get_platform():
+ # raise DistutilsPlatformError("Can't install when "
# "cross-compiling")
- # Obviously get_platform will return the old deployment target.
- # The fix is to disable the warn_dir flag, which was created for bdist_* derived classes
- # to override, for similar cases.
+ # Obviously get_platform will return the old deployment
+ # target. The fix is to disable the warn_dir flag, which
+ # was created for bdist_* derived classes to override, for
+ # similar cases.
self.warn_dir = False
def run(self):
@@ -579,28 +599,32 @@ if wheel_module_exists:
@property
def wheel_dist_name(self):
- # Slightly modified version of wheel's wheel_dist_name method, to add the Qt version
- # as well.
- # Example: PySide2-5.6-5.6.4-cp27-cp27m-macosx_10_10_intel.whl
- # The PySide2 version is "5.6. The built against Qt version is "5.6.4.
+ # Slightly modified version of wheel's wheel_dist_name
+ # method, to add the Qt version as well.
+ # Example:
+ # PySide2-5.6-5.6.4-cp27-cp27m-macosx_10_10_intel.whl
+ # The PySide2 version is "5.6".
+ # The Qt version built against is "5.6.4".
qt_version = get_qt_version()
package_version = get_package_version()
wheel_version = "{}-{}".format(package_version, qt_version)
components = (_safer_name(self.distribution.get_name()),
- wheel_version)
+ wheel_version)
if self.build_number:
components += (self.build_number,)
return '-'.join(components)
def finalize_options(self):
if sys.platform == 'darwin':
- # Override the platform name to contain the correct minimum deployment target.
+ # Override the platform name to contain the correct
+ # minimum deployment target.
# This is used in the final wheel name.
self.plat_name = pyside_build.macos_plat_name()
_bdist_wheel.finalize_options(self)
-# pyside_build_py and pyside_install_lib are reimplemented to preserve symlinks when
-# distutils / setuptools copy files to various directories through the different build stages.
+# pyside_build_py and pyside_install_lib are reimplemented to preserve
+# symlinks when distutils / setuptools copy files to various
+# directories through the different build stages.
class pyside_build_py(_build_py):
def __init__(self, *args, **kwargs):
@@ -623,13 +647,18 @@ class pyside_install_lib(_install_lib):
_install_lib.__init__(self, *args, **kwargs)
def install(self):
- """Installs files from build/xxx directory into final site-packages/PySide2 directory."""
+ """
+ Installs files from build/xxx directory into final
+ site-packages/PySide2 directory.
+ """
if os.path.isdir(self.build_dir):
# Using our own copydir makes sure to preserve symlinks.
- outfiles = copydir(os.path.abspath(self.build_dir), os.path.abspath(self.install_dir))
+ outfiles = copydir(os.path.abspath(self.build_dir),
+ os.path.abspath(self.install_dir))
else:
- self.warn("'%s' does not exist -- no Python modules to install" % self.build_dir)
+ self.warn("'{}' does not exist -- "
+ "no Python modules to install".format(self.build_dir))
return
return outfiles
@@ -642,11 +671,13 @@ class pyside_build(_build):
os_name_backup = os.name
if sys.platform == 'darwin':
self.plat_name = pyside_build.macos_plat_name()
- # This is a hack to circumvent the dubious check in distutils.commands.build ->
- # finalize_options, which only allows setting the plat_name for windows NT.
- # That is not the case for the wheel module though (which does allow setting plat_name),
- # so we circumvent by faking the os name when finalizing the options, and then restoring
- # the original os name.
+ # This is a hack to circumvent the dubious check in
+ # distutils.commands.build -> finalize_options, which only
+ # allows setting the plat_name for windows NT.
+ # That is not the case for the wheel module though (which
+ # does allow setting plat_name), so we circumvent by faking
+ # the os name when finalizing the options, and then
+ # restoring the original os name.
os.name = "nt"
_build.finalize_options(self)
@@ -674,7 +705,7 @@ class pyside_build(_build):
def run(self):
prepareBuild()
platform_arch = platform.architecture()[0]
- log.info("Python architecture is %s" % platform_arch)
+ log.info("Python architecture is {}".format(platform_arch))
build_type = "Debug" if OPTION_DEBUG else "Release"
if OPTION_RELWITHDEBINFO:
@@ -690,17 +721,19 @@ class pyside_build(_build):
elif OPTION_MAKESPEC == "msvc":
nmake_path = find_executable("nmake")
if nmake_path is None or not os.path.exists(nmake_path):
- log.info("nmake not found. Trying to initialize the MSVC env...")
+ log.info("nmake not found. "
+ "Trying to initialize the MSVC env...")
init_msvc_env(platform_arch, build_type)
nmake_path = find_executable("nmake")
- assert(nmake_path is not None and os.path.exists(nmake_path))
+ assert(nmake_path is not None and
+ os.path.exists(nmake_path))
jom_path = None if OPTION_NO_JOM else find_executable("jom")
if jom_path is not None and os.path.exists(jom_path):
- log.info("jom was found in %s" % jom_path)
+ log.info("jom was found in {}".format(jom_path))
make_name = "jom"
make_generator = "NMake Makefiles JOM"
else:
- log.info("nmake was found in %s" % nmake_path)
+ log.info("nmake was found in {}".format(nmake_path))
make_name = "nmake"
make_generator = "NMake Makefiles"
elif OPTION_MAKESPEC == "mingw":
@@ -711,14 +744,14 @@ class pyside_build(_build):
"Invalid option --make-spec.")
make_path = find_executable(make_name)
if make_path is None or not os.path.exists(make_path):
- raise DistutilsSetupError(
- "You need the program \"%s\" on your system path to compile PySide2." \
- % make_name)
+ raise DistutilsSetupError("You need the program '{}' on your "
+ "system path to compile PySide2.".format(make_name))
if OPTION_CMAKE is None or not os.path.exists(OPTION_CMAKE):
raise DistutilsSetupError(
"Failed to find cmake."
- " Please specify the path to cmake with --cmake parameter.")
+ " Please specify the path to cmake with "
+ "--cmake parameter.")
if OPTION_QMAKE is None or not os.path.exists(OPTION_QMAKE):
raise DistutilsSetupError(
@@ -727,7 +760,7 @@ class pyside_build(_build):
# Prepare parameters
py_executable = sys.executable
- py_version = "%s.%s" % (sys.version_info[0], sys.version_info[1])
+ py_version = "{}.{}".format(sys.version_info[0], sys.version_info[1])
py_include_dir = get_config_var("INCLUDEPY")
py_libdir = get_config_var("LIBDIR")
py_prefix = get_config_var("prefix")
@@ -746,17 +779,20 @@ class pyside_build(_build):
if sys.platform == "win32":
py_include_dir = os.path.join(py_prefix, "include")
else:
- py_include_dir = os.path.join(py_prefix, "include/python%s" % py_version)
+ py_include_dir = os.path.join(py_prefix,
+ "include/python{}".format(py_version))
dbgPostfix = ""
if build_type == "Debug":
dbgPostfix = "_d"
if sys.platform == "win32":
if OPTION_MAKESPEC == "mingw":
- py_library = os.path.join(py_libdir, "libpython%s%s.a" % \
- (py_version.replace(".", ""), dbgPostfix))
+ static_lib_name = "libpython{}{}.a".format(
+ py_version.replace(".", ""), dbgPostfix)
+ py_library = os.path.join(py_libdir, static_lib_name)
else:
- py_library = os.path.join(py_libdir, "python%s%s.lib" % \
- (py_version.replace(".", ""), dbgPostfix))
+ python_lib_name = "python{}{}.lib".format(
+ py_version.replace(".", ""), dbgPostfix)
+ py_library = os.path.join(py_libdir, python_lib_name)
else:
lib_exts = ['.so']
if sys.platform == 'darwin':
@@ -768,52 +804,63 @@ class pyside_build(_build):
lib_exts.append('.so.1')
# Suffix for OpenSuSE 13.01
lib_exts.append('.so.1.0')
- lib_exts.append('.a') # static library as last gasp
+ # static library as last gasp
+ lib_exts.append('.a')
if sys.version_info[0] == 2 and dbgPostfix:
- # For Python2 add a duplicate set of extensions combined with
- # the dbgPostfix, so we test for both the debug version of
- # the lib and the normal one. This allows a debug PySide2 to
- # be built with a non-debug Python.
+ # For Python2 add a duplicate set of extensions
+ # combined with the dbgPostfix, so we test for both the
+ # debug version of the lib and the normal one.
+ # This allows a debug PySide2 to be built with a
+ # non-debug Python.
lib_exts = [dbgPostfix + e for e in lib_exts] + lib_exts
python_library_found = False
libs_tried = []
for lib_ext in lib_exts:
- lib_name = "libpython%s%s%s" % (py_version, lib_suff, lib_ext)
+ lib_name = "libpython{}{}{}".format(py_version, lib_suff,
+ lib_ext)
py_library = os.path.join(py_libdir, lib_name)
if os.path.exists(py_library):
python_library_found = True
break
libs_tried.append(py_library)
else:
- # At least on macOS 10.11, the system Python 2.6 does not include a symlink
- # to the framework file disguised as a .dylib file, thus finding the library would
- # fail. Manually check if a framework file "Python" exists in the Python framework
- # bundle.
+ # At least on macOS 10.11, the system Python 2.6 does
+ # not include a symlink to the framework file disguised
+ # as a .dylib file, thus finding the library would
+ # fail.
+ # Manually check if a framework file "Python" exists in
+ # the Python framework bundle.
if sys.platform == 'darwin' and sys.version_info[:2] == (2, 6):
# These manipulations essentially transform
# /System/Library/Frameworks/Python.framework/Versions/2.6/lib
- # to /System/Library/Frameworks/Python.framework/Versions/2.6/Python
- possible_framework_path = os.path.realpath(os.path.join(py_libdir, '..'))
- possible_framework_version = os.path.basename(possible_framework_path)
- possible_framework_library = os.path.join(possible_framework_path, 'Python')
-
- if possible_framework_version == '2.6' \
- and os.path.exists(possible_framework_library):
- py_library = possible_framework_library
- python_library_found = True
+ # to
+ # /System/Library/Frameworks/Python.framework/Versions/2.6/Python
+ possible_framework_path = os.path.realpath(
+ os.path.join(py_libdir, '..'))
+ possible_framework_version = os.path.basename(
+ possible_framework_path)
+ possible_framework_library = os.path.join(
+ possible_framework_path, 'Python')
+
+ if (possible_framework_version == '2.6' and
+ os.path.exists(possible_framework_library)):
+ py_library = possible_framework_library
+ python_library_found = True
else:
libs_tried.append(possible_framework_library)
- # Try to find shared libraries which have a multi arch suffix.
+ # Try to find shared libraries which have a multi arch
+ # suffix.
if not python_library_found:
py_multiarch = get_config_var("MULTIARCH")
if py_multiarch and not python_library_found:
try_py_libdir = os.path.join(py_libdir, py_multiarch)
libs_tried = []
for lib_ext in lib_exts:
- lib_name = "libpython%s%s%s" % (py_version, lib_suff, lib_ext)
+ lib_name = "libpython{}{}{}".format(
+ py_version, lib_suff, lib_ext)
py_library = os.path.join(try_py_libdir, lib_name)
if os.path.exists(py_library):
py_libdir = try_py_libdir
@@ -823,13 +870,13 @@ class pyside_build(_build):
if not python_library_found:
raise DistutilsSetupError(
- "Failed to locate the Python library with %s" %
- ', '.join(libs_tried))
+ "Failed to locate the Python library with {}".format(
+ ", ".join(libs_tried)))
if py_library.endswith('.a'):
# Python was compiled as a static library
- log.error("Failed to locate a dynamic Python library, using %s"
- % py_library)
+ log.error("Failed to locate a dynamic Python library, "
+ "using {}".format(py_library))
self.qtinfo = qtinfo
qt_dir = os.path.dirname(OPTION_QMAKE)
@@ -838,26 +885,32 @@ class pyside_build(_build):
# Update the PATH environment variable
additionalPaths = [py_scripts_dir, qt_dir]
- # Add Clang to path for Windows. Revisit once Clang is bundled with Qt.
- if sys.platform == "win32" and LooseVersion(self.qtinfo.version) >= LooseVersion("5.7.0"):
+ # Add Clang to path for Windows.
+ # Revisit once Clang is bundled with Qt.
+ if (sys.platform == "win32" and
+ LooseVersion(self.qtinfo.version) >= LooseVersion("5.7.0")):
clangDir = detectClang()
if clangDir[0]:
clangBinDir = os.path.join(clangDir[0], 'bin')
if not clangBinDir in os.environ.get('PATH'):
- log.info("Adding %s as detected by %s to PATH" % (clangBinDir, clangDir[1]))
+ log.info("Adding {} as detected by {} to PATH".format(
+ clangBinDir, clangDir[1]))
additionalPaths.append(clangBinDir)
else:
- log.error("Failed to detect Clang by checking LLVM_INSTALL_DIR, CLANG_INSTALL_DIR, llvm-config")
+ raise DistutilsSetupError("Failed to detect Clang when checking "
+ "LLVM_INSTALL_DIR, CLANG_INSTALL_DIR, llvm-config")
update_env_path(additionalPaths)
- build_name = "py%s-qt%s-%s-%s" % \
- (py_version, qt_version, platform.architecture()[0], build_type.lower())
+ build_name = "py{}-qt{}-{}-{}".format(py_version, qt_version,
+ platform.architecture()[0], build_type.lower())
script_dir = os.getcwd()
sources_dir = os.path.join(script_dir, "sources")
- build_dir = os.path.join(script_dir, prefix() + '_build', "%s" % build_name)
- install_dir = os.path.join(script_dir, prefix() + '_install', "%s" % build_name)
+ build_dir = os.path.join(script_dir, prefix() + "_build",
+ "{}".format(build_name))
+ install_dir = os.path.join(script_dir, prefix() + "_install",
+ "{}".format(build_name))
# Try to ensure that tools built by this script (such as shiboken2)
# are found before any that may already be installed on the system.
@@ -870,7 +923,8 @@ class pyside_build(_build):
self.make_generator = make_generator
self.debug = OPTION_DEBUG
self.script_dir = script_dir
- self.pyside_package_dir = os.path.join(self.script_dir, pyside_package_dir_name)
+ self.pyside_package_dir = os.path.join(self.script_dir,
+ pyside_package_dir_name)
self.sources_dir = sources_dir
self.build_dir = build_dir
self.install_dir = install_dir
@@ -886,68 +940,78 @@ class pyside_build(_build):
if OPTION_FINAL_INSTALL_PREFIX:
setuptools_install_prefix = OPTION_FINAL_INSTALL_PREFIX
- # Save the shiboken build dir path for clang deployment purposes.
+ # Save the shiboken build dir path for clang deployment
+ # purposes.
self.shiboken_build_dir = os.path.join(self.build_dir, "shiboken2")
log.info("=" * 30)
- log.info("Package version: %s" % get_package_version())
- log.info("Build type: %s" % self.build_type)
- log.info("Build tests: %s" % self.build_tests)
+ log.info("Package version: {}".format(get_package_version()))
+ log.info("Build type: {}".format(self.build_type))
+ log.info("Build tests: {}".format(self.build_tests))
log.info("-" * 3)
- log.info("Make path: %s" % self.make_path)
- log.info("Make generator: %s" % self.make_generator)
- log.info("Make jobs: %s" % OPTION_JOBS)
+ log.info("Make path: {}".format(self.make_path))
+ log.info("Make generator: {}".format(self.make_generator))
+ log.info("Make jobs: {}".format(OPTION_JOBS))
log.info("-" * 3)
- log.info("Script directory: %s" % self.script_dir)
- log.info("Sources directory: %s" % self.sources_dir)
+ log.info("Script directory: {}".format(self.script_dir))
+ log.info("Sources directory: {}".format(self.sources_dir))
log.info(dedent("""
- Building PySide2 will create and touch directories in the following order:
- make build directory (py*_build/*/*) ->
- make install directory (py*_install/*/*) ->
- {} directory (pyside_package/*) ->
- setuptools build directory (build/*/*) ->
- setuptools install directory (usually path-installed-python/lib/python*/site-packages/*)
+ Building PySide2 will create and touch directories
+ in the following order:
+ make build directory (py*_build/*/*) ->
+ make install directory (py*_install/*/*) ->
+ {} directory (pyside_package/*) ->
+ setuptools build directory (build/*/*) ->
+ setuptools install directory
+ (usually path-installed-python/lib/python*/site-packages/*)
""").format(pyside_package_dir_name))
- log.info("make build directory: %s" % self.build_dir)
- log.info("make install directory: %s" % self.install_dir)
- log.info("%s directory: %s" % (pyside_package_dir_name, self.pyside_package_dir))
- log.info("setuptools build directory: %s" % os.path.join(self.script_dir, "build"))
- log.info("setuptools install directory: %s" % setuptools_install_prefix)
- log.info("make-installed site-packages directory: %s \n"
- " (only relevant for copying files from 'make install directory' "
- "to '%s directory'" % (self.site_packages_dir, pyside_package_dir_name))
+ log.info("make build directory: {}".format(self.build_dir))
+ log.info("make install directory: {}".format(self.install_dir))
+ log.info("{} directory: {}".format(pyside_package_dir_name,
+ self.pyside_package_dir))
+ log.info("setuptools build directory: {}".format(
+ os.path.join(self.script_dir, "build")))
+ log.info("setuptools install directory: {}".format(
+ setuptools_install_prefix))
+ log.info("make-installed site-packages directory: {} \n"
+ " (only relevant for copying files from "
+ "'make install directory' to '{} directory'".format(
+ self.site_packages_dir, pyside_package_dir_name))
log.info("-" * 3)
- log.info("Python executable: %s" % self.py_executable)
- log.info("Python includes: %s" % self.py_include_dir)
- log.info("Python library: %s" % self.py_library)
- log.info("Python prefix: %s" % py_prefix)
- log.info("Python scripts: %s" % py_scripts_dir)
+ log.info("Python executable: {}".format(self.py_executable))
+ log.info("Python includes: {}".format(self.py_include_dir))
+ log.info("Python library: {}".format(self.py_library))
+ log.info("Python prefix: {}".format(py_prefix))
+ log.info("Python scripts: {}".format(py_scripts_dir))
log.info("-" * 3)
- log.info("Qt qmake: %s" % self.qtinfo.qmake_command)
- log.info("Qt version: %s" % self.qtinfo.version)
- log.info("Qt bins: %s" % self.qtinfo.bins_dir)
- log.info("Qt docs: %s" % self.qtinfo.docs_dir)
- log.info("Qt plugins: %s" % self.qtinfo.plugins_dir)
+ log.info("Qt qmake: {}".format(self.qtinfo.qmake_command))
+ log.info("Qt version: {}".format(self.qtinfo.version))
+ log.info("Qt bins: {}".format(self.qtinfo.bins_dir))
+ log.info("Qt docs: {}".format(self.qtinfo.docs_dir))
+ log.info("Qt plugins: {}".format(self.qtinfo.plugins_dir))
log.info("-" * 3)
if sys.platform == 'win32':
- log.info("OpenSSL dll directory: %s" % OPTION_OPENSSL)
+ log.info("OpenSSL dll directory: {}".format(OPTION_OPENSSL))
if sys.platform == 'darwin':
- pyside_macos_deployment_target = pyside_build.macos_pyside_min_deployment_target()
- log.info("MACOSX_DEPLOYMENT_TARGET set to: {}".format(pyside_macos_deployment_target))
+ pyside_macos_deployment_target = (
+ pyside_build.macos_pyside_min_deployment_target()
+ )
+ log.info("MACOSX_DEPLOYMENT_TARGET set to: {}".format(
+ pyside_macos_deployment_target))
log.info("=" * 30)
# Prepare folders
if not os.path.exists(self.sources_dir):
- log.info("Creating sources folder %s..." % self.sources_dir)
+ log.info("Creating sources folder {}...".format(self.sources_dir))
os.makedirs(self.sources_dir)
if not os.path.exists(self.build_dir):
- log.info("Creating build folder %s..." % self.build_dir)
+ log.info("Creating build folder {}...".format(self.build_dir))
os.makedirs(self.build_dir)
if not os.path.exists(self.install_dir):
- log.info("Creating install folder %s..." % self.install_dir)
+ log.info("Creating install folder {}...".format(self.install_dir))
os.makedirs(self.install_dir)
if not OPTION_ONLYPACKAGE:
@@ -956,8 +1020,8 @@ class pyside_build(_build):
self.build_extension(ext)
if OPTION_BUILDTESTS:
- # we record the latest successful build and note the build
- # directory for supporting the tests.
+ # we record the latest successful build and note the
+ # build directory for supporting the tests.
timestamp = time.strftime('%Y-%m-%d_%H%M%S')
build_history = os.path.join(script_dir, 'build_history')
unique_dir = os.path.join(build_history, timestamp)
@@ -965,7 +1029,7 @@ class pyside_build(_build):
fpath = os.path.join(unique_dir, 'build_dir.txt')
with open(fpath, 'w') as f:
print(build_dir, file=f)
- log.info("Created %s" % build_history)
+ log.info("Created {}".format(build_history))
if not OPTION_SKIP_PACKAGING:
# Build patchelf if needed
@@ -985,24 +1049,26 @@ class pyside_build(_build):
target = qtinfo.macos_min_deployment_target
if not target:
- raise DistutilsSetupError("Failed to query for Qt's QMAKE_MACOSX_DEPLOYMENT_TARGET.")
+ raise DistutilsSetupError("Failed to query for Qt's "
+ "QMAKE_MACOSX_DEPLOYMENT_TARGET.")
return target
@staticmethod
@memoize
def macos_pyside_min_deployment_target():
"""
- Compute and validate PySide2 MACOSX_DEPLOYMENT_TARGET value. Candidate sources that are
- considered:
+ Compute and validate PySide2 MACOSX_DEPLOYMENT_TARGET value.
+ Candidate sources that are considered:
- setup.py provided value
- - maximum value between minimum deployment target of the Python interpreter and the
- minimum deployment target of the Qt libraries.
+ - maximum value between minimum deployment target of the
+ Python interpreter and the minimum deployment target of
+ the Qt libraries.
If setup.py value is provided, that takes precedence.
Otherwise use the maximum of the above mentioned two values.
"""
python_target = get_config_var('MACOSX_DEPLOYMENT_TARGET') or None
qt_target = pyside_build.macos_qt_min_deployment_target()
- setup_target = OPTION_OSX_DEPLOYMENT_TARGET
+ setup_target = OPTION_MACOS_DEPLOYMENT_TARGET
qt_target_split = [int(x) for x in qt_target.split('.')]
if python_target:
@@ -1010,20 +1076,25 @@ class pyside_build(_build):
if setup_target:
setup_target_split = [int(x) for x in setup_target.split('.')]
- message = "Can't set MACOSX_DEPLOYMENT_TARGET value to {} because " \
- "{} was built with minimum deployment target set to {}."
- # setup.py provided OPTION_OSX_DEPLOYMENT_TARGET value takes precedence.
+ message = ("Can't set MACOSX_DEPLOYMENT_TARGET value to {} because "
+ "{} was built with minimum deployment target set to {}.")
+ # setup.py provided OPTION_MACOS_DEPLOYMENT_TARGET value takes
+ # precedence.
if setup_target:
if python_target and setup_target_split < python_target_split:
- raise DistutilsSetupError(message.format(setup_target, "Python", python_target))
+ raise DistutilsSetupError(message.format(setup_target,
+ "Python", python_target))
if setup_target_split < qt_target_split:
- raise DistutilsSetupError(message.format(setup_target, "Qt", qt_target))
+ raise DistutilsSetupError(message.format(setup_target,
+ "Qt", qt_target))
# All checks clear, use setup.py provided value.
return setup_target
- # Setup.py value not provided, use same value as provided by Qt.
+ # Setup.py value not provided,
+ # use same value as provided by Qt.
if python_target:
- maximum_target = '.'.join([str(e) for e in max(python_target_split, qt_target_split)])
+ maximum_target = '.'.join([str(e) for e in max(python_target_split,
+ qt_target_split)])
else:
maximum_target = qt_target
return maximum_target
@@ -1044,7 +1115,7 @@ class pyside_build(_build):
module_src_dir = os.path.join(self.sources_dir, "patchelf")
build_cmd = [
"g++",
- "%s/patchelf.cc" % (module_src_dir),
+ "{}/patchelf.cc".format(module_src_dir),
"-o",
"patchelf",
]
@@ -1054,29 +1125,34 @@ class pyside_build(_build):
def build_extension(self, extension):
# calculate the subrepos folder name
- log.info("Building module %s..." % extension)
+ log.info("Building module {}...".format(extension))
# Prepare folders
os.chdir(self.build_dir)
module_build_dir = os.path.join(self.build_dir, extension)
skipflag_file = module_build_dir + '-skip'
if os.path.exists(skipflag_file):
- log.info("Skipping %s because %s exists" % (extension, skipflag_file))
+ log.info("Skipping {} because {} exists".format(extension,
+ skipflag_file))
return
module_build_exists = os.path.exists(module_build_dir)
if module_build_exists:
if not OPTION_REUSE_BUILD:
- log.info("Deleting module build folder %s..." % module_build_dir)
+ log.info("Deleting module build folder {}...".format(
+ module_build_dir))
try:
rmtree(module_build_dir)
except Exception as e:
- print('***** problem removing "{}"'.format(module_build_dir))
+ print('***** problem removing "{}"'.format(
+ module_build_dir))
print('ignored error: {}'.format(e))
else:
- log.info("Reusing module build folder %s..." % module_build_dir)
+ log.info("Reusing module build folder {}...".format(
+ module_build_dir))
if not os.path.exists(module_build_dir):
- log.info("Creating module build folder %s..." % module_build_dir)
+ log.info("Creating module build folder {}...".format(
+ module_build_dir))
os.makedirs(module_build_dir)
os.chdir(module_build_dir)
@@ -1086,15 +1162,15 @@ class pyside_build(_build):
cmake_cmd = [
OPTION_CMAKE,
"-G", self.make_generator,
- "-DBUILD_TESTS=%s" % self.build_tests,
- "-DQt5Help_DIR=%s" % self.qtinfo.docs_dir,
- "-DCMAKE_BUILD_TYPE=%s" % self.build_type,
- "-DCMAKE_INSTALL_PREFIX=%s" % self.install_dir,
+ "-DBUILD_TESTS={}".format(self.build_tests),
+ "-DQt5Help_DIR={}".format(self.qtinfo.docs_dir),
+ "-DCMAKE_BUILD_TYPE={}".format(self.build_type),
+ "-DCMAKE_INSTALL_PREFIX={}".format(self.install_dir),
module_src_dir
]
- cmake_cmd.append("-DPYTHON_EXECUTABLE=%s" % self.py_executable)
- cmake_cmd.append("-DPYTHON_INCLUDE_DIR=%s" % self.py_include_dir)
- cmake_cmd.append("-DPYTHON_LIBRARY=%s" % self.py_library)
+ cmake_cmd.append("-DPYTHON_EXECUTABLE={}".format(self.py_executable))
+ cmake_cmd.append("-DPYTHON_INCLUDE_DIR={}".format(self.py_include_dir))
+ cmake_cmd.append("-DPYTHON_LIBRARY={}".format(self.py_library))
if OPTION_MODULE_SUBSET:
moduleSubSet = ''
for m in OPTION_MODULE_SUBSET.split(','):
@@ -1103,24 +1179,27 @@ class pyside_build(_build):
if moduleSubSet:
moduleSubSet += ';'
moduleSubSet += m
- cmake_cmd.append("-DMODULES=%s" % moduleSubSet)
+ cmake_cmd.append("-DMODULES={}".format(moduleSubSet))
# Add source location for generating documentation
cmake_src_dir = OPTION_QT_SRC if OPTION_QT_SRC else qtSrcDir
- cmake_cmd.append("-DQT_SRC_DIR=%s" % cmake_src_dir)
- log.info("Qt Source dir: %s" % cmake_src_dir)
+ cmake_cmd.append("-DQT_SRC_DIR={}".format(cmake_src_dir))
+ log.info("Qt Source dir: {}".format(cmake_src_dir))
if self.build_type.lower() == 'debug':
- cmake_cmd.append("-DPYTHON_DEBUG_LIBRARY=%s" % self.py_library)
+ cmake_cmd.append("-DPYTHON_DEBUG_LIBRARY={}".format(
+ self.py_library))
if OPTION_VERBOSE_BUILD:
cmake_cmd.append("-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON")
if OPTION_SANITIZE_ADDRESS:
# Some simple sanity checking. Only use at your own risk.
- if sys.platform.startswith('linux') or sys.platform.startswith('darwin'):
+ if (sys.platform.startswith('linux') or
+ sys.platform.startswith('darwin')):
cmake_cmd.append("-DSANITIZE_ADDRESS=ON")
else:
- raise DistutilsSetupError("Address sanitizer can only be used on Linux and macOS.")
+ raise DistutilsSetupError("Address sanitizer can only be used "
+ "on Linux and macOS.")
if extension.lower() == "pyside2":
pyside_qt_conf_prefix = ''
@@ -1131,18 +1210,23 @@ class pyside_build(_build):
pyside_qt_conf_prefix = '"Qt"'
if sys.platform == 'win32':
pyside_qt_conf_prefix = '"."'
- cmake_cmd.append("-DPYSIDE_QT_CONF_PREFIX=%s" % pyside_qt_conf_prefix)
+ cmake_cmd.append("-DPYSIDE_QT_CONF_PREFIX={}".format(
+ pyside_qt_conf_prefix))
- # Pass package version to CMake, so this string can be embedded into _config.py file.
+ # Pass package version to CMake, so this string can be
+ # embedded into _config.py file.
package_version = get_package_version()
- cmake_cmd.append("-DPYSIDE_SETUP_PY_PACKAGE_VERSION={0}".format(package_version))
+ cmake_cmd.append("-DPYSIDE_SETUP_PY_PACKAGE_VERSION={}".format(
+ package_version))
- # In case if this is a snapshot build, also pass the timestamp as a separate value,
- # because it the only version component that is actually generated by setup.py.
+ # In case if this is a snapshot build, also pass the
+ # timestamp as a separate value, because it the only
+ # version component that is actually generated by setup.py.
timestamp = ''
if OPTION_SNAPSHOT_BUILD:
timestamp = get_package_timestamp()
- cmake_cmd.append("-DPYSIDE_SETUP_PY_PACKAGE_TIMESTAMP={0}".format(timestamp))
+ cmake_cmd.append("-DPYSIDE_SETUP_PY_PACKAGE_TIMESTAMP={}".format(
+ timestamp))
if extension.lower() == "shiboken2":
cmake_cmd.append("-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=yes")
@@ -1150,68 +1234,86 @@ class pyside_build(_build):
cmake_cmd.append("-DUSE_PYTHON_VERSION=3.3")
if sys.platform == 'darwin':
- if OPTION_OSXARCH:
+ if OPTION_MACOS_ARCH:
# also tell cmake which architecture to use
- cmake_cmd.append("-DCMAKE_OSX_ARCHITECTURES:STRING={}".format(OPTION_OSXARCH))
-
- if OPTION_OSX_USE_LIBCPP:
- # Explicitly link the libc++ standard library (useful for osx deployment targets
- # lower than 10.9). This is not on by default, because most libraries and
- # executables on OSX <= 10.8 are linked to libstdc++, and mixing standard libraries
- # can lead to crashes.
- # On OSX >= 10.9 with a similar minimum deployment target, libc++ is linked in
- # implicitly, thus the option is a no-op in those cases.
+ cmake_cmd.append("-DCMAKE_OSX_ARCHITECTURES:STRING={}".format(
+ OPTION_MACOS_ARCH))
+
+ if OPTION_MACOS_USE_LIBCPP:
+ # Explicitly link the libc++ standard library (useful
+ # for macOS deployment targets lower than 10.9).
+ # This is not on by default, because most libraries and
+ # executables on macOS <= 10.8 are linked to libstdc++,
+ # and mixing standard libraries can lead to crashes.
+ # On macOS >= 10.9 with a similar minimum deployment
+ # target, libc++ is linked in implicitly, thus the
+ # option is a no-op in those cases.
cmake_cmd.append("-DOSX_USE_LIBCPP=ON")
- if OPTION_OSX_SYSROOT:
- cmake_cmd.append("-DCMAKE_OSX_SYSROOT={0}".format(OPTION_OSX_SYSROOT))
+ if OPTION_MACOS_SYSROOT:
+ cmake_cmd.append("-DCMAKE_OSX_SYSROOT={}".format(
+ OPTION_MACOS_SYSROOT))
else:
- latest_sdk_path = run_process_output(['xcrun', '--show-sdk-path'])
+ latest_sdk_path = run_process_output(['xcrun',
+ '--show-sdk-path'])
if latest_sdk_path:
latest_sdk_path = latest_sdk_path[0]
- cmake_cmd.append("-DCMAKE_OSX_SYSROOT={0}".format(latest_sdk_path))
+ cmake_cmd.append("-DCMAKE_OSX_SYSROOT={}".format(
+ latest_sdk_path))
# Set macOS minimum deployment target (version).
- # This is required so that calling run_process -> distutils.spawn() does not
- # set its own minimum deployment target environment variable which is
- # based on the python interpreter sysconfig value. Doing so could break the
- # detected clang include paths for example.
- deployment_target = pyside_build.macos_pyside_min_deployment_target()
- cmake_cmd.append("-DCMAKE_OSX_DEPLOYMENT_TARGET={0}".format(deployment_target))
+ # This is required so that calling
+ # run_process -> distutils.spawn()
+ # does not set its own minimum deployment target
+ # environment variable which is based on the python
+ # interpreter sysconfig value.
+ # Doing so could break the detected clang include paths
+ # for example.
+ deployment_target = \
+ pyside_build.macos_pyside_min_deployment_target()
+ cmake_cmd.append("-DCMAKE_OSX_DEPLOYMENT_TARGET={}".format(
+ deployment_target))
os.environ['MACOSX_DEPLOYMENT_TARGET'] = deployment_target
if not OPTION_SKIP_CMAKE:
- log.info("Configuring module %s (%s)..." % (extension, module_src_dir))
+ log.info("Configuring module {} ({})...".format(extension,
+ module_src_dir))
if run_process(cmake_cmd) != 0:
- raise DistutilsSetupError("Error configuring " + extension)
+ raise DistutilsSetupError("Error configuring {}".format(
+ extension))
else:
- log.info("Reusing old configuration for module %s (%s)..." % (extension,
- module_src_dir))
+ log.info("Reusing old configuration for module {} ({})...".format(
+ extension, module_src_dir))
- log.info("Compiling module %s..." % extension)
+ log.info("Compiling module {}...".format(extension))
cmd_make = [self.make_path]
if OPTION_JOBS:
cmd_make.append(OPTION_JOBS)
if run_process(cmd_make) != 0:
- raise DistutilsSetupError("Error compiling " + extension)
+ raise DistutilsSetupError("Error compiling {}".format(extension))
if extension.lower() == "shiboken2":
- log.info("Generating Shiboken documentation %s..." % extension)
+ log.info("Generating Shiboken documentation {}...".format(
+ extension))
if run_process([self.make_path, "doc"]) != 0:
- raise DistutilsSetupError("Error generating documentation " + extension)
+ raise DistutilsSetupError("Error generating documentation "
+ "{}".format(extension))
if not OPTION_SKIP_MAKE_INSTALL:
- log.info("Installing module %s..." % extension)
- # Need to wait a second, so installed file timestamps are older than build file
- # timestamps.
- # See https://gitlab.kitware.com/cmake/cmake/issues/16155 for issue details.
+ log.info("Installing module {}...".format(extension))
+ # Need to wait a second, so installed file timestamps are
+ # older than build file timestamps.
+ # See https://gitlab.kitware.com/cmake/cmake/issues/16155
+ # for issue details.
if sys.platform == 'darwin':
- log.info("Waiting 1 second, to ensure installation is successful...")
+ log.info("Waiting 1 second, to ensure installation is "
+ "successful...")
time.sleep(1)
if run_process([self.make_path, "install/fast"]) != 0:
- raise DistutilsSetupError("Error pseudo installing " + extension)
+ raise DistutilsSetupError("Error pseudo installing {}".format(
+ extension))
else:
- log.info("Skipped installing module %s" % extension)
+ log.info("Skipped installing module {}".format(extension))
os.chdir(self.script_dir)
@@ -1249,15 +1351,20 @@ class pyside_build(_build):
raise
def get_built_pyside_config(self, vars):
- # Get config that contains list of built modules, and SOVERSIONs of the built libraries.
+ # Get config that contains list of built modules, and
+ # SOVERSIONs of the built libraries.
pyside_package_dir = vars['pyside_package_dir']
config_path = os.path.join(pyside_package_dir, "PySide2", "_config.py")
config = get_python_dict(config_path)
return config
+ def is_webengine_built(self, built_modules):
+ return 'WebEngineWidgets' in built_modules or 'WebEngineCore' in built_modules
+
def prepare_packages_posix(self, vars):
executables = []
- # <build>/shiboken2/doc/html/* -> <setup>/PySide2/docs/shiboken2
+ # <build>/shiboken2/doc/html/* ->
+ # <setup>/PySide2/docs/shiboken2
copydir(
"{build_dir}/shiboken2/doc/html",
"{pyside_package_dir}/PySide2/docs/shiboken2",
@@ -1267,7 +1374,8 @@ class pyside_build(_build):
"{site_packages_dir}/PySide2",
"{pyside_package_dir}/PySide2",
vars=vars)
- # <install>/lib/site-packages/shiboken2.so -> <setup>/PySide2/shiboken2.so
+ # <install>/lib/site-packages/shiboken2.so ->
+ # <setup>/PySide2/shiboken2.so
shiboken_module_name = 'shiboken2.so'
shiboken_src_path = "{site_packages_dir}".format(**vars)
maybe_shiboken_names = [f for f in os.listdir(shiboken_src_path)
@@ -1279,7 +1387,8 @@ class pyside_build(_build):
"{site_packages_dir}/{shiboken_module_name}",
"{pyside_package_dir}/PySide2/{shiboken_module_name}",
vars=vars)
- # <install>/lib/site-packages/pyside2uic/* -> <setup>/pyside2uic
+ # <install>/lib/site-packages/pyside2uic/* ->
+ # <setup>/pyside2uic
copydir(
"{site_packages_dir}/pyside2uic",
"{pyside_package_dir}/pyside2uic",
@@ -1319,11 +1428,14 @@ class pyside_build(_build):
"{install_dir}/lib/",
"{pyside_package_dir}/PySide2",
filter=[
- adjusted_lib_name("libpyside*", config['pyside_library_soversion']),
- adjusted_lib_name("libshiboken*", config['shiboken_library_soversion']),
+ adjusted_lib_name("libpyside*",
+ config['pyside_library_soversion']),
+ adjusted_lib_name("libshiboken*",
+ config['shiboken_library_soversion']),
],
recursive=False, vars=vars, force_copy_symlinks=True)
- # <install>/share/PySide2/typesystems/* -> <setup>/PySide2/typesystems
+ # <install>/share/PySide2/typesystems/* ->
+ # <setup>/PySide2/typesystems
copydir(
"{install_dir}/share/PySide2/typesystems",
"{pyside_package_dir}/PySide2/typesystems",
@@ -1333,7 +1445,8 @@ class pyside_build(_build):
"{install_dir}/include",
"{pyside_package_dir}/PySide2/include",
vars=vars)
- # <source>/pyside2/PySide2/support/* -> <setup>/PySide2/support/*
+ # <source>/pyside2/PySide2/support/* ->
+ # <setup>/PySide2/support/*
copydir(
"{build_dir}/pyside2/PySide2/support",
"{pyside_package_dir}/PySide2/support",
@@ -1343,10 +1456,13 @@ class pyside_build(_build):
copydir(os.path.join(self.script_dir, "examples"),
"{pyside_package_dir}/PySide2/examples",
force=False, vars=vars)
- # Re-generate examples Qt resource files for Python 3 compatibility
+ # Re-generate examples Qt resource files for Python 3
+ # compatibility
if sys.version_info[0] == 3:
- examples_path = "{pyside_package_dir}/PySide2/examples".format(**vars)
- pyside_rcc_path = "{install_dir}/bin/pyside2-rcc".format(**vars)
+ examples_path = "{pyside_package_dir}/PySide2/examples".format(
+ **vars)
+ pyside_rcc_path = "{install_dir}/bin/pyside2-rcc".format(
+ **vars)
pyside_rcc_options = '-py3'
regenerate_qt_resources(examples_path, pyside_rcc_path,
pyside_rcc_options)
@@ -1354,7 +1470,7 @@ class pyside_build(_build):
if OPTION_STANDALONE:
vars['built_modules'] = config['built_modules']
if sys.platform == 'darwin':
- self.prepare_standalone_package_osx(executables, vars)
+ self.prepare_standalone_package_macos(executables, vars)
else:
self.prepare_standalone_package_linux(executables, vars)
@@ -1362,8 +1478,10 @@ class pyside_build(_build):
self.prepare_standalone_clang(is_win=False)
# Update rpath to $ORIGIN
- if sys.platform.startswith('linux') or sys.platform.startswith('darwin'):
- self.update_rpath("{pyside_package_dir}/PySide2".format(**vars), executables)
+ if (sys.platform.startswith('linux') or
+ sys.platform.startswith('darwin')):
+ self.update_rpath("{pyside_package_dir}/PySide2".format(**vars),
+ executables)
def qt_is_framework_build(self):
if os.path.isdir(self.qtinfo.headers_dir + "/../lib/QtCore.framework"):
@@ -1382,37 +1500,45 @@ class pyside_build(_build):
],
recursive=False, vars=vars, force_copy_symlinks=True)
- # Check if ICU libraries were copied over to the destination Qt libdir.
+ # Check if ICU libraries were copied over to the destination
+ # Qt libdir.
resolved_destination_lib_dir = destination_lib_dir.format(**vars)
- maybe_icu_libs = find_files_using_glob(resolved_destination_lib_dir, "libicu*")
-
- # If no ICU libraries are present in the Qt libdir (like when Qt is built against system
- # ICU, or in the Coin CI where ICU libs are in a different directory) try to
- # find out / resolve which ICU libs are used by QtCore (if used at all) using a custom
- # written ldd, and copy the ICU libs to the Pyside Qt dir if necessary. We choose the QtCore
- # lib to inspect, by checking which QtCore library the shiboken2 executable uses.
+ maybe_icu_libs = find_files_using_glob(resolved_destination_lib_dir,
+ "libicu*")
+
+ # If no ICU libraries are present in the Qt libdir (like when
+ # Qt is built against system ICU, or in the Coin CI where ICU
+ # libs are in a different directory) try to find out / resolve
+ # which ICU libs are used by QtCore (if used at all) using a
+ # custom written ldd, and copy the ICU libs to the Pyside Qt
+ # dir if necessary. We choose the QtCore lib to inspect, by
+ # checking which QtCore library the shiboken2 executable uses.
if not maybe_icu_libs:
copy_icu_libs(resolved_destination_lib_dir)
- if 'WebEngineWidgets' in built_modules:
- copydir("{qt_lib_execs_dir}", "{pyside_package_dir}/PySide2/Qt/libexec",
+ if self.is_webengine_built(built_modules):
+ copydir("{qt_lib_execs_dir}",
+ "{pyside_package_dir}/PySide2/Qt/libexec",
filter=None,
recursive=False,
vars=vars)
- copydir("{qt_prefix_dir}/resources", "{pyside_package_dir}/PySide2/Qt/resources",
+ copydir("{qt_prefix_dir}/resources",
+ "{pyside_package_dir}/PySide2/Qt/resources",
filter=None,
recursive=False,
vars=vars)
# <qt>/plugins/* -> <setup>/PySide2/Qt/plugins
- copydir("{qt_plugins_dir}", "{pyside_package_dir}/PySide2/Qt/plugins",
+ copydir("{qt_plugins_dir}",
+ "{pyside_package_dir}/PySide2/Qt/plugins",
filter=["*.so"],
recursive=True,
vars=vars)
# <qt>/qml/* -> <setup>/PySide2/Qt/qml
- copydir("{qt_qml_dir}", "{pyside_package_dir}/PySide2/Qt/qml",
+ copydir("{qt_qml_dir}",
+ "{pyside_package_dir}/PySide2/Qt/qml",
filter=None,
force=False,
recursive=True,
@@ -1420,12 +1546,19 @@ class pyside_build(_build):
# <qt>/translations/* -> <setup>/PySide2/Qt/translations
- copydir("{qt_translations_dir}", "{pyside_package_dir}/PySide2/Qt/translations",
+ copydir("{qt_translations_dir}",
+ "{pyside_package_dir}/PySide2/Qt/translations",
filter=["*.qm", "*.pak"],
force=False,
vars=vars)
- def prepare_standalone_package_osx(self, executables, vars):
+ # Copy the qt.conf file to libexec.
+ copyfile(
+ "{build_dir}/pyside2/PySide2/qt.conf",
+ "{pyside_package_dir}/PySide2/Qt/libexec",
+ vars=vars)
+
+ def prepare_standalone_package_macos(self, executables, vars):
built_modules = vars['built_modules']
# Directory filter for skipping unnecessary files.
@@ -1436,12 +1569,14 @@ class pyside_build(_build):
# <qt>/lib/* -> <setup>/PySide2/Qt/lib
if self.qt_is_framework_build():
- framework_built_modules = ['Qt' + name + '.framework' for name in built_modules]
+ framework_built_modules = [
+ 'Qt' + name + '.framework' for name in built_modules]
- def framework_dir_filter(dir_name, parent_full_path, dir_full_path):
+ def framework_dir_filter(dir_name, parent_full_path,
+ dir_full_path):
if '.framework' in dir_name:
- if dir_name.startswith('QtWebEngine') and \
- 'QtWebEngineWidgets.framework' not in framework_built_modules:
+ if dir_name.startswith('QtWebEngine') and not \
+ self.is_webengine_built(built_modules):
return False
if dir_name in ['Headers', 'fonts']:
return False
@@ -1451,57 +1586,80 @@ class pyside_build(_build):
return False
if dir_full_path.endswith('Versions/5/Helpers'):
return False
- return general_dir_filter(dir_name, parent_full_path, dir_full_path)
+ return general_dir_filter(dir_name, parent_full_path,
+ dir_full_path)
copydir("{qt_lib_dir}", "{pyside_package_dir}/PySide2/Qt/lib",
recursive=True, vars=vars,
ignore=["*.la", "*.a", "*.cmake", "*.pc", "*.prl"],
dir_filter_function=framework_dir_filter)
- # Fix rpath for WebEngine process executable. The already present rpath does not work
- # because it assumes a symlink from Versions/5/Helpers, thus adding two more levels of
+ # Fix rpath for WebEngine process executable. The already
+ # present rpath does not work because it assumes a symlink
+ # from Versions/5/Helpers, thus adding two more levels of
# directory hierarchy.
- if 'QtWebEngineWidgets.framework' in framework_built_modules:
- qt_lib_path = "{pyside_package_dir}/PySide2/Qt/lib".format(**vars)
- bundle = "QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app"
+ if self.is_webengine_built(built_modules):
+ qt_lib_path = "{pyside_package_dir}/PySide2/Qt/lib".format(
+ **vars)
+ bundle = "QtWebEngineCore.framework/Helpers/"
+ bundle += "QtWebEngineProcess.app"
binary = "Contents/MacOS/QtWebEngineProcess"
webengine_process_path = os.path.join(bundle, binary)
final_path = os.path.join(qt_lib_path, webengine_process_path)
rpath = "@loader_path/../../../../../"
- osx_fix_rpaths_for_library(final_path, rpath)
+ macos_fix_rpaths_for_library(final_path, rpath)
else:
ignored_modules = []
- if 'WebEngineWidgets' not in built_modules:
+ if not self.is_webengine_built(built_modules):
ignored_modules.extend(['libQt5WebEngine*.dylib'])
if 'WebKit' not in built_modules:
ignored_modules.extend(['libQt5WebKit*.dylib'])
accepted_modules = ['libQt5*.5.dylib']
- copydir("{qt_lib_dir}", "{pyside_package_dir}/PySide2/Qt/lib",
+ copydir("{qt_lib_dir}",
+ "{pyside_package_dir}/PySide2/Qt/lib",
filter=accepted_modules,
ignore=ignored_modules,
recursive=True, vars=vars, force_copy_symlinks=True)
- if 'WebEngineWidgets' in built_modules:
- copydir("{qt_lib_execs_dir}", "{pyside_package_dir}/PySide2/Qt/libexec",
+ if self.is_webengine_built(built_modules):
+ copydir("{qt_lib_execs_dir}",
+ "{pyside_package_dir}/PySide2/Qt/libexec",
filter=None,
recursive=False,
vars=vars)
- copydir("{qt_prefix_dir}/resources", "{pyside_package_dir}/PySide2/Qt/resources",
+ copydir("{qt_prefix_dir}/resources",
+ "{pyside_package_dir}/PySide2/Qt/resources",
filter=None,
recursive=False,
vars=vars)
+ # Fix rpath for WebEngine process executable.
+ pyside_package_dir = vars['pyside_package_dir']
+ qt_libexec_path = "{}/PySide2/Qt/libexec".format(pyside_package_dir)
+ binary = "QtWebEngineProcess"
+ final_path = os.path.join(qt_libexec_path, binary)
+ rpath = "@loader_path/../lib"
+ macos_fix_rpaths_for_library(final_path, rpath)
+
+ # Copy the qt.conf file to libexec.
+ copyfile(
+ "{build_dir}/pyside2/PySide2/qt.conf",
+ "{pyside_package_dir}/PySide2/Qt/libexec",
+ vars=vars)
+
# <qt>/plugins/* -> <setup>/PySide2/Qt/plugins
- copydir("{qt_plugins_dir}", "{pyside_package_dir}/PySide2/Qt/plugins",
+ copydir("{qt_plugins_dir}",
+ "{pyside_package_dir}/PySide2/Qt/plugins",
filter=["*.dylib"],
recursive=True,
dir_filter_function=general_dir_filter,
vars=vars)
# <qt>/qml/* -> <setup>/PySide2/Qt/qml
- copydir("{qt_qml_dir}", "{pyside_package_dir}/PySide2/Qt/qml",
+ copydir("{qt_qml_dir}",
+ "{pyside_package_dir}/PySide2/Qt/qml",
filter=None,
recursive=True,
force=False,
@@ -1509,7 +1667,8 @@ class pyside_build(_build):
vars=vars)
# <qt>/translations/* -> <setup>/PySide2/Qt/translations
- copydir("{qt_translations_dir}", "{pyside_package_dir}/PySide2/Qt/translations",
+ copydir("{qt_translations_dir}",
+ "{pyside_package_dir}/PySide2/Qt/translations",
filter=["*.qm", "*.pak"],
force=False,
vars=vars)
@@ -1534,13 +1693,15 @@ class pyside_build(_build):
filter=pdbs,
recursive=False, vars=vars)
- # <build>/shiboken2/doc/html/* -> <setup>/PySide2/docs/shiboken2
+ # <build>/shiboken2/doc/html/* ->
+ # <setup>/PySide2/docs/shiboken2
copydir(
"{build_dir}/shiboken2/doc/html",
"{pyside_package_dir}/PySide2/docs/shiboken2",
force=False, vars=vars)
- # <install>/lib/site-packages/shiboken2.pyd -> <setup>/PySide2/shiboken2.pyd
+ # <install>/lib/site-packages/shiboken2.pyd ->
+ # <setup>/PySide2/shiboken2.pyd
shiboken_module_name = 'shiboken2.pyd'
shiboken_src_path = "{site_packages_dir}".format(**vars)
maybe_shiboken_names = [f for f in os.listdir(shiboken_src_path)
@@ -1552,7 +1713,8 @@ class pyside_build(_build):
"{site_packages_dir}/{shiboken_module_name}",
"{pyside_package_dir}/PySide2/{shiboken_module_name}",
vars=vars)
- # @TODO: Fix this .pdb file not to overwrite release {shibokengenerator}.pdb file.
+ # @TODO: Fix this .pdb file not to overwrite release
+ # {shibokengenerator}.pdb file.
# Task-number: PYSIDE-615
copydir(
"{build_dir}/shiboken2/shibokenmodule",
@@ -1560,7 +1722,8 @@ class pyside_build(_build):
filter=pdbs,
recursive=False, vars=vars)
- # <install>/lib/site-packages/pyside2uic/* -> <setup>/pyside2uic
+ # <install>/lib/site-packages/pyside2uic/* ->
+ # <setup>/pyside2uic
copydir(
"{site_packages_dir}/pyside2uic",
"{pyside_package_dir}/pyside2uic",
@@ -1585,7 +1748,8 @@ class pyside_build(_build):
"{pyside_package_dir}/PySide2",
filter=["*.exe", "*.dll"],
recursive=False, vars=vars)
- # @TODO: Fix this .pdb file not to overwrite release {shibokenmodule}.pdb file.
+ # @TODO: Fix this .pdb file not to overwrite release
+ # {shibokenmodule}.pdb file.
# Task-number: PYSIDE-615
copydir(
"{build_dir}/shiboken2/generator",
@@ -1600,7 +1764,8 @@ class pyside_build(_build):
filter=["*.lib"],
recursive=False, vars=vars)
- # <install>/share/PySide2/typesystems/* -> <setup>/PySide2/typesystems
+ # <install>/share/PySide2/typesystems/* ->
+ # <setup>/PySide2/typesystems
copydir(
"{install_dir}/share/PySide2/typesystems",
"{pyside_package_dir}/PySide2/typesystems",
@@ -1612,7 +1777,8 @@ class pyside_build(_build):
"{pyside_package_dir}/PySide2/include",
vars=vars)
- # <source>/pyside2/PySide2/support/* -> <setup>/PySide2/support/*
+ # <source>/pyside2/PySide2/support/* ->
+ # <setup>/PySide2/support/*
copydir(
"{build_dir}/pyside2/PySide2/support",
"{pyside_package_dir}/PySide2/support",
@@ -1623,10 +1789,13 @@ class pyside_build(_build):
copydir(os.path.join(self.script_dir, "examples"),
"{pyside_package_dir}/PySide2/examples",
force=False, vars=vars)
- # Re-generate examples Qt resource files for Python 3 compatibility
+ # Re-generate examples Qt resource files for Python 3
+ # compatibility
if sys.version_info[0] == 3:
- examples_path = "{pyside_package_dir}/PySide2/examples".format(**vars)
- pyside_rcc_path = "{install_dir}/bin/pyside2-rcc".format(**vars)
+ examples_path = "{pyside_package_dir}/PySide2/examples".format(
+ **vars)
+ pyside_rcc_path = "{install_dir}/bin/pyside2-rcc".format(
+ **vars)
pyside_rcc_options = '-py3'
regenerate_qt_resources(examples_path, pyside_rcc_path,
pyside_rcc_options)
@@ -1664,21 +1833,26 @@ class pyside_build(_build):
release = [a.format('') for a in patterns]
debug = [a.format('d') for a in patterns]
- # If qt is not a debug_and_release build, that means there is only one set of shared
- # libraries, so we can just copy them.
+ # If qt is not a debug_and_release build, that means there
+ # is only one set of shared libraries, so we can just copy
+ # them.
if qtinfo.build_type != 'debug_and_release':
if filter_match(file_name, release):
return True
return False
- # In debug_and_release case, choosing which files to copy is more difficult. We want
- # to copy only the files that match the PySide2 build type. So if PySide2 is built in
- # debug mode, we want to copy only Qt debug libraries (ending with "d.dll"). Or vice
- # versa. The problem is that some libraries have "d" as the last character of the actual
- # library name (for example Qt5Gamepad.dll and Qt5Gamepadd.dll). So we can't just
- # match a pattern ending in "d". Instead we check if there exists a file with the same
- # name plus an additional "d" at the end, and using that information we can judge if
- # the currently processed file is a debug or release file.
+ # In debug_and_release case, choosing which files to copy
+ # is more difficult. We want to copy only the files that
+ # match the PySide2 build type. So if PySide2 is built in
+ # debug mode, we want to copy only Qt debug libraries
+ # (ending with "d.dll"). Or vice versa. The problem is that
+ # some libraries have "d" as the last character of the
+ # actual library name (for example Qt5Gamepad.dll and
+ # Qt5Gamepadd.dll). So we can't just match a pattern ending
+ # in "d". Instead we check if there exists a file with the
+ # same name plus an additional "d" at the end, and using
+ # that information we can judge if the currently processed
+ # file is a debug or release file.
# e.g. ["Qt5Cored", ".dll"]
file_split = os.path.splitext(file_name)
@@ -1695,13 +1869,16 @@ class pyside_build(_build):
filter = release
def predicate(path): return os.path.exists(path)
# e.g. "/home/work/qt/qtbase/bin/Qt5Coredd.dll"
- other_config_path = os.path.join(file_path_dir_name, maybe_debug_name + file_ext)
+ other_config_path = os.path.join(file_path_dir_name,
+ maybe_debug_name + file_ext)
- if filter_match(file_name, filter) and predicate(other_config_path):
+ if (filter_match(file_name, filter) and
+ predicate(other_config_path)):
return True
return False
- qt_dll_filter = functools.partial(qt_build_config_filter, qt_dll_patterns)
+ qt_dll_filter = functools.partial(qt_build_config_filter,
+ qt_dll_patterns)
copydir("{qt_bin_dir}", "{pyside_package_dir}/PySide2",
file_filter_function=qt_dll_filter,
recursive=False, vars=vars)
@@ -1711,13 +1888,15 @@ class pyside_build(_build):
pdb_pattern = "*{}.pdb"
if copy_pdbs:
plugin_dll_patterns += [pdb_pattern]
- plugin_dll_filter = functools.partial(qt_build_config_filter, plugin_dll_patterns)
+ plugin_dll_filter = functools.partial(qt_build_config_filter,
+ plugin_dll_patterns)
copydir("{qt_plugins_dir}", "{pyside_package_dir}/PySide2/plugins",
file_filter_function=plugin_dll_filter,
vars=vars)
# <qt>/translations/* -> <setup>/PySide2/translations
- copydir("{qt_translations_dir}", "{pyside_package_dir}/PySide2/translations",
+ copydir("{qt_translations_dir}",
+ "{pyside_package_dir}/PySide2/translations",
filter=["*.qm", "*.pak"],
force=False,
vars=vars)
@@ -1729,7 +1908,9 @@ class pyside_build(_build):
qml_ignore = [a.format('') for a in qml_ignore_patterns]
if copy_pdbs:
qml_dll_patterns += [pdb_pattern]
- qml_dll_filter = functools.partial(qt_build_config_filter, qml_dll_patterns)
+ qml_ignore = [a.format('') for a in qml_dll_patterns]
+ qml_dll_filter = functools.partial(qt_build_config_filter,
+ qml_dll_patterns)
copydir("{qt_qml_dir}", "{pyside_package_dir}/PySide2/qml",
ignore=qml_ignore,
force=False,
@@ -1741,17 +1922,26 @@ class pyside_build(_build):
recursive=True,
vars=vars)
- if 'WebEngineWidgets' in built_modules:
- copydir("{qt_prefix_dir}/resources", "{pyside_package_dir}/PySide2/resources",
+ if self.is_webengine_built(built_modules):
+ copydir("{qt_prefix_dir}/resources",
+ "{pyside_package_dir}/PySide2/resources",
filter=None,
recursive=False,
vars=vars)
- filter = 'QtWebEngineProcess{}.exe'.format('d' if self.debug else '')
- copydir("{qt_bin_dir}", "{pyside_package_dir}/PySide2",
+ filter = 'QtWebEngineProcess{}.exe'.format(
+ 'd' if self.debug else '')
+ copydir("{qt_bin_dir}",
+ "{pyside_package_dir}/PySide2",
filter=[filter],
recursive=False, vars=vars)
+ # Copy the qt.conf file to prefix dir.
+ copyfile(
+ "{build_dir}/pyside2/PySide2/qt.conf",
+ "{pyside_package_dir}/PySide2",
+ vars=vars)
+
self.prepare_standalone_clang(is_win=True)
# pdb files for libshiboken and libpyside
@@ -1767,7 +1957,10 @@ class pyside_build(_build):
recursive=False, vars=vars)
def prepare_standalone_clang(self, is_win = False):
- """ Copies the libclang library to the pyside package so that shiboken exceutable works. """
+ """
+ Copies the libclang library to the pyside package so that
+ shiboken executable works.
+ """
log.info('Finding path to the libclang shared library.')
cmake_cmd = [
OPTION_CMAKE,
@@ -1788,12 +1981,15 @@ class pyside_build(_build):
break
if not clang_lib_path:
- raise RuntimeError("Could not finding location of libclang library from CMake cache.")
+ raise RuntimeError("Could not finding location of libclang "
+ "library from CMake cache.")
if is_win:
- # clang_lib_path points to the static import library (lib/libclang.lib), whereas we want
- # to copy the shared library (bin/libclang.dll).
- clang_lib_path = re.sub(r'lib/libclang.lib$', 'bin/libclang.dll', clang_lib_path)
+ # clang_lib_path points to the static import library
+ # (lib/libclang.lib), whereas we want to copy the shared
+ # library (bin/libclang.dll).
+ clang_lib_path = re.sub(r'lib/libclang.lib$', 'bin/libclang.dll',
+ clang_lib_path)
# Path to directory containing clang.
clang_lib_dir = os.path.dirname(clang_lib_path)
@@ -1801,11 +1997,14 @@ class pyside_build(_build):
# The name of the clang file found by CMake.
basename = os.path.basename(clang_lib_path)
- # We want to copy the library and all the symlinks for now, thus the wildcard.
+ # We want to copy the library and all the symlinks for now,
+ # thus the wildcard.
clang_filter = basename + "*"
- # Destination is the package folder near the other extension modules.
- destination_dir = "{}/PySide2".format(os.path.join(self.script_dir, 'pyside_package'))
+ # Destination is the package folder near the other extension
+ # modules.
+ destination_dir = "{}/PySide2".format(os.path.join(self.script_dir,
+ 'pyside_package'))
if os.path.exists(clang_lib_path):
log.info('Copying libclang shared library to the pyside package.')
@@ -1814,22 +2013,25 @@ class pyside_build(_build):
recursive=False)
else:
raise RuntimeError("Error copying libclang library "
- "from {} to {}. ".format(clang_lib_path, destination_dir))
+ "from {} to {}. ".format(
+ clang_lib_path, destination_dir))
def update_rpath(self, package_path, executables):
if sys.platform.startswith('linux'):
- pyside_libs = [lib for lib in os.listdir(package_path) if filter_match(
- lib, ["*.so", "*.so.*"])]
+ pyside_libs = [lib for lib in os.listdir(
+ package_path) if filter_match(lib, ["*.so", "*.so.*"])]
patchelf_path = os.path.join(self.script_dir, "patchelf")
def rpath_cmd(srcpath):
final_rpath = ''
- # Command line rpath option takes precedence over automatically added one.
+ # Command line rpath option takes precedence over
+ # automatically added one.
if OPTION_RPATH_VALUES:
final_rpath = OPTION_RPATH_VALUES
else:
- # Add rpath values pointing to $ORIGIN and the installed qt lib directory.
+ # Add rpath values pointing to $ORIGIN and the
+ # installed qt lib directory.
local_rpath = '$ORIGIN/'
qt_lib_dir = self.qtinfo.libs_dir
if OPTION_STANDALONE:
@@ -1840,11 +2042,12 @@ class pyside_build(_build):
raise RuntimeError("Error patching rpath in " + srcpath)
elif sys.platform == 'darwin':
- pyside_libs = [lib for lib in os.listdir(package_path) if filter_match(
- lib, ["*.so", "*.dylib"])]
+ pyside_libs = [lib for lib in os.listdir(
+ package_path) if filter_match(lib, ["*.so", "*.dylib"])]
def rpath_cmd(srcpath):
final_rpath = ''
- # Command line rpath option takes precedence over automatically added one.
+ # Command line rpath option takes precedence over
+ # automatically added one.
if OPTION_RPATH_VALUES:
final_rpath = OPTION_RPATH_VALUES
else:
@@ -1852,7 +2055,7 @@ class pyside_build(_build):
final_rpath = "@loader_path/Qt/lib"
else:
final_rpath = self.qtinfo.libs_dir
- osx_fix_rpaths_for_library(srcpath, final_rpath)
+ macos_fix_rpaths_for_library(srcpath, final_rpath)
else:
raise RuntimeError('Not configured for platform ' +
@@ -1868,7 +2071,8 @@ class pyside_build(_build):
if not os.path.exists(srcpath):
continue
rpath_cmd(srcpath)
- print("Patched rpath to '$ORIGIN/' (Linux) or updated rpath (OS/X) in %s." % (srcpath))
+ print("Patched rpath to '$ORIGIN/' (Linux) or "
+ "updated rpath (OS/X) in {}.".format(srcpath))
try:
@@ -1895,7 +2099,8 @@ if wheel_module_exists:
setup(
name = "PySide2",
version = get_package_version(),
- description = ("Python bindings for the Qt cross-platform application and UI framework"),
+ description = ("Python bindings for the Qt cross-platform application and "
+ "UI framework"),
long_description = README + "\n\n" + CHANGES,
classifiers = [
'Development Status :: 5 - Production/Stable',
@@ -1935,7 +2140,7 @@ setup(
license = 'LGPL',
packages = ['PySide2', 'pyside2uic',
'pyside2uic.Compiler',
- 'pyside2uic.port_v%s' % (sys.version_info[0]) ],
+ 'pyside2uic.port_v{}'.format(sys.version_info[0]) ],
package_dir = {'': pyside_package_dir_name},
include_package_data = True,
zip_safe = False,
@@ -1945,10 +2150,10 @@ setup(
]
},
cmdclass = cmd_class_dict,
- # Add a bogus extension module (will never be built here since we are
- # overriding the build command to do it using cmake) so things like
- # bdist_egg will know that there are extension modules and will name the
- # dist with the full platform info.
+ # Add a bogus extension module (will never be built here since we
+ # are overriding the build command to do it using cmake) so things
+ # like bdist_egg will know that there are extension modules and
+ # will name the dist with the full platform info.
ext_modules = [Extension('QtCore', [])],
ext_package = 'PySide2',
)
diff --git a/sources/pyside2/CMakeLists.txt b/sources/pyside2/CMakeLists.txt
index 41c62c67a..3e56881df 100644
--- a/sources/pyside2/CMakeLists.txt
+++ b/sources/pyside2/CMakeLists.txt
@@ -330,7 +330,7 @@ if(APPLE)
endif()
# Collect all optional modules.
-set(ALL_OPTIONAL_MODULES Xml XmlPatterns Help Multimedia MultimediaWidgets OpenGL Qml Quick QuickWidgets Script ScriptTools TextToSpeech Charts Svg DataVisualization)
+set(ALL_OPTIONAL_MODULES Xml XmlPatterns Help Multimedia MultimediaWidgets OpenGL Positioning Location Qml Quick QuickWidgets Script ScriptTools Sensors TextToSpeech Charts Svg DataVisualization)
find_package(Qt5UiTools)
if(Qt5UiTools_FOUND)
list(APPEND ALL_OPTIONAL_MODULES UiTools)
@@ -340,7 +340,7 @@ endif()
if(WIN32)
list(APPEND ALL_OPTIONAL_MODULES AxContainer)
endif()
-list(APPEND ALL_OPTIONAL_MODULES WebChannel WebEngineWidgets WebKit WebKitWidgets WebSockets)
+list(APPEND ALL_OPTIONAL_MODULES WebChannel WebEngineCore WebEngineWidgets WebKit WebKitWidgets WebSockets)
if (Qt5Core_VERSION VERSION_GREATER 5.9.3) # Depending on fixes in Qt3D
list(APPEND ALL_OPTIONAL_MODULES 3DCore 3DRender 3DInput 3DLogic 3DAnimation 3DExtras)
endif()
diff --git a/sources/pyside2/PySide2/CMakeLists.txt b/sources/pyside2/PySide2/CMakeLists.txt
index 971d0a9ef..651bf2734 100644
--- a/sources/pyside2/PySide2/CMakeLists.txt
+++ b/sources/pyside2/PySide2/CMakeLists.txt
@@ -13,6 +13,25 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/_config.py.in"
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../pyside_version.py"
"${CMAKE_CURRENT_BINARY_DIR}/_git_pyside_version.py" @ONLY)
+# qt.conf needs to be placed next to QtWebEngineProcess so that the executable uses the correct
+# Prefix location leading to an existing icu data file. It is needed on Windows, Linux, and macOS
+# non-framework build. In framework build, instead of using qt.conf, Bundle querying is used.
+if (WIN32 OR (UNIX AND NOT APPLE) OR (APPLE AND NOT QtCore_is_framework))
+
+ if (WIN32)
+ # On Windows, the QtWebEngineProcess is directly located in the Prefix, due to not using
+ # a "Qt" subfolder like on the other platforms.
+ set(QT_CONF_PREFIX ".")
+ else()
+ # On Linux and non-framework macOS, the QtWebEngineProcess is in ./libexec, so prefix is one
+ # level higher.
+ set(QT_CONF_PREFIX "..")
+ endif()
+
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/qt.conf.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/qt.conf" @ONLY)
+endif()
+
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/support/__init__.py"
"${CMAKE_CURRENT_BINARY_DIR}/support/__init__.py" COPYONLY)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/support/signature/__init__.py"
diff --git a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
index 360cc3983..19975b1dc 100644
--- a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
+++ b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
@@ -69,7 +69,7 @@
<function signature="qIsNull(double)" />
<!-- Qt5: gone <function signature="qRound(qreal)" /> -->
<function signature="qTan(qreal)" since="4.6" />
- <function signature="qtTrId(const char *, int)" since="4.6" />
+ <function signature="qtTrId(const char*,int)" since="4.6" />
<function signature="qVersion()" />
<function signature="qrand()" />
<function signature="qsrand(uint)" />
@@ -895,7 +895,7 @@
<enum-type name="AlignmentFlag" flags="Alignment" />
<enum-type name="AnchorPoint" since="4.6" />
<enum-type name="ApplicationAttribute"/>
- <enum-type name="ApplicationState" flags="ApplicationStates" since="5.1"/>
+ <enum-type name="ApplicationState" flags="ApplicationStates" since="5.1"/>
<enum-type name="ArrowType"/>
<enum-type name="AspectRatioMode"/>
<enum-type name="Axis"/>
@@ -979,9 +979,9 @@
<enum-type name="CursorMoveStyle" since="4.8" revision="4800"/>
<!--### These functions are part of QtGui, not QtCore -->
- <modify-function signature="codecForHtml(const QByteArray &amp;)" remove="all"/>
- <modify-function signature="mightBeRichText(const QString &amp;)" remove="all"/>
- <modify-function signature="convertFromPlainText(const QString &amp;, Qt::WhiteSpaceMode)" remove="all"/>
+ <modify-function signature="codecForHtml(const QByteArray&amp;)" remove="all"/>
+ <modify-function signature="mightBeRichText(const QString&amp;)" remove="all"/>
+ <modify-function signature="convertFromPlainText(const QString&amp;,Qt::WhiteSpaceMode)" remove="all"/>
<!--### -->
</namespace-type>
@@ -1188,7 +1188,7 @@
</insert-template>
</inject-code>
</add-function>
- <modify-function signature="intersect(QLineF, QPointF*)const">
+ <modify-function signature="intersect(QLineF,QPointF*)const">
<modify-argument index="2">
<remove-argument />
</modify-argument>
@@ -1228,7 +1228,7 @@
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
</template>
- <modify-function signature="unregisterResource(const uchar*, const QString&amp;)" rename="unregisterResourceData">
+ <modify-function signature="unregisterResource(const uchar*,const QString&amp;)" rename="unregisterResourceData">
<modify-argument index="1">
<replace-type modified-type="PyBuffer"/>
</modify-argument>
@@ -1236,7 +1236,7 @@
<insert-template name="QResource_registerResource" />
</inject-code>
</modify-function>
- <modify-function signature="registerResource(const uchar*, const QString&amp;)" rename="registerResourceData">
+ <modify-function signature="registerResource(const uchar*,const QString&amp;)" rename="registerResourceData">
<modify-argument index="1">
<replace-type modified-type="PyBuffer"/>
</modify-argument>
@@ -1377,7 +1377,7 @@
<include file-name="datetime.h" location="global"/>
</extra-includes>
<!-- Somewhat internal constructor used to pickle QDateTime -->
- <add-function signature="QDateTime(int, int, int, int, int, int, int, int)">
+ <add-function signature="QDateTime(int,int,int,int,int,int,int,int)">
<modify-argument index="8">
<replace-default-expression with="Qt::LocalTime"/>
</modify-argument>
@@ -1387,7 +1387,7 @@
%0 = new %TYPE(date, time, Qt::TimeSpec(%8));
</inject-code>
</add-function>
- <add-function signature="QDateTime(int, int, int, int, int, int)">
+ <add-function signature="QDateTime(int,int,int,int,int,int)">
<inject-code class="target" position="beginning">
QDate date(%1, %2, %3);
QTime time(%4, %5, %6);
@@ -1777,7 +1777,7 @@
</modify-argument>
</modify-function>
</value-type>
-
+
<value-type name="QTimeZone">
<enum-type name="TimeType"/>
<enum-type name="NameType"/>
@@ -1823,19 +1823,19 @@
<enum-type name="CurrencySymbolFormat" since="4.8" revision="4800"/>
<enum-type name="QuotationStyle" since="4.8" revision="4800"/>
<!--### All those C++ number types have the same representation in Python -->
- <modify-function signature="toString(qulonglong) const" remove="all"/>
- <modify-function signature="toString(ushort) const" remove="all"/>
- <modify-function signature="toString(unsigned int) const" remove="all"/>
+ <modify-function signature="toString(qulonglong)const" remove="all"/>
+ <modify-function signature="toString(ushort)const" remove="all"/>
+ <modify-function signature="toString(unsigned int)const" remove="all"/>
<!--### -->
<extra-includes>
<include file-name="QDate" location="global"/>
</extra-includes>
- <modify-function signature="toTime(QString, QLocale::FormatType)const">
+ <modify-function signature="toTime(QString,QLocale::FormatType)const">
<modify-argument index="2">
<rename to="format" />
</modify-argument>
</modify-function>
- <modify-function signature="toDate(QString, QLocale::FormatType)const">
+ <modify-function signature="toDate(QString,QLocale::FormatType)const">
<modify-argument index="2">
<rename to="format" />
</modify-argument>
@@ -1992,7 +1992,7 @@
</modify-function>
<modify-function signature="relock()" allow-thread="yes" />
<add-function signature="__enter__()" />
- <add-function signature="__exit__(PyObject*, PyObject*, PyObject*)">
+ <add-function signature="__exit__(PyObject*,PyObject*,PyObject*)">
<inject-code>
%CPPSELF.unlock();
</inject-code>
@@ -2006,7 +2006,7 @@
</modify-function>
<modify-function signature="relock()" allow-thread="yes" />
<add-function signature="__enter__()" />
- <add-function signature="__exit__(PyObject*, PyObject*, PyObject*)">
+ <add-function signature="__exit__(PyObject*,PyObject*,PyObject*)">
<inject-code>
%CPPSELF.unlock();
</inject-code>
@@ -2035,14 +2035,14 @@
<enum-type name="CheckIndexOption" flags="CheckIndexOptions" class="yes" since="5.11"/>
<enum-type name="LayoutChangeHint" />
<!-- This function was replaced by a added function -->
- <modify-function signature="createIndex(int, int, void*) const" remove="all"/>
- <!-- This function is the same as createIndex(int, int, int) const -->
- <modify-function signature="createIndex(int, int, quintptr)const">
+ <modify-function signature="createIndex(int,int,void*)const" remove="all"/>
+ <!-- This function is the same as createIndex(int, int, int)const -->
+ <modify-function signature="createIndex(int,int,quintptr)const">
<modify-argument index="3">
<replace-default-expression with="0" />
</modify-argument>
</modify-function>
- <add-function signature="createIndex(int, int, PyObject*)const" return-type="QModelIndex">
+ <add-function signature="createIndex(int,int,PyObject*)const" return-type="QModelIndex">
<modify-argument index="1">
<rename to="row"/>
</modify-argument>
@@ -2067,13 +2067,13 @@
<inject-code class="target" position="end">
qRegisterMetaType&lt;QVector&lt;int&gt; &gt;("QVector&lt;int&gt;");
</inject-code>
- <modify-function signature="mimeData(QModelIndexList) const">
+ <modify-function signature="mimeData(QModelIndexList)const">
<modify-argument index="return">
<define-ownership class="native" owner="c++"/>
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
- <modify-function signature="data(const QModelIndex&amp;,int) const">
+ <modify-function signature="data(const QModelIndex&amp;,int)const">
<modify-argument index="return">
<define-ownership class="native" owner="c++"/>
</modify-argument>
@@ -2082,14 +2082,14 @@
<value-type name="QItemSelection">
<include file-name="QList" location="global"/>
</value-type>
-
+
<object-type name="QItemSelectionModel">
<extra-includes>
<include file-name="QItemSelection" location="global"/>
</extra-includes>
<enum-type name="SelectionFlag" flags="SelectionFlags"/>
</object-type>
-
+
<value-type name="QItemSelectionRange" hash-function="qHash">
</value-type>
<primitive-type name="QModelIndexList"/>
@@ -2099,7 +2099,7 @@
<include file-name="QStringList" location="global"/>
<include file-name="QSize" location="global"/>
</extra-includes>
- <modify-function signature="setSourceModel(QAbstractItemModel *)">
+ <modify-function signature="setSourceModel(QAbstractItemModel*)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
@@ -2114,7 +2114,7 @@
<include file-name="QStringList" location="global"/>
<include file-name="QSize" location="global"/>
</extra-includes>
- <modify-function signature="setSourceModel(QAbstractItemModel *)">
+ <modify-function signature="setSourceModel(QAbstractItemModel*)">
<modify-argument index="1">
<reference-count action="set"/>
</modify-argument>
@@ -2123,7 +2123,7 @@
<modify-function signature="clear()" remove="all"/>
<modify-function signature="filterChanged()" remove="all"/>
<!--### End of obsolete section -->
- </object-type>
+ </object-type>
<!-- QObject is created manually -->
<object-type name="QObject">
<extra-includes>
@@ -2131,7 +2131,7 @@
<include file-name="QCoreApplication" location="global"/>
<include file-name="signalmanager.h" location="local" />
</extra-includes>
- <modify-function signature="metaObject() const">
+ <modify-function signature="metaObject()const">
<inject-code class="target" position="beginning">
%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME();
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
@@ -2163,7 +2163,7 @@
<modify-argument index="1" invalidate-after-use="yes"/>
</modify-function>
<!-- End of Invalidate-after-use fix -->
- <modify-function signature="parent() const">
+ <modify-function signature="parent()const">
<modify-argument index="this">
<parent index="return" action="add"/>
</modify-argument>
@@ -2176,7 +2176,7 @@
<parent index="1" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="connect(const QObject*, const char*, const char *, Qt::ConnectionType) const">
+ <modify-function signature="connect(const QObject*,const char*,const char*,Qt::ConnectionType)const">
<modify-argument index="4">
<rename to="type"/>
</modify-argument>
@@ -2187,7 +2187,7 @@
</inject-code>
</modify-function>
<!-- static version -->
- <modify-function signature="connect(const QObject*, QMetaMethod, const QObject*, QMetaMethod, Qt::ConnectionType)">
+ <modify-function signature="connect(const QObject*,QMetaMethod,const QObject*,QMetaMethod,Qt::ConnectionType)">
<modify-argument index="5">
<rename to="type"/>
</modify-argument>
@@ -2197,7 +2197,7 @@
%PYARG_0 = %CONVERTTOPYTHON[bool](%0);
</inject-code>
</modify-function>
- <modify-function signature="connect(const QObject*, const char*, const QObject*, const char *, Qt::ConnectionType)">
+ <modify-function signature="connect(const QObject*,const char*,const QObject*,const char*,Qt::ConnectionType)">
<modify-argument index="5">
<rename to="type"/>
</modify-argument>
@@ -2208,7 +2208,7 @@
</inject-code>
</modify-function>
<inject-code class="native" position="beginning" file="glue/qobject_connect.cpp" />
- <add-function signature="connect(const QObject*, const char*, PyCallable*, Qt::ConnectionType)" return-type="bool" static="yes">
+ <add-function signature="connect(const QObject*,const char*,PyCallable*,Qt::ConnectionType)" return-type="bool" static="yes">
<modify-argument index="4">
<rename to="type"/>
<replace-default-expression with="Qt::AutoConnection" />
@@ -2220,7 +2220,7 @@
</inject-code>
</add-function>
<!-- static version -->
- <add-function signature="connect(const char*, PyCallable*, Qt::ConnectionType)" return-type="bool">
+ <add-function signature="connect(const char*,PyCallable*,Qt::ConnectionType)" return-type="bool">
<modify-argument index="3">
<rename to="type"/>
<replace-default-expression with="Qt::AutoConnection" />
@@ -2231,7 +2231,7 @@
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
</inject-code>
</add-function>
- <add-function signature="connect(const char*, const QObject*, const char *, Qt::ConnectionType)" return-type="bool">
+ <add-function signature="connect(const char*,const QObject*,const char*,Qt::ConnectionType)" return-type="bool">
<modify-argument index="4">
<rename to="type"/>
<replace-default-expression with="Qt::AutoConnection" />
@@ -2242,21 +2242,21 @@
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
</inject-code>
</add-function>
-
- <add-function signature="emit(const char*, ...)" return-type="bool">
+
+ <add-function signature="emit(const char*,...)" return-type="bool">
<inject-code class="target" position="beginning">
%RETURN_TYPE %0 = PySide::SignalManager::instance().emitSignal(%CPPSELF, %1, %PYARG_2);
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
</inject-code>
</add-function>
- <add-function signature="disconnect(const char *, PyCallable*)" return-type="bool">
+ <add-function signature="disconnect(const char*,PyCallable*)" return-type="bool">
<inject-code class="target" position="beginning">
// %FUNCTION_NAME() - disable generation of function call.
%RETURN_TYPE %0 = qobjectDisconnectCallback(%CPPSELF, %1, %2);
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
</inject-code>
</add-function>
- <add-function signature="disconnect(const QObject*, const char*, PyCallable*)" return-type="bool" static="yes">
+ <add-function signature="disconnect(const QObject*,const char*,PyCallable*)" return-type="bool" static="yes">
<inject-code class="target" position="beginning">
// %FUNCTION_NAME() - disable generation of function call.
%RETURN_TYPE %0 = qobjectDisconnectCallback(%1, %2, %3);
@@ -2266,7 +2266,7 @@
<inject-code class="native" file="glue/qobject_findchild.cpp"/>
- <add-function signature="findChild(PyTypeObject*, const QString&amp;)" return-type="PyObject*">
+ <add-function signature="findChild(PyTypeObject*,const QString&amp;)" return-type="PyObject*">
<inject-code class="target" position="beginning">
QObject *child = _findChildHelper(%CPPSELF, %2, (PyTypeObject*)%PYARG_1);
%PYARG_0 = %CONVERTTOPYTHON[QObject*](child);
@@ -2278,7 +2278,7 @@
<replace-default-expression with="QString()" />
</modify-argument>
</add-function>
- <add-function signature="findChildren(PyTypeObject*, const QString&amp;)" return-type="PySequence*" >
+ <add-function signature="findChildren(PyTypeObject*,const QString&amp;)" return-type="PySequence*" >
<inject-code class="target" position="beginning">
%PYARG_0 = PyList_New(0);
_findChildrenHelper(%CPPSELF, %2, (PyTypeObject*)%PYARG_1, %PYARG_0);
@@ -2290,7 +2290,7 @@
<replace-default-expression with="QString()" />
</modify-argument>
</add-function>
- <add-function signature="findChildren(PyTypeObject*, const QRegExp&amp;)" return-type="PySequence*" >
+ <add-function signature="findChildren(PyTypeObject*,const QRegExp&amp;)" return-type="PySequence*" >
<inject-code class="target" position="beginning">
%PYARG_0 = PyList_New(0);
_findChildrenHelper(%CPPSELF, %2, (PyTypeObject*)%PYARG_1, %PYARG_0);
@@ -2300,7 +2300,7 @@
</modify-argument>
</add-function>
- <add-function signature="tr(const char *, const char *, int)" return-type="QString">
+ <add-function signature="tr(const char*,const char*,int)" return-type="QString">
<modify-argument index="2">
<replace-default-expression with="0"/>
</modify-argument>
@@ -2326,7 +2326,7 @@
</inject-code>
</add-function>
- <modify-function signature="receivers(const char*) const">
+ <modify-function signature="receivers(const char*)const">
<inject-code class="target" position="beginning">
// Avoid return +1 because SignalManager connect to "destroyed()" signal to control object timelife
int ret = %CPPSELF.%FUNCTION_NAME(%1);
@@ -2343,14 +2343,14 @@
</modify-argument>
</modify-function>
- <modify-function signature="sender() const">
+ <modify-function signature="sender()const">
<modify-argument index="return">
<define-ownership owner="default"/>
</modify-argument>
</modify-function>
<!-- This is not supported due the lack of information durring the call with no arguments, this can cause a memory leak -->
- <modify-function signature="disconnect(const char*, const QObject *, const char *)const">
+ <modify-function signature="disconnect(const char*,const QObject*,const char*)const">
<modify-argument index="1">
<remove-default-expression />
</modify-argument>
@@ -2420,7 +2420,7 @@
</insert-template>
</inject-code>
</add-function>
- <add-function signature="replace(QString, QString)" return-type="QString">
+ <add-function signature="replace(QString,QString)" return-type="QString">
<modify-argument index="1">
<rename to="sourceString"/>
</modify-argument>
@@ -2532,7 +2532,7 @@
<modify-function signature="startsWith(const char*)const" remove="all" />
<modify-function signature="operator==(QString)const" remove="all" />
<modify-function signature="operator==(const char*,QByteArray)" remove="all" />
- <modify-function signature="operator==(QByteArray, const char*)" remove="all" />
+ <modify-function signature="operator==(QByteArray,const char*)" remove="all" />
<modify-function signature="operator>(QString)const" remove="all" />
<modify-function signature="operator>(const char*,QByteArray)" remove="all" />
<modify-function signature="operator>(QByteArray,const char*)" remove="all" />
@@ -2564,7 +2564,7 @@
}
</inject-code>
</add-function>
- <add-function signature="operator+(PyUnicode, QByteArray)">
+ <add-function signature="operator+(PyUnicode,QByteArray)">
<inject-code>
Shiboken::AutoDecRef str(PyUnicode_AsASCIIString(%PYARG_1));
if (!str.isNull()) {
@@ -2574,7 +2574,7 @@
}
</inject-code>
</add-function>
- <add-function signature="operator+(PyBytes, QByteArray)">
+ <add-function signature="operator+(PyBytes,QByteArray)">
<inject-code>
QByteArray ba = QByteArray(PyBytes_AS_STRING(%PYARG_1), PyBytes_GET_SIZE(%PYARG_1)) + *%CPPSELF;
%PYARG_0 = %CONVERTTOPYTHON[QByteArray](ba);
@@ -2606,7 +2606,7 @@
</insert-template>
</inject-code>
</add-function>
- <modify-function signature="QByteArray(const char *, int)">
+ <modify-function signature="QByteArray(const char*,int)">
<!-- Keep \x00 bytes passed in python strings -->
<inject-code class="target" position="beginning">
if (PyBytes_Check(%PYARG_1)) {
@@ -2666,8 +2666,8 @@
<!--### -->
- <modify-function signature="operator const char *()const" remove="all"/>
- <modify-function signature="operator const void *()const" remove="all"/>
+ <modify-function signature="operator const char*()const" remove="all"/>
+ <modify-function signature="operator const void*()const" remove="all"/>
<!--### STL compatibility functions not supported by PySide -->
<modify-function signature="push_back(char)" remove="all"/>
@@ -2678,7 +2678,7 @@
<modify-function signature="push_front(const char*)" remove="all"/>
<!--### -->
- <modify-function signature="toLong(bool*, int) const">
+ <modify-function signature="toLong(bool*,int)const">
<modify-argument index="1">
<remove-argument/>
</modify-argument>
@@ -2686,7 +2686,7 @@
<insert-template name="fix_bool*,arg"/>
</inject-code>
</modify-function>
- <modify-function signature="toLongLong(bool*, int) const">
+ <modify-function signature="toLongLong(bool*,int)const">
<modify-argument index="1">
<remove-argument/>
</modify-argument>
@@ -2694,7 +2694,7 @@
<insert-template name="fix_bool*,arg"/>
</inject-code>
</modify-function>
- <modify-function signature="toShort(bool*, int) const">
+ <modify-function signature="toShort(bool*,int)const">
<modify-argument index="1">
<remove-argument/>
</modify-argument>
@@ -2702,7 +2702,7 @@
<insert-template name="fix_bool*,arg"/>
</inject-code>
</modify-function>
- <modify-function signature="toUInt(bool*, int) const">
+ <modify-function signature="toUInt(bool*,int)const">
<modify-argument index="1">
<remove-argument/>
</modify-argument>
@@ -2710,7 +2710,7 @@
<insert-template name="fix_bool*,arg"/>
</inject-code>
</modify-function>
- <modify-function signature="toULong(bool*, int) const">
+ <modify-function signature="toULong(bool*,int)const">
<modify-argument index="1">
<remove-argument/>
</modify-argument>
@@ -2718,7 +2718,7 @@
<insert-template name="fix_bool*,arg"/>
</inject-code>
</modify-function>
- <modify-function signature="toULongLong(bool*, int) const">
+ <modify-function signature="toULongLong(bool*,int)const">
<modify-argument index="1">
<remove-argument/>
</modify-argument>
@@ -2831,7 +2831,7 @@
<enum-type name="ProcessEventsFlag" flags="ProcessEventsFlags"/>
<modify-function signature="exec(QFlags&lt;QEventLoop::ProcessEventsFlag>)" rename="exec_" allow-thread="yes" />
<modify-function signature="processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag>)" allow-thread="yes" />
- <modify-function signature="processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag>, int)" allow-thread="yes" />
+ <modify-function signature="processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag>,int)" allow-thread="yes" />
</object-type>
<object-type name="QFileDevice" since="5.0">
<enum-type name="FileError"/>
@@ -2864,13 +2864,13 @@
</object-type>
<object-type name="QFile">
<modify-function signature="copy(const QString&amp;)" allow-thread="yes"/>
- <modify-function signature="copy(const QString&amp;, const QString&amp;)" allow-thread="yes"/>
+ <modify-function signature="copy(const QString&amp;,const QString&amp;)" allow-thread="yes"/>
<modify-function signature="link(const QString&amp;)" allow-thread="yes"/>
- <modify-function signature="link(const QString&amp;, const QString&amp;)" allow-thread="yes"/>
+ <modify-function signature="link(const QString&amp;,const QString&amp;)" allow-thread="yes"/>
<modify-function signature="remove()" allow-thread="yes"/>
<modify-function signature="remove(const QString&amp;)" allow-thread="yes"/>
<modify-function signature="rename(const QString&amp;)" allow-thread="yes"/>
- <modify-function signature="rename(const QString&amp;, const QString&amp;)" allow-thread="yes"/>
+ <modify-function signature="rename(const QString&amp;,const QString&amp;)" allow-thread="yes"/>
</object-type>
<object-type name="QSaveFile"/>
<object-type name="QFileSelector" />
@@ -2886,13 +2886,13 @@
<modify-function signature="waitForReadyRead(int)" allow-thread="yes"/>
<modify-function signature="waitForBytesWritten(int)" allow-thread="yes"/>
<!-- ### peek(qint64) do the job -->
- <modify-function signature="peek(char*, qint64)" remove="all"/>
+ <modify-function signature="peek(char*,qint64)" remove="all"/>
<!-- ### read(qint64) do the job -->
- <modify-function signature="read(char*, qint64)" remove="all"/>
+ <modify-function signature="read(char*,qint64)" remove="all"/>
<!-- ### readLine(qint64) do the job -->
- <modify-function signature="readLine(char*, qint64)" remove="all"/>
+ <modify-function signature="readLine(char*,qint64)" remove="all"/>
<!-- ### write(str) do the job -->
- <modify-function signature="write(const char*, qint64)" remove="all"/>
+ <modify-function signature="write(const char*,qint64)" remove="all"/>
<modify-function signature="write(const char*)" remove="all"/>
<modify-function signature="getChar(char*)">
<modify-argument index="1">
@@ -2903,7 +2903,7 @@
<insert-template name="fix_char*" />
</inject-code>
</modify-function>
- <modify-function signature="readData(char*, qint64)">
+ <modify-function signature="readData(char*,qint64)">
<inject-code class="target">
QByteArray ba;
ba.resize(%2);
@@ -2927,7 +2927,7 @@
</conversion-rule>
</modify-argument>
</modify-function>
- <modify-function signature="readLineData(char*, qint64)">
+ <modify-function signature="readLineData(char*,qint64)">
<inject-code class="target">
QByteArray ba;
ba.resize(%2);
@@ -2973,13 +2973,13 @@
</modify-argument>
</modify-function>
<modify-function signature="relock()" allow-thread="yes"/>
- <modify-function signature="mutex() const">
+ <modify-function signature="mutex()const">
<modify-argument index="return">
<reference-count action="set"/>
</modify-argument>
</modify-function>
<add-function signature="__enter__()" />
- <add-function signature="__exit__(PyObject*, PyObject*, PyObject*)">
+ <add-function signature="__exit__(PyObject*,PyObject*,PyObject*)">
<inject-code>
%CPPSELF.unlock();
</inject-code>
@@ -3006,13 +3006,13 @@
</object-type>
<object-type name="QSemaphore">
<modify-function signature="acquire(int)" allow-thread="yes"/>
- <modify-function signature="tryAcquire(int, int)" allow-thread="yes"/>
+ <modify-function signature="tryAcquire(int,int)" allow-thread="yes"/>
</object-type>
<object-type name="QSemaphoreReleaser" since="5.10"/>
<object-type name="QSocketNotifier">
<enum-type name="Type"/>
- <add-function signature="QSocketNotifier(PyObject*, QSocketNotifier::Type, QObject*)">
+ <add-function signature="QSocketNotifier(PyObject*,QSocketNotifier::Type,QObject*)">
<modify-argument index="3">
<replace-default-expression with="0" />
<rename to="parent" />
@@ -3087,7 +3087,7 @@
<enum-type name="State"/>
</object-type>
<object-type name="QTranslator">
- <modify-function signature="load(const uchar*, int, QString)">
+ <modify-function signature="load(const uchar*,int,QString)">
<modify-argument index="1">
<replace-type modified-type="PyBuffer" />
</modify-argument>
@@ -3103,8 +3103,8 @@
</modify-function>
</object-type>
<object-type name="QWaitCondition">
- <modify-function signature="wait(QMutex*, unsigned long)" allow-thread="yes"/>
- <modify-function signature="wait(QReadWriteLock*, unsigned long)" allow-thread="yes"/>
+ <modify-function signature="wait(QMutex*,unsigned long)" allow-thread="yes"/>
+ <modify-function signature="wait(QReadWriteLock*,unsigned long)" allow-thread="yes"/>
</object-type>
<object-type name="QFileSystemWatcher">
<extra-includes>
@@ -3143,7 +3143,7 @@
timer->start(%1);
</inject-code>
</modify-function>
- <add-function signature="singleShot(int, PyCallable*)" static="yes">
+ <add-function signature="singleShot(int,PyCallable*)" static="yes">
<inject-code class="target" position="beginning">
// %FUNCTION_NAME() - disable generation of c++ function call
Shiboken::AutoDecRef emptyTuple(PyTuple_New(0));
@@ -3154,7 +3154,7 @@
if (PyObject_TypeCheck(%2, &amp;PySideSignalInstanceType)) {
PySideSignalInstance *signalInstance = reinterpret_cast&lt;PySideSignalInstance*&gt;(%2);
- Shiboken::AutoDecRef signalSignature(Shiboken::String::fromFormat("2%s", PySide::Signal::getSignature(signalInstance)));
+ Shiboken::AutoDecRef signalSignature(Shiboken::String::fromFormat("2%s",PySide::Signal::getSignature(signalInstance)));
Shiboken::AutoDecRef result(
PyObject_CallMethod(pyTimer,
const_cast&lt;char*&gt;("connect"),
@@ -3195,7 +3195,7 @@
<modify-function signature="waitForFinished(int)" allow-thread="yes"/>
<modify-function signature="readAllStandardOutput()" allow-thread="yes"/>
<modify-function signature="readAllStandardError()" allow-thread="yes"/>
- <modify-function signature="execute(QString, QStringList)" allow-thread="yes"/>
+ <modify-function signature="execute(QString,QStringList)" allow-thread="yes"/>
<modify-function signature="execute(QString)" allow-thread="yes"/>
<modify-function signature="startDetached(QString,QStringList,QString,qint64*)">
<modify-argument index="4">
@@ -3213,7 +3213,7 @@
</inject-code>
</modify-function>
<!-- Function removed because on windows it returns a win32 specific structure -->
- <modify-function signature="pid() const" remove="all" />
+ <modify-function signature="pid()const" remove="all" />
<add-function signature="pid()" return-type="long">
<inject-code>
long result;
@@ -3269,11 +3269,11 @@
</inject-code>
</add-function>
<!-- blocking functions -->
- <modify-function signature="processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;, int)" allow-thread="yes"/>
+ <modify-function signature="processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;,int)" allow-thread="yes"/>
<modify-function signature="processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;)" allow-thread="yes"/>
<modify-function signature="flush()" allow-thread="yes"/>
- <modify-function signature="sendEvent(QObject*, QEvent*)" allow-thread="yes"/>
- <modify-function signature="sendPostedEvents(QObject*, int)" allow-thread="yes"/>
+ <modify-function signature="sendEvent(QObject*,QEvent*)" allow-thread="yes"/>
+ <modify-function signature="sendPostedEvents(QObject*,int)" allow-thread="yes"/>
<modify-function signature="instance()">
<inject-code class="target">
QCoreApplication *app = QCoreApplication::instance();
@@ -3297,14 +3297,14 @@
<modify-function signature="notify(QObject*,QEvent*)" allow-thread="yes">
<modify-argument index="2" invalidate-after-use="yes"/>
</modify-function>
- <modify-function signature="QCoreApplication(int &amp;, char **, int)" access="private"/>
+ <modify-function signature="QCoreApplication(int &amp;,char **,int)" access="private"/>
<inject-code class="native" file="glue/qcoreapplication_init.cpp" position="beginning" />
- <modify-function signature="postEvent(QObject*,QEvent*, int)">
+ <modify-function signature="postEvent(QObject*,QEvent*,int)">
<modify-argument index="2">
<define-ownership owner="c++"/>
</modify-argument>
</modify-function>
- <modify-function signature="winEventFilter(MSG*, long*)">
+ <modify-function signature="winEventFilter(MSG*,long*)">
<modify-argument index="2">
<remove-argument />
<conversion-rule class="native">
@@ -3346,7 +3346,7 @@
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
- <modify-function signature="value(const QString&amp;, const QVariant&amp;)const">
+ <modify-function signature="value(const QString&amp;,const QVariant&amp;)const">
<inject-documentation mode="append" format="target">
.. warning:: QSettings.value can return different types (QVariant types) depending on the platform it's running on, so the safest way to use it is always casting the result to the desired type, e.g.: int(settings.value("myKey"))
</inject-documentation>
@@ -3357,7 +3357,7 @@
</object-type>
<object-type name="QChildEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::ChildAdded || %1-&gt;type() == QEvent::ChildPolished || %1-&gt;type() == QEvent::ChildRemoved">
<modify-field name="c" read="false" write="false"/>
- <modify-function signature="child() const">
+ <modify-function signature="child()const">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
@@ -3632,7 +3632,7 @@
<!-- Qt5.5: Removed because it expect QString to be mutable -->
<modify-function signature="readLineInto(QString*,qint64)" since="5.5" remove="all"/>
<!-- Removed because we use the non-const version -->
- <modify-function signature="QTextStream(const QByteArray&amp;, QFlags&lt;QIODevice::OpenModeFlag&gt;)" remove="all"/>
+ <modify-function signature="QTextStream(const QByteArray&amp;,QFlags&lt;QIODevice::OpenModeFlag&gt;)" remove="all"/>
<!-- Removed because it expect QString to be mutable -->
<modify-function signature="setString(QString*,QFlags&lt;QIODevice::OpenModeFlag&gt;)" remove="all"/>
@@ -3689,7 +3689,7 @@
</object-type>
<object-type name="QThreadPool">
- <modify-function signature="start(QRunnable*, int)">
+ <modify-function signature="start(QRunnable*,int)">
<modify-argument index="1">
<parent index="this" action="add" />
</modify-argument>
@@ -3712,7 +3712,7 @@
<modify-function signature="pop_back()" remove="all"/>
<modify-function signature="push_front(QXmlStreamAttribute)" remove="all"/>
<modify-function signature="pop_front()" remove="all"/>
- <modify-function signature="toList() const" remove="all"/>
+ <modify-function signature="toList()const" remove="all"/>
<modify-function signature="fromList(const QList&lt;QXmlStreamAttribute&gt; &amp;)" remove="all"/>
<modify-function signature="operator+=(QVector&lt;QXmlStreamAttribute&gt;)" remove="all" />
</value-type>
@@ -3726,7 +3726,7 @@
</object-type>
<object-type name="QXmlStreamWriter">
<!-- Removed because it expect QString to be mutable -->
- <modify-function signature="QXmlStreamWriter(QString *)" remove="all" />
+ <modify-function signature="QXmlStreamWriter(QString*)" remove="all" />
<modify-function signature="codec()const">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
@@ -3757,19 +3757,19 @@
<object-type name="QMessageLogContext">
<modify-function signature="copy(const QMessageLogContext &amp;)" remove="all" />
</object-type>
-
+
<value-type name="QMetaMethod">
<enum-type name="Access"/>
<enum-type name="MethodType"/>
<!-- This isn't part of Qt public API -->
<modify-function signature="attributes()const" remove="all" />
- <modify-function signature="getParameterTypes(int *) const" remove="all" />
+ <modify-function signature="getParameterTypes(int*)const" remove="all" />
</value-type>
<object-type name="QMetaObject">
<enum-type name="Call"/>
<include file-name="qobjectdefs.h" location="global" />
<!-- This isn't part of Qt public API -->
- <modify-function signature="connect(const QObject*, int, const QObject*, int, int, int*)" remove="all" />
+ <modify-function signature="connect(const QObject*,int,const QObject*,int,int,int*)" remove="all" />
</object-type>
<object-type name="QMetaObject::Connection">
<include file-name="qobjectdefs.h" location="global" />
@@ -3784,7 +3784,7 @@
</value-type>
<value-type name="QMetaEnum">
- <modify-function signature="keyToValue(const char*, bool*) const" allow-thread="yes">
+ <modify-function signature="keyToValue(const char*,bool*)const" allow-thread="yes">
<modify-argument index="2">
<remove-argument />
</modify-argument>
@@ -3795,7 +3795,7 @@
<insert-template name="fix_args,bool*"/>
</inject-code>
</modify-function>
- <modify-function signature="keysToValue(const char*, bool*) const" allow-thread="yes">
+ <modify-function signature="keysToValue(const char*,bool*)const" allow-thread="yes">
<modify-argument index="2">
<remove-argument />
</modify-argument>
@@ -3821,7 +3821,7 @@
</object-type>
<object-type name="QAbstractState" since="4.6">
- <modify-function signature="machine() const">
+ <modify-function signature="machine()const">
<modify-argument index="this">
<parent index="return" action="add"/>
</modify-argument>
@@ -3855,13 +3855,13 @@
</modify-argument>
</modify-function>
- <modify-function signature="targetState() const">
+ <modify-function signature="targetState()const">
<modify-argument index="return">
<reference-count action="set" variable-name="setTargetState(QAbstractState*)1" />
</modify-argument>
</modify-function>
- <modify-function signature="targetStates() const">
+ <modify-function signature="targetStates()const">
<modify-argument index="return">
<reference-count action="set" variable-name="setTargetState(QAbstractState*)1" />
</modify-argument>
@@ -3882,7 +3882,7 @@
</modify-argument>
</modify-function>
- <modify-function signature="insertAnimation(int, QAbstractAnimation*)">
+ <modify-function signature="insertAnimation(int,QAbstractAnimation*)">
<modify-argument index="2">
<parent index="this" action="add"/>
</modify-argument>
@@ -3973,7 +3973,7 @@
</modify-argument>
</modify-function>
- <modify-function signature="QEventTransition(QObject*, QEvent::Type, QState*)">
+ <modify-function signature="QEventTransition(QObject*,QEvent::Type,QState*)">
<modify-argument index="3">
<parent index="this" action="add"/>
</modify-argument>
@@ -4022,7 +4022,7 @@ s1.addTransition(button.clicked, s1h)&lt;/code>
<object-type name="QSequentialAnimationGroup" since="4.6"/>
<object-type name="QSignalTransition" since="4.6">
- <add-function signature="QSignalTransition(PyObject*, QState*)" return-type="QSignalTransition*">
+ <add-function signature="QSignalTransition(PyObject*,QState*)" return-type="QSignalTransition*">
<modify-argument index="2">
<replace-default-expression with="0" />
</modify-argument>
@@ -4032,9 +4032,9 @@ s1.addTransition(button.clicked, s1h)&lt;/code>
Shiboken::AutoDecRef obType(PyObject_Type(dataSource));
QObject* sender = %CONVERTTOCPP[QObject*](dataSource);
if (sender) {
- const char *dataSignature = PySide::Signal::getSignature((PySideSignalInstance*)%PYARG_1);
+ const char*dataSignature = PySide::Signal::getSignature((PySideSignalInstance*)%PYARG_1);
QByteArray signature(dataSignature); // Append SIGNAL flag (2)
- %0 = new QSignalTransitionWrapper(sender, "2" + signature, %2);
+ %0 = new QSignalTransitionWrapper(sender,"2" + signature,%2);
}
}
</inject-code>
@@ -4050,7 +4050,7 @@ s1.addTransition(button.clicked, s1h)&lt;/code>
</modify-argument>
</modify-function>
- <modify-function signature="addTransition(const QObject*, const char*, QAbstractState*)">
+ <modify-function signature="addTransition(const QObject*,const char*,QAbstractState*)">
<modify-argument index="return">
<parent index="this" action="add"/>
</modify-argument>
@@ -4074,7 +4074,7 @@ s1.addTransition(button.clicked, s1h)&lt;/code>
<!-- FIXME: the proper signature for this added function would be something like
addTransition(PySide2.QtCore.Signal, QAbstractState*)
but that depends on bug #362. -->
- <add-function signature="addTransition(PyObject*, QAbstractState*)" return-type="QSignalTransition*">
+ <add-function signature="addTransition(PyObject*,QAbstractState*)" return-type="QSignalTransition*">
<modify-argument index="return">
<parent index="this" action="add"/>
</modify-argument>
@@ -4087,7 +4087,7 @@ s1.addTransition(button.clicked, s1h)&lt;/code>
goto Sbk_%TYPEFunc_%FUNCTION_NAME_TypeError;
PySideSignalInstance *signalInstance = reinterpret_cast&lt;PySideSignalInstance*&gt;(%1);
QObject* sender = %CONVERTTOCPP[QObject*](PySide::Signal::getObject(signalInstance));
- QSignalTransition *%0 = %CPPSELF->%FUNCTION_NAME(sender, PySide::Signal::getSignature(signalInstance), %2);
+ QSignalTransition*%0 = %CPPSELF->%FUNCTION_NAME(sender,PySide::Signal::getSignature(signalInstance),%2);
%PYARG_0 = %CONVERTTOPYTHON[QSignalTransition*](%0);
</inject-code>
</add-function>
@@ -4106,12 +4106,12 @@ s1.addTransition(button.clicked, s1h)&lt;/code>
<value-type name="SignalEvent" since="4.6"/>
<value-type name="WrappedEvent" since="4.6"/>
- <modify-function signature="addState(QAbstractState *)">
+ <modify-function signature="addState(QAbstractState*)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="removeState(QAbstractState *)">
+ <modify-function signature="removeState(QAbstractState*)">
<modify-argument index="1">
<parent index="this" action="remove"/>
</modify-argument>
@@ -4129,7 +4129,7 @@ s1.addTransition(button.clicked, s1h)&lt;/code>
</add-function>
<!-- Replaced by a added function -->
- <modify-function signature="defaultAnimations() const" remove="all"/>
+ <modify-function signature="defaultAnimations()const" remove="all"/>
<add-function signature="defaultAnimations()" return-type="list of QAbstractAnimation" >
<inject-code class="target" position="beginning">
%PYARG_0 = PyList_New(0);
@@ -4156,13 +4156,13 @@ s1.addTransition(button.clicked, s1h)&lt;/code>
<add-function signature="SIGNAL(const char*)" return-type="str">
<inject-code class="target" position="beginning">
- %PYARG_0 = Shiboken::String::fromFormat("2%s", QMetaObject::normalizedSignature(%1).constData());
+ %PYARG_0 = Shiboken::String::fromFormat("2%s",QMetaObject::normalizedSignature(%1).constData());
</inject-code>
</add-function>
<add-function signature="SLOT(const char*)" return-type="str">
<inject-code class="target" position="beginning">
- %PYARG_0 = Shiboken::String::fromFormat("1%s", QMetaObject::normalizedSignature(%1).constData());
+ %PYARG_0 = Shiboken::String::fromFormat("1%s",QMetaObject::normalizedSignature(%1).constData());
</inject-code>
</add-function>
@@ -4176,12 +4176,12 @@ s1.addTransition(button.clicked, s1h)&lt;/code>
<insert-template name="return_argument"><replace from="#" to="1" /></insert-template>
</inject-code>
</add-function>
- <add-function signature="QT_TRANSLATE_NOOP(PyObject, PyObject)" return-type="PyObject*">
+ <add-function signature="QT_TRANSLATE_NOOP(PyObject,PyObject)" return-type="PyObject*">
<inject-code class="target" position="beginning">
<insert-template name="return_argument"><replace from="#" to="2" /></insert-template>
</inject-code>
</add-function>
- <add-function signature="QT_TRANSLATE_NOOP3(PyObject, PyObject, PyObject)" return-type="PyObject*">
+ <add-function signature="QT_TRANSLATE_NOOP3(PyObject,PyObject,PyObject)" return-type="PyObject*">
<inject-code class="target" position="beginning">
<insert-template name="return_argument"><replace from="#" to="2" /></insert-template>
</inject-code>
@@ -4205,7 +4205,7 @@ s1.addTransition(button.clicked, s1h)&lt;/code>
const unsigned char *,
const unsigned char *);
</inject-code>
- <add-function signature="qRegisterResourceData(int, PyBytes, PyBytes, PyBytes)" return-type="bool">
+ <add-function signature="qRegisterResourceData(int,PyBytes,PyBytes,PyBytes)" return-type="bool">
<inject-code class="target" position="beginning">
%RETURN_TYPE %0 = %FUNCTION_NAME(%1, reinterpret_cast&lt;uchar*&gt;(PyBytes_AS_STRING(%PYARG_2)),
reinterpret_cast&lt;uchar*&gt;(PyBytes_AS_STRING(%PYARG_3)),
@@ -4213,7 +4213,7 @@ s1.addTransition(button.clicked, s1h)&lt;/code>
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
</inject-code>
</add-function>
- <add-function signature="qUnregisterResourceData(int, PyBytes, PyBytes, PyBytes)" return-type="bool">
+ <add-function signature="qUnregisterResourceData(int,PyBytes,PyBytes,PyBytes)" return-type="bool">
<inject-code class="target" position="beginning">
%RETURN_TYPE %0 = %FUNCTION_NAME(%1, reinterpret_cast&lt;uchar*&gt;(PyBytes_AS_STRING(%PYARG_2)),
reinterpret_cast&lt;uchar*&gt;(PyBytes_AS_STRING(%PYARG_3)),
@@ -4234,7 +4234,7 @@ s1.addTransition(button.clicked, s1h)&lt;/code>
<suppress-warning text="visibility of function '*' modified in class '*'"/>
<suppress-warning text="hiding of function '*' in class '*'"/>
<suppress-warning text="namespace '*' does not have a type entry"/>
- <suppress-warning text="Shadowing: QObject::parent() const and QAbstractItemModel::parent() const"/>
+ <suppress-warning text="Shadowing: QObject::parent()const and QAbstractItemModel::parent() const"/>
<suppress-warning text="namespace '*' for enum 'QtMsgType' is not declared"/>
<suppress-warning text="horribly broken type 'imaxdiv_t'"/>
<suppress-warning text="horribly broken type '__off64_t'"/>
@@ -4262,8 +4262,8 @@ s1.addTransition(button.clicked, s1h)&lt;/code>
<suppress-warning text="signature 'winEventFilter(MSG*,long*)' for function modification in 'QCoreApplication' not found. Possible candidates:*"/>
<!-- this is necessary to avoid warning on other modules -->
- <suppress-warning text="signature 'operator*(QByteArray,const char*)' for function modification in 'QByteArray' not found. Possible candidates: *"/>
- <suppress-warning text="signature 'operator+(QByteArray,QString)' for function modification in 'QByteArray' not found. Possible candidates: *"/>
+ <suppress-warning text="signature 'operator*(QByteArray,const char*)' for function modification in 'QByteArray' not found. Possible candidates:*"/>
+ <suppress-warning text="signature 'operator+(QByteArray,QString)' for function modification in 'QByteArray' not found. Possible candidates:*"/>
<!-- This enum is intenaly used -->
<suppress-warning text="enum 'PM_CbaIconHeight' does not have a type entry or is not an enum" />
diff --git a/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml b/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml
index 0c43fde1f..976380cda 100644
--- a/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml
+++ b/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml
@@ -275,7 +275,7 @@
<insert-template name="fix_bool*"/>
</inject-code>
</modify-function>
- <add-function signature="quadToQuad(QPolygonF&amp;, QPolygonF&amp;)" return-type="PyObject*" static="true">
+ <add-function signature="quadToQuad(QPolygonF&amp;,QPolygonF&amp;)" return-type="PyObject*" static="true">
<inject-code>
QTransform _result;
if (QTransform::quadToQuad(%1, %2, _result)) {
@@ -407,7 +407,7 @@
</inject-code>
</add-function>
- <modify-function signature="operator[](uint) const" remove="all"/>
+ <modify-function signature="operator[](uint)const" remove="all"/>
<add-function signature="__getitem__">
<inject-code class="target" position="beginning">
if (_i &lt; 0 || _i >= %CPPSELF.count()) {
@@ -423,12 +423,12 @@
<modify-function signature="operator QVariant()const" remove="all"/>
</value-type>
<value-type name="QPicture" >
- <modify-function signature="load(QIODevice*, const char*)" allow-thread="yes"/>
- <modify-function signature="load(const QString&amp;, const char*)" allow-thread="yes"/>
- <modify-function signature="save(QIODevice*, const char*)" allow-thread="yes"/>
- <modify-function signature="save(const QString&amp;, const char*)" allow-thread="yes"/>
+ <modify-function signature="load(QIODevice*,const char*)" allow-thread="yes"/>
+ <modify-function signature="load(const QString&amp;,const char*)" allow-thread="yes"/>
+ <modify-function signature="save(QIODevice*,const char*)" allow-thread="yes"/>
+ <modify-function signature="save(const QString&amp;,const char*)" allow-thread="yes"/>
<!-- See bug 759 -->
- <modify-function signature="data() const">
+ <modify-function signature="data()const">
<modify-argument index="return">
<replace-type modified-type="PyObject"/>
</modify-argument>
@@ -462,7 +462,7 @@
<modify-function signature="operator&amp;=(QRect)" remove="all"/>
<!-- ### -->
</value-type>
-
+
<value-type name="QTextBlock">
<value-type name="iterator" >
<include file-name="QTextBlock" location="global"/>
@@ -500,7 +500,7 @@
}
</inject-code>
</modify-function>
- <modify-function signature="userData() const">
+ <modify-function signature="userData()const">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
@@ -555,7 +555,7 @@
</add-function>
<!-- ### "QPolygon(int, const int*)" is an internal constructor. -->
- <modify-function signature="QPolygon(int, const int *)" remove="all"/>
+ <modify-function signature="QPolygon(int,const int*)" remove="all"/>
<!-- ### A QVector parameter, for no defined type, will generate wrong code. -->
<modify-function signature="operator+=(QVector&lt;QPoint&gt;)" remove="all"/>
<modify-function signature="operator&lt;&lt;(QPoint)">
@@ -590,7 +590,7 @@
<value-type name="QIcon" >
<enum-type name="Mode"/>
<enum-type name="State"/>
- <modify-function signature="QIcon(QIconEngine *)">
+ <modify-function signature="QIcon(QIconEngine*)">
<modify-argument index="1">
<no-null-pointer/>
<parent index="this" action="add"/>
@@ -646,7 +646,7 @@
<!-- ### Operator ! doesn't make sense in Python. -->
<modify-function signature="operator!()const" remove="all"/>
-
+
<modify-function signature="loadFromData(const uchar*,uint,const char*,QFlags&lt;Qt::ImageConversionFlag&gt;)">
<modify-argument index="1">
<replace-type modified-type="PyBytes"/>
@@ -713,7 +713,7 @@
</modify-argument>
</modify-function>
</value-type>
-
+
<!-- Qt5: this _should_ be obsolete, but QImage is still using it... -->
<value-type name="QMatrix">
<extra-includes>
@@ -794,7 +794,7 @@
<extra-includes>
<include file-name="QStringList" location="global"/>
</extra-includes>
- <modify-function signature="setStyleHint(QFont::StyleHint, QFont::StyleStrategy)">
+ <modify-function signature="setStyleHint(QFont::StyleHint,QFont::StyleStrategy)">
<modify-argument index="2">
<rename to="strategy"/>
</modify-argument>
@@ -823,7 +823,7 @@
uchar *ptr = reinterpret_cast&lt;uchar*&gt;(Shiboken::Buffer::getPointer(%PYARG_1));
%0 = new %TYPE(ptr, %ARGS);
</template>
- <modify-function signature="QImage(uchar *,int,int,int,QImage::Format,QImageCleanupFunction, void *)">
+ <modify-function signature="QImage(uchar*,int,int,int,QImage::Format,QImageCleanupFunction,void*)">
<modify-argument index="1">
<replace-type modified-type="PyBuffer"/>
</modify-argument>
@@ -833,7 +833,7 @@
</insert-template>
</inject-code>
</modify-function>
- <modify-function signature="QImage(uchar*,int,int,QImage::Format,QImageCleanupFunction, void *)">
+ <modify-function signature="QImage(uchar*,int,int,QImage::Format,QImageCleanupFunction,void*)">
<modify-argument index="1">
<replace-type modified-type="PyBuffer"/>
</modify-argument>
@@ -860,8 +860,8 @@
</add-function>
<!-- The non-const versions are already used -->
- <modify-function signature="QImage(const uchar*,int,int,int,QImage::Format,QImageCleanupFunction, void *)" remove="all"/>
- <modify-function signature="QImage(const uchar*,int,int,QImage::Format,QImageCleanupFunction, void *)" remove="all" />
+ <modify-function signature="QImage(const uchar*,int,int,int,QImage::Format,QImageCleanupFunction,void*)" remove="all"/>
+ <modify-function signature="QImage(const uchar*,int,int,QImage::Format,QImageCleanupFunction,void*)" remove="all" />
<!-- ### -->
<modify-function signature="QImage(const char*[])">
@@ -1575,44 +1575,44 @@
<modify-argument index="1" invalidate-after-use="yes"/>
</modify-function>
- <modify-function signature="appendColumn(const QList&lt;QStandardItem *&gt; &amp;)">
+ <modify-function signature="appendColumn(const QList&lt;QStandardItem*&gt; &amp;)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="appendRow(const QList&lt;QStandardItem *&gt; &amp;)">
+ <modify-function signature="appendRow(const QList&lt;QStandardItem*&gt; &amp;)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="appendRow(QStandardItem *)">
+ <modify-function signature="appendRow(QStandardItem*)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="appendRows(const QList&lt;QStandardItem *&gt; &amp;)">
+ <modify-function signature="appendRows(const QList&lt;QStandardItem*&gt; &amp;)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="insertColumn(int, const QList&lt;QStandardItem *&gt; &amp;)">
+ <modify-function signature="insertColumn(int,const QList&lt;QStandardItem*&gt; &amp;)">
<modify-argument index="2">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="insertRow(int, const QList&lt;QStandardItem *&gt; &amp;)">
+ <modify-function signature="insertRow(int,const QList&lt;QStandardItem*&gt; &amp;)">
<modify-argument index="2">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="insertRows(int, const QList&lt;QStandardItem *&gt; &amp;)">
+ <modify-function signature="insertRows(int,const QList&lt;QStandardItem*&gt; &amp;)">
<modify-argument index="2">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="setChild(int, int, QStandardItem *)">
+ <modify-function signature="setChild(int,int,QStandardItem*)">
<inject-code class="target" position="beginning">
// Clear parent from the old child
QStandardItem *_i = %CPPSELF->child(%1, %2);
@@ -1625,7 +1625,7 @@
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="setChild(int, QStandardItem *)">
+ <modify-function signature="setChild(int,QStandardItem*)">
<inject-code class="target" position="beginning">
// Clear parent from the old child
QStandardItem *_i = %CPPSELF->child(%1);
@@ -1639,13 +1639,13 @@
</modify-argument>
</modify-function>
- <modify-function signature="takeChild(int, int)">
+ <modify-function signature="takeChild(int,int)">
<modify-argument index="return">
<parent index="this" action="remove"/>
</modify-argument>
</modify-function>
- <modify-function signature="clone() const">
+ <modify-function signature="clone()const">
<modify-argument index="return">
<define-ownership class="native" owner="c++"/>
<define-ownership class="target" owner="target"/>
@@ -1666,7 +1666,7 @@
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="document() const">
+ <modify-function signature="document()const">
<modify-argument index="this">
<parent index="return" action="add"/>
</modify-argument>
@@ -1737,7 +1737,7 @@
<insert-template name="return_QString"/>
</inject-code>
</modify-function>
- <modify-function signature="validate(QString &amp;, int &amp;)const">
+ <modify-function signature="validate(QString &amp;,int &amp;)const">
<modify-argument index="return">
<replace-type modified-type="PyObject"/>
<conversion-rule class="native">
@@ -1759,7 +1759,7 @@
<object-type name="QDragLeaveEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::DragLeave"/>
<object-type name="QDragMoveEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::DragMove" />
<object-type name="QDropEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::Drop">
- <modify-function signature="source() const">
+ <modify-function signature="source()const">
<modify-argument index="return">
<define-ownership class="target" owner="default" />
</modify-argument>
@@ -1911,12 +1911,12 @@
<parent index="1" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="source() const">
+ <modify-function signature="source()const">
<modify-argument index="return">
<define-ownership owner="target"/>
</modify-argument>
</modify-function>
- <modify-function signature="target() const">
+ <modify-function signature="target()const">
<modify-argument index="return">
<define-ownership owner="target"/>
</modify-argument>
@@ -1928,7 +1928,7 @@
</modify-argument>
</modify-function>
<modify-function signature="exec(QFlags&lt;Qt::DropAction&gt;)" rename="exec_" allow-thread="yes"/>
- <modify-function signature="exec(QFlags&lt;Qt::DropAction&gt;, Qt::DropAction)" rename="exec_" allow-thread="yes"/>
+ <modify-function signature="exec(QFlags&lt;Qt::DropAction&gt;,Qt::DropAction)" rename="exec_" allow-thread="yes"/>
</object-type>
<object-type name="QStandardItemModel" polymorphic-id-expression="qobject_cast&lt;QStandardItemModel*&gt;(%1)">
@@ -1951,32 +1951,32 @@
<parent index="this" action="remove" />
</modify-argument>
</modify-function>
- <modify-function signature="verticalHeaderItem(int) const">
+ <modify-function signature="verticalHeaderItem(int)const">
<modify-argument index="return">
<parent index="this" action="add" />
</modify-argument>
</modify-function>
- <modify-function signature="horizontalHeaderItem(int) const">
+ <modify-function signature="horizontalHeaderItem(int)const">
<modify-argument index="return">
<parent index="this" action="add" />
</modify-argument>
</modify-function>
- <modify-function signature="invisibleRootItem() const">
+ <modify-function signature="invisibleRootItem()const">
<modify-argument index="return">
<parent index="this" action="add" />
</modify-argument>
</modify-function>
- <modify-function signature="item(int, int) const">
+ <modify-function signature="item(int,int)const">
<modify-argument index="return">
<parent index="this" action="add" />
</modify-argument>
</modify-function>
- <modify-function signature="itemFromIndex(const QModelIndex&amp;) const">
+ <modify-function signature="itemFromIndex(const QModelIndex&amp;)const">
<modify-argument index="return">
<parent index="this" action="add" />
</modify-argument>
</modify-function>
- <modify-function signature="itemPrototype() const">
+ <modify-function signature="itemPrototype()const">
<modify-argument index="return">
<parent index="this" action="add" />
</modify-argument>
@@ -1993,18 +1993,18 @@
</modify-argument>
</modify-function>
- <modify-function signature="insertRow(int, QStandardItem*)">
+ <modify-function signature="insertRow(int,QStandardItem*)">
<modify-argument index="2">
<parent index="this" action="add" />
</modify-argument>
</modify-function>
- <modify-function signature="setHorizontalHeaderItem(int, QStandardItem*)">
+ <modify-function signature="setHorizontalHeaderItem(int,QStandardItem*)">
<modify-argument index="2">
<parent index="this" action="add" />
</modify-argument>
</modify-function>
- <modify-function signature="setItem(int, int, QStandardItem*)">
+ <modify-function signature="setItem(int,int,QStandardItem*)">
<inject-code class="target" position="beginning">
// Clear parent from the old child
QStandardItem *_i = %CPPSELF->item(%1, %2);
@@ -2017,7 +2017,7 @@
<parent index="this" action="add" />
</modify-argument>
</modify-function>
- <modify-function signature="setItem(int, QStandardItem*)">
+ <modify-function signature="setItem(int,QStandardItem*)">
<inject-code class="target" position="beginning">
// Clear parent from the old child
QStandardItem *_i = %CPPSELF->item(%1);
@@ -2036,7 +2036,7 @@
</modify-argument>
</modify-function>
- <modify-function signature="setVerticalHeaderItem(int, QStandardItem*)">
+ <modify-function signature="setVerticalHeaderItem(int,QStandardItem*)">
<inject-code class="target" position="beginning">
// Clear parent from the old child
QStandardItem *_i = %CPPSELF->verticalHeaderItem(%1);
@@ -2062,19 +2062,19 @@
</modify-argument>
</modify-function>
- <modify-function signature="findItems(const QString&amp;, QFlags&lt;Qt::MatchFlag&gt;, int) const">
+ <modify-function signature="findItems(const QString&amp;,QFlags&lt;Qt::MatchFlag&gt;,int)const">
<modify-argument index="return">
<parent index="this" action="add" />
</modify-argument>
</modify-function>
- <modify-function signature="insertColumn(int, const QList&lt;QStandardItem*&gt;&amp;)">
+ <modify-function signature="insertColumn(int,const QList&lt;QStandardItem*&gt;&amp;)">
<modify-argument index="2">
<parent index="this" action="add" />
</modify-argument>
</modify-function>
- <modify-function signature="insertRow(int, const QList&lt;QStandardItem*&gt;&amp;)">
+ <modify-function signature="insertRow(int,const QList&lt;QStandardItem*&gt;&amp;)">
<modify-argument index="2">
<parent index="this" action="add" />
</modify-argument>
@@ -2110,7 +2110,7 @@
<include file-name="QPixmap" location="global"/>
</extra-includes>
<enum-type name="Mode" />
- <modify-function signature="setMimeData(QMimeData *, QClipboard::Mode)">
+ <modify-function signature="setMimeData(QMimeData*,QClipboard::Mode)">
<modify-argument index="1">
<!-- TODO: maybe this is not the best solution -->
<parent index="this" action="add"/>
@@ -2219,7 +2219,7 @@
</value-type>
<!-- ### "drawText(...)" is an internal method. -->
- <modify-function signature="drawText(const QPointF&amp;, const QString&amp;, int, int)" remove="all"/>
+ <modify-function signature="drawText(const QPointF&amp;,const QString&amp;,int,int)" remove="all"/>
<template name="qpainter_drawlist">
%BEGIN_ALLOW_THREADS
@@ -2227,67 +2227,67 @@
%END_ALLOW_THREADS
</template>
- <modify-function signature="drawConvexPolygon(const QPoint*, int)" remove="all" />
+ <modify-function signature="drawConvexPolygon(const QPoint*,int)" remove="all" />
<add-function signature="drawConvexPolygon(QVector&lt;QPoint>)">
<inject-code>
<insert-template name="qpainter_drawlist" />
</inject-code>
</add-function>
- <modify-function signature="drawConvexPolygon(const QPointF*, int)" remove="all" />
+ <modify-function signature="drawConvexPolygon(const QPointF*,int)" remove="all" />
<add-function signature="drawConvexPolygon(QVector&lt;QPointF>)">
<inject-code>
<insert-template name="qpainter_drawlist" />
</inject-code>
</add-function>
<!-- ### Overloads using QVector<T> does the job of these methods -->
- <modify-function signature="drawLines(const QLine*, int)" remove="all" />
- <modify-function signature="drawLines(const QLineF*, int)" remove="all" />
- <modify-function signature="drawLines(const QPoint*, int)" remove="all" />
- <modify-function signature="drawLines(const QPointF*, int)" remove="all" />
- <modify-function signature="drawRects(const QRect*, int)" remove="all" />
- <modify-function signature="drawRects(const QRectF*, int)" remove="all" />
+ <modify-function signature="drawLines(const QLine*,int)" remove="all" />
+ <modify-function signature="drawLines(const QLineF*,int)" remove="all" />
+ <modify-function signature="drawLines(const QPoint*,int)" remove="all" />
+ <modify-function signature="drawLines(const QPointF*,int)" remove="all" />
+ <modify-function signature="drawRects(const QRect*,int)" remove="all" />
+ <modify-function signature="drawRects(const QRectF*,int)" remove="all" />
<!-- ### -->
- <modify-function signature="drawPoints(const QPoint*, int)" remove="all" />
+ <modify-function signature="drawPoints(const QPoint*,int)" remove="all" />
<add-function signature="drawPoints(QVector&lt;QPoint>)">
<inject-code>
<insert-template name="qpainter_drawlist" />
</inject-code>
</add-function>
- <modify-function signature="drawPoints(const QPointF*, int)" remove="all" />
+ <modify-function signature="drawPoints(const QPointF*,int)" remove="all" />
<add-function signature="drawPoints(QVector&lt;QPointF>)">
<inject-code>
<insert-template name="qpainter_drawlist" />
</inject-code>
</add-function>
- <modify-function signature="drawPolygon(const QPoint*, int, Qt::FillRule)" remove="all" />
- <add-function signature="drawPolygon(QVector&lt;QPoint>, Qt::FillRule)">
+ <modify-function signature="drawPolygon(const QPoint*,int,Qt::FillRule)" remove="all" />
+ <add-function signature="drawPolygon(QVector&lt;QPoint>,Qt::FillRule)">
<inject-code>
%BEGIN_ALLOW_THREADS
%CPPSELF.%FUNCTION_NAME(%1.data(), %1.size(), %2);
%END_ALLOW_THREADS
</inject-code>
</add-function>
- <modify-function signature="drawPolygon(const QPointF*, int, Qt::FillRule)" remove="all" />
- <add-function signature="drawPolygon(QVector&lt;QPointF>, Qt::FillRule)">
+ <modify-function signature="drawPolygon(const QPointF*,int,Qt::FillRule)" remove="all" />
+ <add-function signature="drawPolygon(QVector&lt;QPointF>,Qt::FillRule)">
<inject-code>
%BEGIN_ALLOW_THREADS
%CPPSELF.%FUNCTION_NAME(%1.data(), %1.size(), %2);
%END_ALLOW_THREADS
</inject-code>
</add-function>
- <modify-function signature="drawPolyline(const QPoint*, int)" remove="all" />
+ <modify-function signature="drawPolyline(const QPoint*,int)" remove="all" />
<add-function signature="drawPolyline(QVector&lt;QPoint>)">
<inject-code>
<insert-template name="qpainter_drawlist" />
</inject-code>
</add-function>
- <modify-function signature="drawPolyline(const QPointF*, int)" remove="all" />
+ <modify-function signature="drawPolyline(const QPointF*,int)" remove="all" />
<add-function signature="drawPolyline(QVector&lt;QPointF>)">
<inject-code>
<insert-template name="qpainter_drawlist" />
</inject-code>
</add-function>
- <modify-function signature="drawRoundRect(int, int, int, int, int, int)">
+ <modify-function signature="drawRoundRect(int,int,int,int,int,int)">
<modify-argument index="5">
<rename to="xRound"/>
</modify-argument>
@@ -2295,7 +2295,7 @@
<rename to="yRound"/>
</modify-argument>
</modify-function>
- <modify-function signature="drawTiledPixmap(const QRect&amp;,const QPixmap&amp;, const QPoint&amp;)">
+ <modify-function signature="drawTiledPixmap(const QRect&amp;,const QPixmap&amp;,const QPoint&amp;)">
<modify-argument index="3">
<rename to="pos"/>
</modify-argument>
@@ -2310,7 +2310,7 @@
<no-null-pointer/>
</modify-argument>
</modify-function>
- <modify-function signature="setRedirected(const QPaintDevice*, QPaintDevice*, const QPoint&amp;)">
+ <modify-function signature="setRedirected(const QPaintDevice*,QPaintDevice*,const QPoint&amp;)">
<modify-argument index="1">
<no-null-pointer/>
</modify-argument>
@@ -3004,7 +3004,7 @@
</insert-template>
</inject-code>
</modify-function>
- <modify-function signature="copyDataTo(float *) const">
+ <modify-function signature="copyDataTo(float*)const">
<modify-argument index="1">
<remove-argument/>
</modify-argument>
@@ -3035,11 +3035,11 @@
</modify-function>
<!-- ### "constData() const" and "data() const" are unnecessary in Python and their function is performed by "data()". -->
- <modify-function signature="data() const" remove="all"/>
- <modify-function signature="constData() const" remove="all"/>
+ <modify-function signature="data()const" remove="all"/>
+ <modify-function signature="constData()const" remove="all"/>
<!-- ### -->
- <modify-function signature="operator()(int, int) const" remove="all"/>
- <modify-function signature="operator()(int, int)" remove="all"/>
+ <modify-function signature="operator()(int,int)const" remove="all"/>
+ <modify-function signature="operator()(int,int)" remove="all"/>
<add-function signature="__mgetitem__" return-type="PyObject*">
<inject-code>
if (PySequence_Check(_key)) {
@@ -3082,9 +3082,9 @@
</add-function>
<!-- Qt5.5: XXX support the output variables! For now, I just suppressed the new methods. -->
- <modify-function signature="getAxisAndAngle(float *, float *, float *, float *) const" since="5.5" remove="all" />
- <modify-function signature="getAxisAndAngle(QVector3D *, float *) const" since="5.5" remove="all" />
- <modify-function signature="getEulerAngles(float *, float *, float *) const" since="5.5" remove="all" />
+ <modify-function signature="getAxisAndAngle(float*,float*,float*,float*)const" since="5.5" remove="all" />
+ <modify-function signature="getAxisAndAngle(QVector3D*,float*)const" since="5.5" remove="all" />
+ <modify-function signature="getEulerAngles(float*,float*,float*)const" since="5.5" remove="all" />
</value-type>
<object-type name="QTouchEvent" since="4.6">
@@ -3202,7 +3202,7 @@
This seems to be a related problem with unnamed structures in shiboken.
-->
<suppress-warning text="enum 'QMatrix4x4::enum_1' is specified in typesystem, but not declared"/>
-
+
<object-type name="QSessionManager">
<extra-includes>
</extra-includes>
@@ -3315,7 +3315,7 @@
<modify-function signature="glDeleteSamplers(int,const unsigned int*)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
- <modify-function signature="glDeleteTransformFeedbacks(int,const unsigned int *)">
+ <modify-function signature="glDeleteTransformFeedbacks(int,const unsigned int*)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
<modify-function signature="glDeleteVertexArrays(int,const unsigned int*)">
@@ -3633,13 +3633,13 @@
<modify-function signature="setUniformValueArray(int,const unsigned int*,int)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
- <modify-function signature="setUniformValueArray(const char*,const float *,int,int)">
+ <modify-function signature="setUniformValueArray(const char*,const float*,int,int)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
<modify-function signature="setUniformValueArray(const char*,const int*,int)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
- <modify-function signature="setUniformValueArray(const char *,const unsigned int*,int)">
+ <modify-function signature="setUniformValueArray(const char*,const unsigned int*,int)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
</object-type>
diff --git a/sources/pyside2/PySide2/QtHelp/typesystem_help.xml b/sources/pyside2/PySide2/QtHelp/typesystem_help.xml
index 6bd5dd364..bcaa5fee3 100644
--- a/sources/pyside2/PySide2/QtHelp/typesystem_help.xml
+++ b/sources/pyside2/PySide2/QtHelp/typesystem_help.xml
@@ -44,7 +44,7 @@
<load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no" />
<value-type name="QHelpContentItem">
- <modify-function signature="parent() const">
+ <modify-function signature="parent()const">
<modify-argument index="return">
<define-ownership owner="default"/>
</modify-argument>
diff --git a/sources/pyside2/PySide2/QtLocation/CMakeLists.txt b/sources/pyside2/PySide2/QtLocation/CMakeLists.txt
new file mode 100644
index 000000000..f968d1a1c
--- /dev/null
+++ b/sources/pyside2/PySide2/QtLocation/CMakeLists.txt
@@ -0,0 +1,80 @@
+project(QtLocation)
+
+set(QtLocation_OPTIONAL_SRC )
+set(QtLocation_DROPPED_ENTRIES )
+
+set(QtLocation_SRC
+${QtLocation_GEN_DIR}/qgeocodereply_wrapper.cpp
+${QtLocation_GEN_DIR}/qgeomaneuver_wrapper.cpp
+${QtLocation_GEN_DIR}/qgeoroute_wrapper.cpp
+${QtLocation_GEN_DIR}/qgeoroutereply_wrapper.cpp
+${QtLocation_GEN_DIR}/qgeoroutesegment_wrapper.cpp
+${QtLocation_GEN_DIR}/qgeoserviceprovider_wrapper.cpp
+${QtLocation_GEN_DIR}/qplace_wrapper.cpp
+${QtLocation_GEN_DIR}/qplacecontentreply_wrapper.cpp
+${QtLocation_GEN_DIR}/qplacedetailsreply_wrapper.cpp
+${QtLocation_GEN_DIR}/qplaceicon_wrapper.cpp
+${QtLocation_GEN_DIR}/qplaceidreply_wrapper.cpp
+${QtLocation_GEN_DIR}/qplacemanager_wrapper.cpp
+${QtLocation_GEN_DIR}/qplaceuser_wrapper.cpp
+${QtLocation_GEN_DIR}/qgeocodingmanager_wrapper.cpp
+${QtLocation_GEN_DIR}/qgeocodingmanagerengine_wrapper.cpp
+${QtLocation_GEN_DIR}/qgeorouterequest_wrapper.cpp
+${QtLocation_GEN_DIR}/qgeoroutingmanager_wrapper.cpp
+${QtLocation_GEN_DIR}/qgeoroutingmanagerengine_wrapper.cpp
+${QtLocation_GEN_DIR}/qgeoserviceproviderfactory_wrapper.cpp
+${QtLocation_GEN_DIR}/qplaceattribute_wrapper.cpp
+${QtLocation_GEN_DIR}/qplacecategory_wrapper.cpp
+${QtLocation_GEN_DIR}/qplacecontactdetail_wrapper.cpp
+${QtLocation_GEN_DIR}/qplacecontent_wrapper.cpp
+${QtLocation_GEN_DIR}/qplacecontentrequest_wrapper.cpp
+${QtLocation_GEN_DIR}/qplaceeditorial_wrapper.cpp
+${QtLocation_GEN_DIR}/qplaceimage_wrapper.cpp
+${QtLocation_GEN_DIR}/qplacemanagerengine_wrapper.cpp
+${QtLocation_GEN_DIR}/qplacematchreply_wrapper.cpp
+${QtLocation_GEN_DIR}/qplacematchrequest_wrapper.cpp
+${QtLocation_GEN_DIR}/qplaceproposedsearchresult_wrapper.cpp
+${QtLocation_GEN_DIR}/qplaceratings_wrapper.cpp
+${QtLocation_GEN_DIR}/qplacereply_wrapper.cpp
+${QtLocation_GEN_DIR}/qplaceresult_wrapper.cpp
+${QtLocation_GEN_DIR}/qplacereview_wrapper.cpp
+${QtLocation_GEN_DIR}/qplacesearchreply_wrapper.cpp
+${QtLocation_GEN_DIR}/qplacesearchrequest_wrapper.cpp
+${QtLocation_GEN_DIR}/qplacesearchresult_wrapper.cpp
+${QtLocation_GEN_DIR}/qplacesearchsuggestionreply_wrapper.cpp
+${QtLocation_GEN_DIR}/qplacesupplier_wrapper.cpp
+# module is always needed
+${QtLocation_GEN_DIR}/qtlocation_module_wrapper.cpp
+)
+
+if (Qt5Location_VERSION VERSION_EQUAL 5.11.0 OR Qt5Location_VERSION VERSION_GREATER 5.11.0)
+ list(APPEND QtLocation_SRC
+ ${QtLocation_GEN_DIR}/qgeoserviceproviderfactoryv2_wrapper.cpp)
+endif()
+
+set(QtLocation_include_dirs ${QtLocation_SOURCE_DIR}
+ ${QtLocation_BINARY_DIR}
+ ${Qt5Core_INCLUDE_DIRS}
+ ${Qt5Location_INCLUDE_DIRS}
+ ${SHIBOKEN_INCLUDE_DIR}
+ ${libpyside_SOURCE_DIR}
+ ${SHIBOKEN_PYTHON_INCLUDE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtPositioning_GEN_DIR})
+
+set(QtLocation_libraries pyside2
+ ${SHIBOKEN_PYTHON_LIBRARIES}
+ ${SHIBOKEN_LIBRARY}
+ ${Qt5Location_LIBRARIES})
+
+set(QtLocation_deps QtCore QtPositioning)
+
+create_pyside_module(QtLocation
+ QtLocation_include_dirs
+ QtLocation_libraries
+ QtLocation_deps
+ QtLocation_SOURCE_DIR
+ QtLocation_SRC
+ ""
+ ""
+ QtLocation_DROPPED_ENTRIES)
diff --git a/sources/pyside2/PySide2/QtLocation/typesystem_location.xml b/sources/pyside2/PySide2/QtLocation/typesystem_location.xml
new file mode 100644
index 000000000..de8fbca7f
--- /dev/null
+++ b/sources/pyside2/PySide2/QtLocation/typesystem_location.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of PySide2.
+**
+** $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$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide2.QtLocation">
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+ <load-typesystem name="QtPositioning/typesystem_positioning.xml" generate="no"/>
+ <object-type name="QGeoCodeReply">
+ <enum-type name="Error"/>
+ </object-type>
+ <value-type name="QGeoManeuver">
+ <enum-type name="InstructionDirection"/>
+ </value-type>
+ <value-type name="QGeoRoute"/>
+ <object-type name="QGeoRouteReply">
+ <enum-type name="Error"/>
+ </object-type>
+ <value-type name="QGeoRouteSegment"/>
+ <object-type name="QGeoServiceProvider">
+ <enum-type name="Error"/>
+ <enum-type name="RoutingFeature" flags="RoutingFeatures"/>
+ <enum-type name="GeocodingFeature" flags="GeocodingFeatures"/>
+ <enum-type name="MappingFeature" flags="MappingFeatures"/>
+ <enum-type name="PlacesFeature" flags="PlacesFeatures"/>
+ <enum-type name="NavigationFeature" flags="NavigationFeatures"/>
+ </object-type>
+ <value-type name="QPlace"/>
+ <object-type name="QPlaceContentReply"/>
+ <object-type name="QPlaceDetailsReply"/>
+ <value-type name="QPlaceIcon"/>
+ <object-type name="QPlaceIdReply">
+ <enum-type name="OperationType"/>
+ </object-type>
+ <object-type name="QPlaceManager"/>
+ <value-type name="QPlaceUser"/>
+ <object-type name="QGeoCodingManager"/>
+ <object-type name="QGeoCodingManagerEngine"/>
+ <object-type name="QGeoRouteRequest">
+ <enum-type name="TravelMode" flags="TravelModes"/>
+ <enum-type name="FeatureType" flags="FeatureTypes"/>
+ <enum-type name="FeatureWeight" flags="FeatureWeights"/>
+ <enum-type name="RouteOptimization" flags="RouteOptimizations"/>
+ <enum-type name="SegmentDetail" flags="SegmentDetails"/>
+ <enum-type name="ManeuverDetail" flags="ManeuverDetails"/>
+ </object-type>
+ <object-type name="QGeoRoutingManager"/>
+ <object-type name="QGeoRoutingManagerEngine"/>
+ <object-type name="QGeoServiceProviderFactory"/>
+ <object-type name="QGeoServiceProviderFactoryV2" since="5.11"/>
+ <value-type name="QPlaceAttribute"/>
+ <value-type name="QPlaceCategory"/>
+ <value-type name="QPlaceContactDetail"/>
+ <value-type name="QPlaceContent"/>
+ <value-type name="QPlaceContentRequest"/>
+ <object-type name="QPlaceEditorial"/>
+ <object-type name="QPlaceImage"/>
+ <object-type name="QPlaceManagerEngine"/>
+ <object-type name="QPlaceMatchReply"/>
+ <value-type name="QPlaceMatchRequest"/>
+ <object-type name="QPlaceProposedSearchResult"/>
+ <value-type name="QPlaceRatings"/>
+ <object-type name="QPlaceReply">
+ <enum-type name="Error"/>
+ <enum-type name="Type"/>
+ </object-type>
+ <object-type name="QPlaceResult"/>
+ <object-type name="QPlaceReview"/>
+ <object-type name="QPlaceSearchReply"/>
+ <object-type name="QPlaceSearchRequest">
+ <enum-type name="RelevanceHint"/>
+ </object-type>
+ <object-type name="QPlaceSearchResult"/>
+ <object-type name="QPlaceSearchSuggestionReply"/>
+ <value-type name="QPlaceSupplier"/>
+</typesystem>
diff --git a/sources/pyside2/PySide2/QtMultimedia/typesystem_multimedia_common.xml b/sources/pyside2/PySide2/QtMultimedia/typesystem_multimedia_common.xml
index 35effbc73..15c0729e2 100644
--- a/sources/pyside2/PySide2/QtMultimedia/typesystem_multimedia_common.xml
+++ b/sources/pyside2/PySide2/QtMultimedia/typesystem_multimedia_common.xml
@@ -59,9 +59,9 @@
<object-type name="QAbstractVideoBuffer">
<enum-type name="HandleType"/>
<enum-type name="MapMode"/>
- <modify-function signature="map(QAbstractVideoBuffer::MapMode, int*, int*)" remove="all"/>
+ <modify-function signature="map(QAbstractVideoBuffer::MapMode,int*,int*)" remove="all"/>
<!-- TODO: discuss a way to have this working with the virtual method.
- <modify-function signature="map(QAbstractVideoBuffer::MapMode, int*, int*)">
+ <modify-function signature="map(QAbstractVideoBuffer::MapMode,int*,int*)">
<modify-argument index="0">
<replace-type modified-type="PyObject"/>
</modify-argument>
@@ -87,7 +87,7 @@
<enum-type name="FieldType"/>
<enum-type name="PixelFormat"/>
<modify-function signature="bits(int)" remove="all"/>
- <modify-function signature="bits(int) const" remove="all"/>
+ <modify-function signature="bits(int)const" remove="all"/>
</value-type>
<value-type name="QAudioBuffer"/>
@@ -108,7 +108,7 @@
<define-ownership class="target" owner="c++"/>
</modify-argument>
</modify-function>
- <modify-function signature="start(QIODevice *)">
+ <modify-function signature="start(QIODevice*)">
<modify-argument index="1">
<define-ownership class="target" owner="c++"/>
</modify-argument>
@@ -121,7 +121,7 @@
<define-ownership class="target" owner="c++"/>
</modify-argument>
</modify-function>
- <modify-function signature="start(QIODevice *)">
+ <modify-function signature="start(QIODevice*)">
<modify-argument index="1">
<define-ownership class="target" owner="c++"/>
</modify-argument>
@@ -132,7 +132,7 @@
<object-type name="QAudioProbe"/>
<value-type name="QAudioEncoderSettings"/>
<object-type name="QAudioEncoderSettingsControl">
- <modify-function signature="supportedSampleRates(const QAudioEncoderSettings &amp;, bool *) const" remove="all"/>
+ <modify-function signature="supportedSampleRates(const QAudioEncoderSettings &amp;,bool*)const" remove="all"/>
</object-type>
<object-type name="QAudioInput">
@@ -175,7 +175,7 @@
<enum-type name="Position"/>
<enum-type name="State"/>
<enum-type name="Status"/>
- <modify-function signature="setViewfinder(QVideoWidget *)">
+ <modify-function signature="setViewfinder(QVideoWidget*)">
<modify-argument index="1">
<replace-type modified-type="QObject *" />
</modify-argument>
@@ -186,7 +186,7 @@
%END_ALLOW_THREADS
</inject-code>
</modify-function>
- <modify-function signature="setViewfinder(QGraphicsVideoItem *)">
+ <modify-function signature="setViewfinder(QGraphicsVideoItem*)">
<modify-argument index="1">
<replace-type modified-type="QObject *" />
</modify-argument>
@@ -208,14 +208,14 @@
<enum-type name="FlashMode" flags="FlashModes"/>
<enum-type name="ExposureMode"/>
<enum-type name="MeteringMode"/>
- <modify-function signature="supportedApertures(bool *) const" remove="all"/>
- <modify-function signature="supportedIsoSensitivities(bool *) const" remove="all"/>
- <modify-function signature="supportedShutterSpeeds(bool *) const" remove="all"/>
+ <modify-function signature="supportedApertures(bool*)const" remove="all"/>
+ <modify-function signature="supportedIsoSensitivities(bool*)const" remove="all"/>
+ <modify-function signature="supportedShutterSpeeds(bool*)const" remove="all"/>
</object-type>
-->
<object-type name="QCameraExposureControl">
<enum-type name="ExposureParameter"/>
- <modify-function signature="supportedParameterRange(QCameraExposureControl::ExposureParameter, bool *) const" remove="all"/>
+ <modify-function signature="supportedParameterRange(QCameraExposureControl::ExposureParameter,bool*)const" remove="all"/>
</object-type>
<value-type name="QCameraFocusZone">
<enum-type name="FocusZoneStatus"/>
@@ -232,7 +232,7 @@
<enum-type name="CaptureDestination" flags="CaptureDestinations"/>
<enum-type name="DriveMode"/>
<enum-type name="Error"/>
- <modify-function signature="supportedResolutions(const QImageEncoderSettings &amp;, bool *) const" remove="all"/>
+ <modify-function signature="supportedResolutions(const QImageEncoderSettings &amp;,bool*)const" remove="all"/>
</object-type>
<object-type name="QCameraImageCaptureControl"/>
<!-- Private destructor
@@ -254,7 +254,7 @@
<value-type name="QImageEncoderSettings"/>
<object-type name="QImageEncoderControl">
- <modify-function signature="supportedResolutions(const QImageEncoderSettings &amp;, bool *) const" remove="all"/>
+ <modify-function signature="supportedResolutions(const QImageEncoderSettings &amp;,bool*)const" remove="all"/>
</object-type>
<object-type name="QMediaAudioProbeControl"/>
@@ -275,7 +275,7 @@
<enum-type name="MediaStatus"/>
<enum-type name="Flag" flags="Flags"/>
<enum-type name="Error"/>
- <modify-function signature="setVideoOutput(QVideoWidget *)">
+ <modify-function signature="setVideoOutput(QVideoWidget*)">
<modify-argument index="1">
<replace-type modified-type="QObject *" />
</modify-argument>
@@ -286,7 +286,7 @@
%END_ALLOW_THREADS
</inject-code>
</modify-function>
- <modify-function signature="setVideoOutput(QGraphicsVideoItem *)">
+ <modify-function signature="setVideoOutput(QGraphicsVideoItem*)">
<modify-argument index="1">
<replace-type modified-type="QObject *" />
</modify-argument>
@@ -307,9 +307,9 @@
<enum-type name="Error"/>
<enum-type name="State"/>
<enum-type name="Status"/>
- <modify-function signature="supportedAudioSampleRates(const QAudioEncoderSettings &amp;, bool *) const" remove="all"/>
- <modify-function signature="supportedFrameRates(const QVideoEncoderSettings &amp;, bool *) const" remove="all"/>
- <modify-function signature="supportedResolutions(const QVideoEncoderSettings &amp;, bool *) const" remove="all"/>
+ <modify-function signature="supportedAudioSampleRates(const QAudioEncoderSettings &amp;,bool*)const" remove="all"/>
+ <modify-function signature="supportedFrameRates(const QVideoEncoderSettings &amp;,bool*)const" remove="all"/>
+ <modify-function signature="supportedResolutions(const QVideoEncoderSettings &amp;,bool*)const" remove="all"/>
</object-type>
<object-type name="QMediaRecorderControl"/>
<value-type name="QMediaResource"/>
@@ -346,8 +346,8 @@
<object-type name="QVideoDeviceSelectorControl"/>
<value-type name="QVideoEncoderSettings"/>
<object-type name="QVideoEncoderSettingsControl">
- <modify-function signature="supportedFrameRates(const QVideoEncoderSettings &amp;, bool *) const" remove="all"/>
- <modify-function signature="supportedResolutions(const QVideoEncoderSettings &amp;, bool *) const" remove="all"/>
+ <modify-function signature="supportedFrameRates(const QVideoEncoderSettings &amp;,bool*)const" remove="all"/>
+ <modify-function signature="supportedResolutions(const QVideoEncoderSettings &amp;,bool*)const" remove="all"/>
</object-type>
<object-type name="QVideoFilterRunnable">
<enum-type name="RunFlag" flags="RunFlags"/>
diff --git a/sources/pyside2/PySide2/QtNetwork/typesystem_network.xml b/sources/pyside2/PySide2/QtNetwork/typesystem_network.xml
index 4e47c6ef5..94e6c77de 100644
--- a/sources/pyside2/PySide2/QtNetwork/typesystem_network.xml
+++ b/sources/pyside2/PySide2/QtNetwork/typesystem_network.xml
@@ -64,8 +64,8 @@
<enum-type name="SocketOption" since="4.6"/>
<enum-type name="SocketState"/>
<enum-type name="SocketType"/>
- <modify-function signature="connectToHost(const QString&amp;, quint16, QFlags&lt;QIODevice::OpenModeFlag>, QAbstractSocket::NetworkLayerProtocol)" allow-thread="yes" />
- <modify-function signature="connectToHost(const QHostAddress&amp;, quint16, QFlags&lt;QIODevice::OpenModeFlag>)" allow-thread="yes" />
+ <modify-function signature="connectToHost(const QString&amp;,quint16,QFlags&lt;QIODevice::OpenModeFlag>,QAbstractSocket::NetworkLayerProtocol)" allow-thread="yes" />
+ <modify-function signature="connectToHost(const QHostAddress&amp;,quint16,QFlags&lt;QIODevice::OpenModeFlag>)" allow-thread="yes" />
<modify-function signature="disconnectFromHost()" allow-thread="yes" />
<modify-function signature="waitForConnected(int)" allow-thread="yes" />
<modify-function signature="waitForDisconnected(int)" allow-thread="yes" />
@@ -91,7 +91,7 @@
</object-type>
<object-type name="QTcpSocket"/>
<object-type name="QUdpSocket">
- <modify-function signature="readDatagram(char*, qint64, QHostAddress*, quint16*)" allow-thread="yes">
+ <modify-function signature="readDatagram(char*,qint64,QHostAddress*,quint16*)" allow-thread="yes">
<modify-argument index="1">
<remove-argument/>
</modify-argument>
@@ -120,7 +120,7 @@
PyTuple_SET_ITEM(%PYARG_0, 2, %CONVERTTOPYTHON[quint16](port));
</inject-code>
</modify-function>
- <modify-function signature="writeDatagram(const QByteArray&amp;, const QHostAddress&amp;, quint16)" allow-thread="yes"/>
+ <modify-function signature="writeDatagram(const QByteArray&amp;,const QHostAddress&amp;,quint16)" allow-thread="yes"/>
<!-- ### writeDatagram(QByteArray, ...) does the trick -->
<modify-function signature="writeDatagram(const char*,qint64,const QHostAddress&amp;,quint16)" remove="all"/>
<!-- ### -->
@@ -153,18 +153,18 @@
<object-type name="QNetworkAccessManager">
<enum-type name="NetworkAccessibility" since="4.7"/>
<enum-type name="Operation"/>
- <modify-function signature="createRequest(QNetworkAccessManager::Operation, const QNetworkRequest&amp;, QIODevice *)">
+ <modify-function signature="createRequest(QNetworkAccessManager::Operation,const QNetworkRequest&amp;,QIODevice*)">
<modify-argument index="3" invalidate-after-use="yes"/>
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
<modify-function signature="get(const QNetworkRequest&amp;)" allow-thread="yes"/>
- <modify-function signature="post(const QNetworkRequest &amp;, QIODevice *)" allow-thread="yes"/>
- <modify-function signature="post(const QNetworkRequest &amp;, const QByteArray &amp;)" allow-thread="yes"/>
- <modify-function signature="put(const QNetworkRequest &amp;, QIODevice *)" allow-thread="yes"/>
- <modify-function signature="put(const QNetworkRequest &amp;, const QByteArray &amp;)" allow-thread="yes"/>
- <modify-function signature="sendCustomRequest(const QNetworkRequest &amp;, const QByteArray &amp;, QIODevice *)" allow-thread="yes" since="4.7" />
+ <modify-function signature="post(const QNetworkRequest &amp;,QIODevice*)" allow-thread="yes"/>
+ <modify-function signature="post(const QNetworkRequest &amp;,const QByteArray &amp;)" allow-thread="yes"/>
+ <modify-function signature="put(const QNetworkRequest &amp;,QIODevice*)" allow-thread="yes"/>
+ <modify-function signature="put(const QNetworkRequest &amp;,const QByteArray &amp;)" allow-thread="yes"/>
+ <modify-function signature="sendCustomRequest(const QNetworkRequest &amp;,const QByteArray &amp;,QIODevice*)" allow-thread="yes" since="4.7" />
<modify-function signature="setCookieJar(QNetworkCookieJar*)">
<modify-argument index="1">
<define-ownership class="target" owner="c++"/>
@@ -304,7 +304,7 @@
<object-type name="QSslSocket">
<enum-type name="SslMode"/>
<enum-type name="PeerVerifyMode"/>
- <modify-function signature="connectToHostEncrypted(const QString&amp;, quint16, QFlags&lt;QIODevice::OpenModeFlag>, QAbstractSocket::NetworkLayerProtocol)" allow-thread="yes" />
+ <modify-function signature="connectToHostEncrypted(const QString&amp;,quint16,QFlags&lt;QIODevice::OpenModeFlag>,QAbstractSocket::NetworkLayerProtocol)" allow-thread="yes" />
<modify-function signature="waitForEncrypted(int)" allow-thread="yes" />
</object-type>
<!-- The above entries may be present in the system or not. Keep this section organized. -->
diff --git a/sources/pyside2/PySide2/QtOpenGL/typesystem_opengl.xml b/sources/pyside2/PySide2/QtOpenGL/typesystem_opengl.xml
index 38cec3188..9b7adb71a 100644
--- a/sources/pyside2/PySide2/QtOpenGL/typesystem_opengl.xml
+++ b/sources/pyside2/PySide2/QtOpenGL/typesystem_opengl.xml
@@ -99,7 +99,7 @@
</modify-function>
<!-- ### Obsolete functions and ctors -->
- <modify-function signature="QGLContext(const QGLFormat&amp;, QPaintDevice*)" remove="all" />
+ <modify-function signature="QGLContext(const QGLFormat&amp;,QPaintDevice*)" remove="all" />
<!-- ### -->
</object-type>
<object-type name="QGLFramebufferObject">
@@ -115,7 +115,7 @@
<include file-name="QImage" location="global"/>
<include file-name="QPixmap" location="global"/>
</extra-includes>
- <modify-function signature="QGLWidget(QGLContext*, QWidget*, const QGLWidget*, QFlags&lt;Qt::WindowType&gt;)">
+ <modify-function signature="QGLWidget(QGLContext*,QWidget*,const QGLWidget*,QFlags&lt;Qt::WindowType&gt;)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
@@ -156,7 +156,7 @@
<object-type name="QGLShaderProgram" since="4.6">
<!-- setAttributeArray -->
- <modify-function signature="setAttributeArray(int, const QVector2D*, int)" rename="setAttributeArray2D">
+ <modify-function signature="setAttributeArray(int,const QVector2D*,int)" rename="setAttributeArray2D">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -169,7 +169,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setAttributeArray(int, const QVector3D*, int)" rename="setAttributeArray3D">
+ <modify-function signature="setAttributeArray(int,const QVector3D*,int)" rename="setAttributeArray3D">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -182,7 +182,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setAttributeArray(int, const QVector4D*, int)" rename="setAttributeArray4D">
+ <modify-function signature="setAttributeArray(int,const QVector4D*,int)" rename="setAttributeArray4D">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -195,7 +195,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setAttributeArray(const char*, const QVector2D*, int)" rename="setAttributeArray2D">
+ <modify-function signature="setAttributeArray(const char*,const QVector2D*,int)" rename="setAttributeArray2D">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -208,7 +208,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setAttributeArray(const char*, const QVector3D*, int)" rename="setAttributeArray3D">
+ <modify-function signature="setAttributeArray(const char*,const QVector3D*,int)" rename="setAttributeArray3D">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -221,7 +221,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setAttributeArray(const char*, const QVector4D*, int)" rename="setAttributeArray4D">
+ <modify-function signature="setAttributeArray(const char*,const QVector4D*,int)" rename="setAttributeArray4D">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -235,7 +235,7 @@
</modify-function>
<!-- setUniformValueArray -->
- <modify-function signature="setUniformValueArray(int, const GLint*, int)" rename="setUniformValueArrayInt">
+ <modify-function signature="setUniformValueArray(int,const GLint*,int)" rename="setUniformValueArrayInt">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -251,7 +251,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(int, const GLuint*, int)" rename="setUniformValueArrayUint">
+ <modify-function signature="setUniformValueArray(int,const GLuint*,int)" rename="setUniformValueArrayUint">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -267,7 +267,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(int, const QVector2D*, int)" rename="setUniformValueArray2D">
+ <modify-function signature="setUniformValueArray(int,const QVector2D*,int)" rename="setUniformValueArray2D">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -283,7 +283,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(int, const QVector3D*, int)" rename="setUniformValueArray3D">
+ <modify-function signature="setUniformValueArray(int,const QVector3D*,int)" rename="setUniformValueArray3D">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -299,7 +299,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(int, const QVector4D*, int)" rename="setUniformValueArray4D">
+ <modify-function signature="setUniformValueArray(int,const QVector4D*,int)" rename="setUniformValueArray4D">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -315,7 +315,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(int, const QMatrix2x2*, int)" rename="setUniformValueArray2x2">
+ <modify-function signature="setUniformValueArray(int,const QMatrix2x2*,int)" rename="setUniformValueArray2x2">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -331,7 +331,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(int, const QMatrix2x3*, int)" rename="setUniformValueArray2x3">
+ <modify-function signature="setUniformValueArray(int,const QMatrix2x3*,int)" rename="setUniformValueArray2x3">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -347,7 +347,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(int, const QMatrix2x4*, int)" rename="setUniformValueArray2x4">
+ <modify-function signature="setUniformValueArray(int,const QMatrix2x4*,int)" rename="setUniformValueArray2x4">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -363,7 +363,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(int, const QMatrix3x2*, int)" rename="setUniformValueArray3x2">
+ <modify-function signature="setUniformValueArray(int,const QMatrix3x2*,int)" rename="setUniformValueArray3x2">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -379,7 +379,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(int, const QMatrix3x3*, int)" rename="setUniformValueArray3x3">
+ <modify-function signature="setUniformValueArray(int,const QMatrix3x3*,int)" rename="setUniformValueArray3x3">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -395,7 +395,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(int, const QMatrix3x4*, int)" rename="setUniformValueArray3x4">
+ <modify-function signature="setUniformValueArray(int,const QMatrix3x4*,int)" rename="setUniformValueArray3x4">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -411,7 +411,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(int, const QMatrix4x2*, int)" rename="setUniformValueArray4x2">
+ <modify-function signature="setUniformValueArray(int,const QMatrix4x2*,int)" rename="setUniformValueArray4x2">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -427,7 +427,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(int, const QMatrix4x3*, int)" rename="setUniformValueArray4x3">
+ <modify-function signature="setUniformValueArray(int,const QMatrix4x3*,int)" rename="setUniformValueArray4x3">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -443,7 +443,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(int, const QMatrix4x4*, int)" rename="setUniformValueArray4x4">
+ <modify-function signature="setUniformValueArray(int,const QMatrix4x4*,int)" rename="setUniformValueArray4x4">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -459,7 +459,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(const char*, const GLint*, int)" rename="setUniformValueArrayInt">
+ <modify-function signature="setUniformValueArray(const char*,const GLint*,int)" rename="setUniformValueArrayInt">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -475,7 +475,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(const char*, const GLuint*, int)" rename="setUniformValueArrayUint">
+ <modify-function signature="setUniformValueArray(const char*,const GLuint*,int)" rename="setUniformValueArrayUint">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -491,7 +491,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(const char*, const QVector2D*, int)" rename="setUniformValueArray2D">
+ <modify-function signature="setUniformValueArray(const char*,const QVector2D*,int)" rename="setUniformValueArray2D">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -507,7 +507,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(const char*, const QVector3D*, int)" rename="setUniformValueArray3D">
+ <modify-function signature="setUniformValueArray(const char*,const QVector3D*,int)" rename="setUniformValueArray3D">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -523,7 +523,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(const char*, const QVector4D*, int)" rename="setUniformValueArray4D">
+ <modify-function signature="setUniformValueArray(const char*,const QVector4D*,int)" rename="setUniformValueArray4D">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -539,7 +539,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(const char*, const QMatrix2x2*, int)" rename="setUniformValueArray2x2">
+ <modify-function signature="setUniformValueArray(const char*,const QMatrix2x2*,int)" rename="setUniformValueArray2x2">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -555,7 +555,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(const char*, const QMatrix2x3*, int)" rename="setUniformValueArray2x3">
+ <modify-function signature="setUniformValueArray(const char*,const QMatrix2x3*,int)" rename="setUniformValueArray2x3">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -571,7 +571,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(const char*, const QMatrix2x4*, int)" rename="setUniformValueArray2x4">
+ <modify-function signature="setUniformValueArray(const char*,const QMatrix2x4*,int)" rename="setUniformValueArray2x4">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -587,7 +587,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(const char*, const QMatrix3x2*, int)" rename="setUniformValueArray3x2">
+ <modify-function signature="setUniformValueArray(const char*,const QMatrix3x2*,int)" rename="setUniformValueArray3x2">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -603,7 +603,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(const char*, const QMatrix3x3*, int)" rename="setUniformValueArray3x3">
+ <modify-function signature="setUniformValueArray(const char*,const QMatrix3x3*,int)" rename="setUniformValueArray3x3">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -619,7 +619,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(const char*, const QMatrix3x4*, int)" rename="setUniformValueArray3x4">
+ <modify-function signature="setUniformValueArray(const char*,const QMatrix3x4*,int)" rename="setUniformValueArray3x4">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -635,7 +635,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(const char*, const QMatrix4x2*, int)" rename="setUniformValueArray4x2">
+ <modify-function signature="setUniformValueArray(const char*,const QMatrix4x2*,int)" rename="setUniformValueArray4x2">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -651,7 +651,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(const char*, const QMatrix4x3*, int)" rename="setUniformValueArray4x3">
+ <modify-function signature="setUniformValueArray(const char*,const QMatrix4x3*,int)" rename="setUniformValueArray4x3">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -667,7 +667,7 @@
</inject-code>
</modify-function>
- <modify-function signature="setUniformValueArray(const char*, const QMatrix4x4*, int)" rename="setUniformValueArray4x4">
+ <modify-function signature="setUniformValueArray(const char*,const QMatrix4x4*,int)" rename="setUniformValueArray4x4">
<modify-argument index="2" >
<replace-type modified-type="PySequence" />
</modify-argument>
@@ -693,8 +693,8 @@
<!-- ### Use QMatrixZxY overloads -->
<modify-function signature="setAttributeValue(int,const GLfloat*,int,int)" remove="all" />
<modify-function signature="setAttributeValue(const char*,const GLfloat*,int,int)" remove="all" />
- <modify-function signature="setAttributeArray(int, GLenum, const void*, int, int)" remove="all" since="4.7" />
- <modify-function signature="setAttributeArray(const char*, GLenum, const void*, int, int)" remove="all" since="4.7" />
+ <modify-function signature="setAttributeArray(int,GLenum,const void*,int,int)" remove="all" since="4.7" />
+ <modify-function signature="setAttributeArray(const char*,GLenum,const void*,int,int)" remove="all" since="4.7" />
<!-- ### -->
</object-type>
@@ -703,7 +703,7 @@
<enum-type name="Access" since="4.7"/>
<enum-type name="Type" since="4.7"/>
<enum-type name="UsagePattern" since="4.7"/>
- <modify-function signature="allocate(const void*, int)">
+ <modify-function signature="allocate(const void*,int)">
<modify-argument index="1">
<replace-type modified-type="QByteArray&amp;"/>
</modify-argument>
@@ -730,7 +730,7 @@
}
</inject-code>
</modify-function>
- <modify-function signature="read(int, void*, int)">
+ <modify-function signature="read(int,void*,int)">
<modify-argument index="2">
<remove-argument/>
</modify-argument>
@@ -749,7 +749,7 @@
delete[] data;
</inject-code>
</modify-function>
- <modify-function signature="write(int, const void*, int)">
+ <modify-function signature="write(int,const void*,int)">
<modify-argument index="2">
<replace-type modified-type="QByteArray&amp;"/>
</modify-argument>
diff --git a/sources/pyside2/PySide2/QtPositioning/CMakeLists.txt b/sources/pyside2/PySide2/QtPositioning/CMakeLists.txt
new file mode 100644
index 000000000..3a2eb9cf5
--- /dev/null
+++ b/sources/pyside2/PySide2/QtPositioning/CMakeLists.txt
@@ -0,0 +1,55 @@
+project(QtPositioning)
+
+set(QtPositioning_OPTIONAL_SRC )
+set(QtPositioning_DROPPED_ENTRIES )
+
+set(QtPositioning_SRC
+${QtPositioning_GEN_DIR}/qgeoaddress_wrapper.cpp
+${QtPositioning_GEN_DIR}/qgeoareamonitorinfo_wrapper.cpp
+${QtPositioning_GEN_DIR}/qgeoareamonitorsource_wrapper.cpp
+${QtPositioning_GEN_DIR}/qgeolocation_wrapper.cpp
+${QtPositioning_GEN_DIR}/qgeocircle_wrapper.cpp
+${QtPositioning_GEN_DIR}/qgeocoordinate_wrapper.cpp
+${QtPositioning_GEN_DIR}/qgeopath_wrapper.cpp
+${QtPositioning_GEN_DIR}/qgeopositioninfo_wrapper.cpp
+${QtPositioning_GEN_DIR}/qgeopositioninfosource_wrapper.cpp
+${QtPositioning_GEN_DIR}/qgeopositioninfosourcefactory_wrapper.cpp
+${QtPositioning_GEN_DIR}/qgeorectangle_wrapper.cpp
+${QtPositioning_GEN_DIR}/qgeosatelliteinfo_wrapper.cpp
+${QtPositioning_GEN_DIR}/qgeosatelliteinfosource_wrapper.cpp
+${QtPositioning_GEN_DIR}/qgeoshape_wrapper.cpp
+${QtPositioning_GEN_DIR}/qnmeapositioninfosource_wrapper.cpp
+# module is always needed
+${QtPositioning_GEN_DIR}/qtpositioning_module_wrapper.cpp
+)
+
+if (Qt5Positioning_VERSION VERSION_EQUAL 5.10.0 OR Qt5Positioning_VERSION VERSION_GREATER 5.10.0)
+ list(APPEND QtPositioning_SRC
+ ${QtPositioning_GEN_DIR}/qgeopolygon_wrapper.cpp)
+endif()
+
+set(QtPositioning_include_dirs ${QtPositioning_SOURCE_DIR}
+ ${QtPositioning_BINARY_DIR}
+ ${Qt5Core_INCLUDE_DIRS}
+ ${Qt5Positioning_INCLUDE_DIRS}
+ ${SHIBOKEN_INCLUDE_DIR}
+ ${libpyside_SOURCE_DIR}
+ ${SHIBOKEN_PYTHON_INCLUDE_DIR}
+ ${QtCore_GEN_DIR})
+
+set(QtPositioning_libraries pyside2
+ ${SHIBOKEN_PYTHON_LIBRARIES}
+ ${SHIBOKEN_LIBRARY}
+ ${Qt5Positioning_LIBRARIES})
+
+set(QtPositioning_deps QtCore)
+
+create_pyside_module(QtPositioning
+ QtPositioning_include_dirs
+ QtPositioning_libraries
+ QtPositioning_deps
+ QtPositioning_SOURCE_DIR
+ QtPositioning_SRC
+ ""
+ ""
+ QtPositioning_DROPPED_ENTRIES)
diff --git a/sources/pyside2/PySide2/QtPositioning/typesystem_positioning.xml b/sources/pyside2/PySide2/QtPositioning/typesystem_positioning.xml
new file mode 100644
index 000000000..058994ad0
--- /dev/null
+++ b/sources/pyside2/PySide2/QtPositioning/typesystem_positioning.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of PySide2.
+**
+** $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$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide2.QtPositioning">
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+ <value-type name="QGeoAddress"/>
+ <value-type name="QGeoAreaMonitorInfo"/>
+ <object-type name="QGeoAreaMonitorSource">
+ <enum-type name="Error"/>
+ <enum-type name="AreaMonitorFeature" flags="AreaMonitorFeatures"/>
+ </object-type>
+ <value-type name="QGeoLocation"/>
+ <value-type name="QGeoCircle"/>
+ <value-type name="QGeoCoordinate">
+ <enum-type name="CoordinateType"/>
+ <enum-type name="CoordinateFormat"/>
+ </value-type>
+ <value-type name="QGeoPath"/>
+ <value-type name="QGeoPolygon" since="5.10"/>
+ <value-type name="QGeoPositionInfo">
+ <enum-type name="Attribute"/>
+ </value-type>
+ <object-type name="QGeoPositionInfoSource">
+ <enum-type name="Error"/>
+ <enum-type name="PositioningMethod" flags="PositioningMethods"/>
+ </object-type>
+ <object-type name="QGeoPositionInfoSourceFactory"/>
+ <value-type name="QGeoRectangle"/>
+ <value-type name="QGeoSatelliteInfo">
+ <enum-type name="Attribute"/>
+ <enum-type name="SatelliteSystem"/>
+ </value-type>
+ <object-type name="QGeoSatelliteInfoSource">
+ <enum-type name="Error"/>
+ </object-type>
+ <value-type name="QGeoShape">
+ <enum-type name="ShapeType"/>
+ </value-type>
+ <object-type name="QNmeaPositionInfoSource">
+ <enum-type name="UpdateMode"/>
+ </object-type>
+</typesystem>
diff --git a/sources/pyside2/PySide2/QtPrintSupport/typesystem_printsupport.xml b/sources/pyside2/PySide2/QtPrintSupport/typesystem_printsupport.xml
index 24f0de1d8..daf0ed763 100644
--- a/sources/pyside2/PySide2/QtPrintSupport/typesystem_printsupport.xml
+++ b/sources/pyside2/PySide2/QtPrintSupport/typesystem_printsupport.xml
@@ -50,7 +50,7 @@
<enum-type name="PrintDialogOption" flags="PrintDialogOptions" />
<enum-type name="PrintRange" />
</object-type>
-
+
<object-type name="QPrintDialog">
<modify-function signature="exec()" rename="exec_" allow-thread="yes" />
</object-type>
diff --git a/sources/pyside2/PySide2/QtQml/typesystem_qml.xml b/sources/pyside2/PySide2/QtQml/typesystem_qml.xml
index 54431a3af..385383fcc 100644
--- a/sources/pyside2/PySide2/QtQml/typesystem_qml.xml
+++ b/sources/pyside2/PySide2/QtQml/typesystem_qml.xml
@@ -54,7 +54,7 @@
in generator tests folder. -->
</primitive-type>
- <add-function signature="qmlRegisterType(PyTypeObject, const char*, int, int, const char*)" return-type="int">
+ <add-function signature="qmlRegisterType(PyTypeObject,const char*,int,int,const char*)" return-type="int">
<inject-documentation format="target" mode="append">
This function registers the Python type in the QML system with the name qmlName, in the library imported from uri having the version number composed from versionMajor and versionMinor.
Returns the QML type id.
@@ -123,7 +123,7 @@
<enum-type name="ObjectOwnership" />
</object-type>
<object-type name="QQmlExpression">
- <modify-function signature="evaluate(bool *)" allow-thread="yes">
+ <modify-function signature="evaluate(bool*)" allow-thread="yes">
<modify-argument index="1">
<remove-argument />
</modify-argument>
@@ -181,7 +181,7 @@
<object-type name="QQmlPropertyMap" />
<object-type name="QQmlPropertyValueSource" />
<value-type name="QQmlScriptString">
- <modify-function signature="numberLiteral(bool *) const" allow-thread="yes">
+ <modify-function signature="numberLiteral(bool*)const" allow-thread="yes">
<modify-argument index="1">
<remove-argument />
</modify-argument>
@@ -192,7 +192,7 @@
<insert-template name="fix_bool*"/>
</inject-code>
</modify-function>
- <modify-function signature="booleanLiteral(bool *) const" allow-thread="yes">
+ <modify-function signature="booleanLiteral(bool*)const" allow-thread="yes">
<modify-argument index="1">
<remove-argument />
</modify-argument>
diff --git a/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml b/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml
index 5183ec798..d9373e86d 100644
--- a/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml
+++ b/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml
@@ -70,7 +70,7 @@
<enum-type name="Flag" flags="Flags" />
<enum-type name="ItemChange" />
<enum-type name="TransformOrigin" />
- <modify-function signature="itemTransform(QQuickItem *, bool *) const" allow-thread="yes">
+ <modify-function signature="itemTransform(QQuickItem*,bool*)const" allow-thread="yes">
<modify-argument index="2">
<remove-argument />
</modify-argument>
diff --git a/sources/pyside2/PySide2/QtSensors/CMakeLists.txt b/sources/pyside2/PySide2/QtSensors/CMakeLists.txt
new file mode 100644
index 000000000..226625443
--- /dev/null
+++ b/sources/pyside2/PySide2/QtSensors/CMakeLists.txt
@@ -0,0 +1,106 @@
+project(QtSensors)
+
+set(QtSensors_OPTIONAL_SRC )
+set(QtSensors_DROPPED_ENTRIES )
+
+set(QtSensors_SRC
+# overrides QObject::metaObject() by private method
+# ${QtSensors_GEN_DIR}/qsensorgesture_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qsensorgesturemanager_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qsensorgestureplugininterface_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qsensorgesturerecognizer_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qaccelerometer_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qaccelerometerfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qaccelerometerreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qaltimeter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qaltimeterfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qaltimeterreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qambientlightfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qambientlightreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qambientlightsensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qambienttemperaturefilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qambienttemperaturereading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qambienttemperaturesensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qcompass_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qcompassfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qcompassreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qdistancefilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qdistancereading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qdistancesensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qgyroscope_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qgyroscopefilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qgyroscopereading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qholsterfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qholsterreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qholstersensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qhumidityfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qhumidityreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qhumiditysensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qirproximityfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qirproximityreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qirproximitysensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qlidfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qlidreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qlidsensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qlightfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qlightreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qlightsensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qmagnetometer_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qmagnetometerfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qmagnetometerreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qorientationfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qorientationreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qorientationsensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qpressurefilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qpressurereading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qpressuresensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qproximityfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qproximityreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qproximitysensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qrotationfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qrotationreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qrotationsensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qsensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qsensorfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qsensorreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qoutputrange_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qsensorbackend_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qsensorbackendfactory_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qsensormanager_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qsensorchangesinterface_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qsensorplugininterface_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qtapfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qtapreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qtapsensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qtiltfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qtiltreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qtiltsensor_wrapper.cpp
+# module is always needed
+ ${QtSensors_GEN_DIR}/qtsensors_module_wrapper.cpp
+)
+
+set(QtSensors_include_dirs ${QtSensors_SOURCE_DIR}
+ ${QtSensors_BINARY_DIR}
+ ${Qt5Core_INCLUDE_DIRS}
+ ${Qt5Sensors_INCLUDE_DIRS}
+ ${SHIBOKEN_INCLUDE_DIR}
+ ${libpyside_SOURCE_DIR}
+ ${SHIBOKEN_PYTHON_INCLUDE_DIR}
+ ${QtCore_GEN_DIR})
+
+set(QtSensors_libraries pyside2
+ ${SHIBOKEN_PYTHON_LIBRARIES}
+ ${SHIBOKEN_LIBRARY}
+ ${Qt5Sensors_LIBRARIES})
+
+set(QtSensors_deps QtCore)
+
+create_pyside_module(QtSensors
+ QtSensors_include_dirs
+ QtSensors_libraries
+ QtSensors_deps
+ QtSensors_SOURCE_DIR
+ QtSensors_SRC
+ ""
+ ""
+ QtSensors_DROPPED_ENTRIES)
diff --git a/sources/pyside2/PySide2/QtSensors/typesystem_sensors.xml b/sources/pyside2/PySide2/QtSensors/typesystem_sensors.xml
new file mode 100644
index 000000000..45d64e0a2
--- /dev/null
+++ b/sources/pyside2/PySide2/QtSensors/typesystem_sensors.xml
@@ -0,0 +1,127 @@
+<?xml version="1.0"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of PySide2.
+**
+** $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$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide2.QtSensors">
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+<!-- overrides QObject::metaObject() by private method
+ <object-type name="QSensorGesture"/>
+-->
+ <object-type name="QSensorGestureManager"/>
+ <object-type name="QSensorGesturePluginInterface"/>
+ <object-type name="QSensorGestureRecognizer"/>
+ <object-type name="QAccelerometer">
+ <enum-type name="AccelerationMode"/>
+ </object-type>
+ <object-type name="QAccelerometerFilter"/>
+ <object-type name="QAccelerometerReading"/>
+ <object-type name="QAltimeter"/>
+ <object-type name="QAltimeterFilter"/>
+ <object-type name="QAltimeterReading"/>
+ <object-type name="QAmbientLightFilter"/>
+ <object-type name="QAmbientLightReading">
+ <enum-type name="LightLevel"/>
+ </object-type>
+ <object-type name="QAmbientLightSensor"/>
+ <object-type name="QAmbientTemperatureFilter"/>
+ <object-type name="QAmbientTemperatureReading"/>
+ <object-type name="QAmbientTemperatureSensor"/>
+ <object-type name="QCompass"/>
+ <object-type name="QCompassFilter"/>
+ <object-type name="QCompassReading"/>
+ <object-type name="QDistanceFilter"/>
+ <object-type name="QDistanceReading"/>
+ <object-type name="QDistanceSensor"/>
+ <object-type name="QGyroscope"/>
+ <object-type name="QGyroscopeFilter"/>
+ <object-type name="QGyroscopeReading"/>
+ <object-type name="QHolsterFilter"/>
+ <object-type name="QHolsterReading"/>
+ <object-type name="QHolsterSensor"/>
+ <object-type name="QHumidityFilter"/>
+ <object-type name="QHumidityReading"/>
+ <object-type name="QHumiditySensor"/>
+ <object-type name="QIRProximityFilter"/>
+ <object-type name="QIRProximityReading"/>
+ <object-type name="QIRProximitySensor"/>
+ <object-type name="QLidFilter"/>
+ <object-type name="QLidReading"/>
+ <object-type name="QLidSensor"/>
+ <object-type name="QLightFilter"/>
+ <object-type name="QLightReading"/>
+ <object-type name="QLightSensor"/>
+ <object-type name="QMagnetometer"/>
+ <object-type name="QMagnetometerFilter"/>
+ <object-type name="QMagnetometerReading"/>
+ <object-type name="QOrientationFilter"/>
+ <object-type name="QOrientationReading">
+ <enum-type name="Orientation"/>
+ </object-type>
+ <object-type name="QOrientationSensor"/>
+ <object-type name="QPressureFilter"/>
+ <object-type name="QPressureReading"/>
+ <object-type name="QPressureSensor"/>
+ <object-type name="QProximityFilter"/>
+ <object-type name="QProximityReading"/>
+ <object-type name="QProximitySensor"/>
+ <object-type name="QRotationFilter"/>
+ <object-type name="QRotationReading"/>
+ <object-type name="QRotationSensor"/>
+ <object-type name="QSensor">
+ <enum-type name="Feature"/>
+ <enum-type name="AxesOrientationMode"/>
+ </object-type>
+ <object-type name="QSensorFilter"/>
+ <object-type name="QSensorReading"/>
+ <value-type name="qoutputrange"/>
+ <object-type name="QSensorBackend"/>
+ <object-type name="QSensorBackendFactory"/>
+ <object-type name="QSensorManager"/>
+ <object-type name="QSensorChangesInterface"/>
+ <object-type name="QSensorPluginInterface"/>
+ <object-type name="QTapFilter"/>
+ <object-type name="QTapReading">
+ <enum-type name="TapDirection"/>
+ </object-type>
+ <object-type name="QTapSensor"/>
+ <object-type name="QTiltFilter"/>
+ <object-type name="QTiltReading"/>
+ <object-type name="QTiltSensor"/>
+</typesystem>
diff --git a/sources/pyside2/PySide2/QtSql/typesystem_sql.xml b/sources/pyside2/PySide2/QtSql/typesystem_sql.xml
index 46836ef96..2e7222a16 100644
--- a/sources/pyside2/PySide2/QtSql/typesystem_sql.xml
+++ b/sources/pyside2/PySide2/QtSql/typesystem_sql.xml
@@ -52,7 +52,7 @@
<enum-type name="TableType"/>
<enum-type name="NumericalPrecisionPolicy"/>
<extra-includes>
- <include file-name="QtSql/qsql.h" location="global"/>
+ <include file-name="QtSql/qtsqlglobal.h" location="global"/>
</extra-includes>
</namespace-type>
@@ -71,7 +71,7 @@
<modify-function signature="commit()" allow-thread="yes" />
<modify-function signature="rollback()" allow-thread="yes" />
<modify-function signature="transaction()" allow-thread="yes" />
- <modify-function signature="registerSqlDriver(const QString &amp;, QSqlDriverCreatorBase*)">
+ <modify-function signature="registerSqlDriver(const QString&amp;,QSqlDriverCreatorBase*)">
<modify-argument index="2">
<define-ownership owner="c++"/>
</modify-argument>
@@ -87,7 +87,7 @@
<include file-name="QSize" location="global"/>
</extra-includes>
<modify-function signature="exec()" rename="exec_" allow-thread="yes" />
- <modify-function signature="exec(const QString &amp;)" rename="exec_" allow-thread="yes" />
+ <modify-function signature="exec(const QString&amp;)" rename="exec_" allow-thread="yes" />
<modify-function signature="prepare(const QString&amp;)" allow-thread="yes" />
<modify-function signature="clear()" allow-thread="yes" />
<modify-function signature="last()" allow-thread="yes" />
@@ -135,9 +135,9 @@
<modify-function signature="beginTransaction()" allow-thread="yes" />
<modify-function signature="commitTransaction()" allow-thread="yes" />
<modify-function signature="rollbackTransaction()" allow-thread="yes" />
- <modify-function signature="open(const QString &amp;, const QString&amp;, const QString&amp;, const QString&amp;, int, const QString&amp;)" allow-thread="yes" />
+ <modify-function signature="open(const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,int,const QString&amp;)" allow-thread="yes" />
<!-- ### This is too low level for Python, and pointer would be useless for the Python programmer -->
- <modify-function signature="handle() const" remove="all"/>
+ <modify-function signature="handle()const" remove="all"/>
<!-- ### -->
</object-type>
diff --git a/sources/pyside2/PySide2/QtSvg/typesystem_svg.xml b/sources/pyside2/PySide2/QtSvg/typesystem_svg.xml
index 059abb891..7d11970e7 100644
--- a/sources/pyside2/PySide2/QtSvg/typesystem_svg.xml
+++ b/sources/pyside2/PySide2/QtSvg/typesystem_svg.xml
@@ -52,7 +52,7 @@
</modify-argument>
</modify-function>
- <modify-function signature="outputDevice() const">
+ <modify-function signature="outputDevice()const">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
@@ -65,7 +65,7 @@
<parent index="1" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="QGraphicsSvgItem(const QString&amp;, QGraphicsItem*)">
+ <modify-function signature="QGraphicsSvgItem(const QString&amp;,QGraphicsItem*)">
<modify-argument index="this">
<parent index="2" action="add"/>
</modify-argument>
diff --git a/sources/pyside2/PySide2/QtTest/typesystem_test.xml b/sources/pyside2/PySide2/QtTest/typesystem_test.xml
index da26370a1..6b653d924 100644
--- a/sources/pyside2/PySide2/QtTest/typesystem_test.xml
+++ b/sources/pyside2/PySide2/QtTest/typesystem_test.xml
@@ -80,7 +80,7 @@
<rejection class="QTest" function-name="compare_helper"/>
<rejection class="QTest" function-name="toPrettyUnicode"/>
-
+
<rejection class="QTest" field-name="lastMouseButton"/>
<rejection class="QTest" field-name="lastMouseTimestamp"/>
@@ -89,8 +89,8 @@
The problem that costed my days of bug hunting is the fact that shiboken gives
misleading error messages. The messages that I could not get rid of were
- signature 'generateTouchEvent(QWidget*,QTouchDevice*,bool)' for function modification in 'QTest' not found. Possible candidates:
- signature 'generateTouchEvent(QWindow*,QTouchDevice*,bool)' for function modification in 'QTest' not found. Possible candidates:
+ signature 'generateTouchEvent(QWidget*,QTouchDevice*,bool)' for function modification in 'QTest' not found. Possible candidates:
+ signature 'generateTouchEvent(QWindow*,QTouchDevice*,bool)' for function modification in 'QTest' not found. Possible candidates:
I always thought that for some reason the functions were not recognized, or the arguments somehow
do not match their declaration. Only late in the project, I learnt that also
@@ -115,32 +115,32 @@
<rejection class="QTouchEventSequence"/>
<object-type name="PySideQTouchEventSequence" target-lang-name="QTouchEventSequence" since="4.6" >
- <modify-function signature="press(int, const QPoint&amp;, QWidget*)">
+ <modify-function signature="press(int,const QPoint&amp;,QWidget*)">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
- <modify-function signature="press(int, const QPoint&amp;, QWindow*)">
+ <modify-function signature="press(int,const QPoint&amp;,QWindow*)">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
- <modify-function signature="move(int, const QPoint&amp;, QWidget*)">
+ <modify-function signature="move(int,const QPoint&amp;,QWidget*)">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
- <modify-function signature="move(int, const QPoint&amp;, QWindow*)">
+ <modify-function signature="move(int,const QPoint&amp;,QWindow*)">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
- <modify-function signature="release(int, const QPoint&amp;, QWidget*)">
+ <modify-function signature="release(int,const QPoint&amp;,QWidget*)">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
- <modify-function signature="release(int, const QPoint&amp;, QWindow*)">
+ <modify-function signature="release(int,const QPoint&amp;,QWindow*)">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
@@ -151,12 +151,12 @@
</modify-argument>
</modify-function>
</object-type>
- <modify-function signature="generateTouchEvent(QWidget*, QTouchDevice*, bool)" rename="touchEvent" since="4.6">
+ <modify-function signature="generateTouchEvent(QWidget*,QTouchDevice*,bool)" rename="touchEvent" since="4.6">
<modify-argument index="return">
<define-ownership class="target" owner="target"/>
</modify-argument>
</modify-function>
- <modify-function signature="generateTouchEvent(QWindow*, QTouchDevice*, bool)" rename="touchEvent" since="4.6">
+ <modify-function signature="generateTouchEvent(QWindow*,QTouchDevice*,bool)" rename="touchEvent" since="4.6">
<modify-argument index="return">
<define-ownership class="target" owner="target"/>
</modify-argument>
diff --git a/sources/pyside2/PySide2/QtUiTools/typesystem_uitools.xml b/sources/pyside2/PySide2/QtUiTools/typesystem_uitools.xml
index f6dd0333b..f18b8e818 100644
--- a/sources/pyside2/PySide2/QtUiTools/typesystem_uitools.xml
+++ b/sources/pyside2/PySide2/QtUiTools/typesystem_uitools.xml
@@ -92,32 +92,32 @@
%CPPSELF.addPluginPath(""); // force reload widgets
</inject-code>
</add-function>
- <modify-function signature="createAction(QObject*, const QString&amp;)">
+ <modify-function signature="createAction(QObject*,const QString&amp;)">
<modify-argument index="return">
<parent index="1" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="createActionGroup(QObject*, const QString&amp;)">
+ <modify-function signature="createActionGroup(QObject*,const QString&amp;)">
<modify-argument index="return">
<parent index="1" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="createLayout(const QString&amp;, QObject*, const QString&amp;)">
+ <modify-function signature="createLayout(const QString&amp;,QObject*,const QString&amp;)">
<modify-argument index="return">
<parent index="2" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="createWidget(const QString&amp;, QWidget*, const QString&amp;)">
+ <modify-function signature="createWidget(const QString&amp;,QWidget*,const QString&amp;)">
<modify-argument index="return">
<parent index="2" action="add"/>
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
- <modify-function signature="load(QIODevice*, QWidget*)">
+ <modify-function signature="load(QIODevice*,QWidget*)">
<modify-argument index="2">
<replace-default-expression with="0" />
<rename to="parentWidget" />
@@ -132,7 +132,7 @@
</modify-function>
<!-- Syntax sugar -->
- <add-function signature="load(QString, QWidget*)" return-type="QWidget*">
+ <add-function signature="load(QString,QWidget*)" return-type="QWidget*">
<modify-argument index="2">
<replace-default-expression with="0" />
<rename to="parentWidget" />
diff --git a/sources/pyside2/PySide2/QtWebEngineCore/CMakeLists.txt b/sources/pyside2/PySide2/QtWebEngineCore/CMakeLists.txt
new file mode 100644
index 000000000..109b9f208
--- /dev/null
+++ b/sources/pyside2/PySide2/QtWebEngineCore/CMakeLists.txt
@@ -0,0 +1,37 @@
+project(QtWebEngineCore)
+
+set(QtWebEngineCore_SRC
+${QtWebEngineCore_GEN_DIR}/qwebenginecookiestore_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebenginehttprequest_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebengineurlrequestinfo_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebengineurlrequestinterceptor_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebengineurlrequestjob_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebengineurlschemehandler_wrapper.cpp
+# module is always needed
+${QtWebEngineCore_GEN_DIR}/qtwebenginecore_module_wrapper.cpp
+)
+
+set(QtWebEngineCore_include_dirs
+ ${QtWebEngineCore_SOURCE_DIR}
+ ${QtWebEngineCore_BINARY_DIR}
+ ${Qt5Core_INCLUDE_DIRS}
+ ${SHIBOKEN_INCLUDE_DIR}
+ ${libpyside_SOURCE_DIR}
+ ${SHIBOKEN_PYTHON_INCLUDE_DIR}
+ ${QtCore_GEN_DIR}
+ )
+set(QtWebEngineCore_libraries pyside2
+ ${SHIBOKEN_PYTHON_LIBRARIES}
+ ${SHIBOKEN_LIBRARY}
+ ${Qt5WebEngineCore_LIBRARIES}
+ ${Qt5Core_LIBRARIES}
+ )
+set(QtWebEngineCore_deps QtCore)
+create_pyside_module(QtWebEngineCore
+ QtWebEngineCore_include_dirs
+ QtWebEngineCore_libraries
+ QtWebEngineCore_deps
+ QtWebEngineCore_SOURCE_DIR
+ QtWebEngineCore_SRC
+ "")
+
diff --git a/sources/pyside2/PySide2/QtWebEngineCore/typesystem_webenginecore.xml b/sources/pyside2/PySide2/QtWebEngineCore/typesystem_webenginecore.xml
new file mode 100644
index 000000000..5fb064ccb
--- /dev/null
+++ b/sources/pyside2/PySide2/QtWebEngineCore/typesystem_webenginecore.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of PySide2.
+**
+** $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$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide2.QtWebEngineCore">
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+
+ <object-type name="QWebEngineCookieStore"/>
+
+ <object-type name="QWebEngineHttpRequest">
+ <enum-type name="Method"/>
+ <modify-function signature="QWebEngineHttpRequest(const QUrl &amp;, const QWebEngineHttpRequest::Method &amp;)">
+ <modify-argument index="2">
+ <replace-type modified-type="QWebEngineHttpRequest::Method"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+
+ <object-type name="QWebEngineUrlRequestInfo">
+ <enum-type name="NavigationType"/>
+ <enum-type name="ResourceType"/>
+ </object-type>
+
+ <object-type name="QWebEngineUrlRequestInterceptor"/>
+
+ <object-type name="QWebEngineUrlRequestJob">
+ <enum-type name="Error"/>
+ </object-type>
+
+ <object-type name="QWebEngineUrlSchemeHandler"/>
+
+</typesystem>
diff --git a/sources/pyside2/PySide2/QtWebEngineWidgets/CMakeLists.txt b/sources/pyside2/PySide2/QtWebEngineWidgets/CMakeLists.txt
index 32d0643c8..f04394de9 100644
--- a/sources/pyside2/PySide2/QtWebEngineWidgets/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtWebEngineWidgets/CMakeLists.txt
@@ -33,6 +33,7 @@ set(QtWebEngineWidgets_include_dirs
${QtWebEngineWidgets_GEN_DIR}
${QtNetwork_GEN_DIR}
${QtWebChannel_GEN_DIR}
+ ${QtWebEngineCore_GEN_DIR}
)
set(QtWebEngineWidgets_libraries pyside2
${SHIBOKEN_PYTHON_LIBRARIES}
diff --git a/sources/pyside2/PySide2/QtWebEngineWidgets/typesystem_webenginewidgets.xml b/sources/pyside2/PySide2/QtWebEngineWidgets/typesystem_webenginewidgets.xml
index 9462c3e41..41c8afcfe 100644
--- a/sources/pyside2/PySide2/QtWebEngineWidgets/typesystem_webenginewidgets.xml
+++ b/sources/pyside2/PySide2/QtWebEngineWidgets/typesystem_webenginewidgets.xml
@@ -45,6 +45,7 @@
<load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
<load-typesystem name="QtNetwork/typesystem_network.xml" generate="no"/>
<load-typesystem name="QtWebChannel/typesystem_webchannel.xml" generate="no"/>
+ <load-typesystem name="QtWebEngineCore/typesystem_webenginecore.xml" generate="no"/>
<object-type name="QWebEngineCertificateError">
@@ -53,6 +54,7 @@
<object-type name="QWebEngineDownloadItem">
<enum-type name="DownloadState" />
+ <enum-type name="SavePageFormat"/>
</object-type>
<!-- TODO: Deal with private constructor
diff --git a/sources/pyside2/PySide2/QtWebKitWidgets/typesystem_webkitwidgets.xml b/sources/pyside2/PySide2/QtWebKitWidgets/typesystem_webkitwidgets.xml
index 0f8d8da4e..3f51bedbf 100644
--- a/sources/pyside2/PySide2/QtWebKitWidgets/typesystem_webkitwidgets.xml
+++ b/sources/pyside2/PySide2/QtWebKitWidgets/typesystem_webkitwidgets.xml
@@ -53,7 +53,7 @@
<enum-type name="Extension"/>
<value-type name="Plugin"/>
<value-type name="MimeType"/>
- <modify-function signature="create(const QString &amp;, const QUrl &amp;, const QStringList &amp;, const QStringList &amp;) const">
+ <modify-function signature="create(const QString &amp;,const QUrl &amp;,const QStringList &amp;,const QStringList &amp;)const">
<modify-argument index="return">
<define-ownership class="native" owner="c++"/>
<define-ownership class="target" owner="target"/>
@@ -83,7 +83,7 @@
<reference-count action="set"/>
</modify-argument>
</modify-function>
- <modify-function signature="page() const">
+ <modify-function signature="page()const">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
@@ -162,7 +162,7 @@
<value-type name="ExtensionReturn" />
<value-type name="ViewportAttributes" />
- <modify-function signature="extension(QWebPage::Extension, const QWebPage::ExtensionOption*, QWebPage::ExtensionReturn*)">
+ <modify-function signature="extension(QWebPage::Extension,const QWebPage::ExtensionOption*,QWebPage::ExtensionReturn*)">
<template name="qwebpage_extension_argument_conversion">
PyObject* %out = 0;
// Cast the parameters according to the extension type
diff --git a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml
index 0555d9a53..98ffb2af7 100644
--- a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml
+++ b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml
@@ -201,7 +201,7 @@
<value-type name="QTableWidgetSelectionRange"/>
<value-type name="QTreeWidgetItemIterator" >
- <modify-function signature="QTreeWidgetItemIterator(QTreeWidget *, QFlags&lt;QTreeWidgetItemIterator::IteratorFlag&gt;)">
+ <modify-function signature="QTreeWidgetItemIterator(QTreeWidget*,QFlags&lt;QTreeWidgetItemIterator::IteratorFlag&gt;)">
<modify-argument index="this">
<parent index="1" action="add" />
</modify-argument>
@@ -270,7 +270,7 @@
PyObject *userTypeConstant = PyInt_FromLong(QGraphicsItem::UserType);
PyDict_SetItemString(Sbk_QGraphicsItem_Type.super.ht_type.tp_dict, "UserType", userTypeConstant);
</inject-code>
- <modify-function signature="setParentItem(QGraphicsItem *)">
+ <modify-function signature="setParentItem(QGraphicsItem*)">
<modify-argument index="this">
<parent index="1" action="add"/>
</modify-argument>
@@ -282,7 +282,7 @@
Shiboken::Object::setParent(pyParent, %PYARG_0);
}
</template>
- <modify-function signature="scene() const">
+ <modify-function signature="scene()const">
<inject-code position="end">
<insert-template name="scene_return_parenting"/>
</inject-code>
@@ -291,7 +291,7 @@
</modify-argument>
</modify-function>
- <modify-function signature="parentItem() const">
+ <modify-function signature="parentItem()const">
<modify-argument index="return">
<define-ownership owner="target"/>
</modify-argument>
@@ -299,7 +299,7 @@
<parent index="return" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="parentWidget() const">
+ <modify-function signature="parentWidget()const">
<modify-argument index="this">
<parent index="return" action="add"/>
</modify-argument>
@@ -435,12 +435,12 @@
<reference-count action="set"/>
</modify-argument>
</modify-function>
- <modify-function signature="setItemDelegateForColumn(int, QAbstractItemDelegate*)">
+ <modify-function signature="setItemDelegateForColumn(int,QAbstractItemDelegate*)">
<modify-argument index="2">
<reference-count action="set"/>
</modify-argument>
</modify-function>
- <modify-function signature="setItemDelegateForRow(int, QAbstractItemDelegate*)">
+ <modify-function signature="setItemDelegateForRow(int,QAbstractItemDelegate*)">
<modify-argument index="2">
<reference-count action="set"/>
</modify-argument>
@@ -450,21 +450,21 @@
<replace-default-expression with="QStyleOptionViewItem()" />
</modify-argument>
</modify-function>
- <modify-function signature="model() const">
+ <modify-function signature="model()const">
<modify-argument index="return">
<!-- Defining ownership as "default" avoids the object to be automatically
set as parent of the returned pointer. -->
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
- <modify-function signature="selectionModel() const">
+ <modify-function signature="selectionModel()const">
<modify-argument index="return">
<!-- Defining ownership as "default" avoids the object to be automatically
set as parent of the returned pointer. -->
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
- <modify-function signature="setIndexWidget(const QModelIndex &amp;, QWidget *)">
+ <modify-function signature="setIndexWidget(const QModelIndex &amp;,QWidget*)">
<modify-argument index="2">
<parent index="this" action="add"/>
</modify-argument>
@@ -672,12 +672,12 @@
</modify-function>
</object-type>
<object-type name="QItemEditorCreatorBase">
- <modify-function signature="createWidget(QWidget *) const">
+ <modify-function signature="createWidget(QWidget*)const">
<modify-argument index="1" invalidate-after-use="yes"/>
</modify-function>
</object-type>
<object-type name="QItemEditorFactory">
- <modify-function signature="registerEditor(int, QItemEditorCreatorBase *)">
+ <modify-function signature="registerEditor(int,QItemEditorCreatorBase*)">
<modify-argument index="2">
<reference-count action="set"/>
</modify-argument>
@@ -685,7 +685,7 @@
Shiboken::Object::releaseOwnership(%PYARG_2);
</inject-code>
</modify-function>
- <modify-function signature="setDefaultFactory(QItemEditorFactory *)">
+ <modify-function signature="setDefaultFactory(QItemEditorFactory*)">
<modify-argument index="1">
<define-ownership owner="c++"/>
</modify-argument>
@@ -761,7 +761,7 @@
</inject-code>
</modify-function>
- <modify-function signature="addDockWidget(Qt::DockWidgetArea, QDockWidget*)">
+ <modify-function signature="addDockWidget(Qt::DockWidgetArea,QDockWidget*)">
<modify-argument index="2">
<parent index="this" action="add"/>
</modify-argument>
@@ -772,7 +772,7 @@
</modify-argument>
</modify-function>
<!-- this fuction is declared when not defined QT_NO_TOOLBA -->
- <modify-function signature="addToolBar(Qt::ToolBarArea, QToolBar*)">
+ <modify-function signature="addToolBar(Qt::ToolBarArea,QToolBar*)">
<modify-argument index="2">
<parent index="this" action="add"/>
</modify-argument>
@@ -809,7 +809,7 @@
<enum-type name="AreaOption" flags="AreaOptions"/>
<enum-type name="ViewMode"/>
<enum-type name="WindowOrder"/>
- <modify-function signature="addSubWindow(QWidget*, QFlags&lt;Qt::WindowType&gt;)" >
+ <modify-function signature="addSubWindow(QWidget*,QFlags&lt;Qt::WindowType&gt;)" >
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
@@ -835,8 +835,8 @@
<inject-code class="native" position="beginning" file="glue/qmenu_glue.cpp"/>
<modify-function signature="exec()" rename="exec_" allow-thread="yes" />
- <modify-function signature="exec(const QPoint&amp;, QAction*)" rename="exec_" allow-thread="yes" />
- <modify-function signature="exec(QList&lt;QAction*>, const QPoint&amp;, QAction*, QWidget*)" rename="exec_" allow-thread="yes" />
+ <modify-function signature="exec(const QPoint&amp;,QAction*)" rename="exec_" allow-thread="yes" />
+ <modify-function signature="exec(QList&lt;QAction*>,const QPoint&amp;,QAction*,QWidget*)" rename="exec_" allow-thread="yes" />
<modify-function signature="addAction(const QString&amp;)">
<modify-argument index="return">
<parent index="this" action="add"/>
@@ -855,7 +855,7 @@
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="addMenu(const QIcon &amp;, const QString &amp;)">
+ <modify-function signature="addMenu(const QIcon &amp;,const QString &amp;)">
<modify-argument index="return">
<parent index="this" action="add"/>
</modify-argument>
@@ -873,7 +873,7 @@
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="addMenu(const QIcon &amp;, const QString &amp;)">
+ <modify-function signature="addMenu(const QIcon &amp;,const QString &amp;)">
<modify-argument index="return">
<parent index="this" action="add"/>
</modify-argument>
@@ -881,7 +881,7 @@
<!-- ### "setNoReplayFor(QWidget*)" is an internal method. -->
<modify-function signature="setNoReplayFor(QWidget*)" remove="all" />
- <add-function signature="addAction(QString&amp;, PyObject*, QKeySequence&amp;)">
+ <add-function signature="addAction(QString&amp;,PyObject*,QKeySequence&amp;)">
<modify-argument index="3">
<replace-default-expression with="0" />
</modify-argument>
@@ -894,7 +894,7 @@
</inject-code>
</add-function>
- <add-function signature="addAction(QIcon&amp;, QString&amp;, PyObject*, QKeySequence&amp;)">
+ <add-function signature="addAction(QIcon&amp;,QString&amp;,PyObject*,QKeySequence&amp;)">
<modify-argument index="4">
<replace-default-expression with="0" />
</modify-argument>
@@ -942,7 +942,7 @@
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <add-function signature="addAction(const QString&amp;, PyObject*)">
+ <add-function signature="addAction(const QString&amp;,PyObject*)">
<inject-code class="target" position="beginning">
%PYARG_0 = addActionWithPyObject(%CPPSELF, %1, %2);
</inject-code>
@@ -1006,7 +1006,7 @@
</object-type>
<object-type name="QShortcut">
- <add-function signature="QShortcut(QKeySequence&amp;, QWidget*, PyCallable*, Qt::ShortcutContext)">
+ <add-function signature="QShortcut(QKeySequence&amp;,QWidget*,PyCallable*,Qt::ShortcutContext)">
<modify-argument index="4">
<replace-default-expression with="Qt::WindowShortcut"/>
</modify-argument>
@@ -1022,22 +1022,22 @@
</object-type>
<object-type name="QSpacerItem"/>
<object-type name="QStatusBar">
- <modify-function signature="addWidget(QWidget*, int)">
+ <modify-function signature="addWidget(QWidget*,int)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="addPermanentWidget(QWidget*, int)">
+ <modify-function signature="addPermanentWidget(QWidget*,int)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="insertWidget(int, QWidget*, int)">
+ <modify-function signature="insertWidget(int,QWidget*,int)">
<modify-argument index="2">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="insertPermanentWidget(int, QWidget*, int)">
+ <modify-function signature="insertPermanentWidget(int,QWidget*,int)">
<modify-argument index="2">
<parent index="this" action="add"/>
</modify-argument>
@@ -1078,22 +1078,22 @@
</object-type>
<object-type name="QTimeEdit"/>
<object-type name="QToolBox">
- <modify-function signature="addItem(QWidget*, const QIcon&amp;, const QString&amp;)">
+ <modify-function signature="addItem(QWidget*,const QIcon&amp;,const QString&amp;)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="addItem(QWidget*, const QString&amp;)">
+ <modify-function signature="addItem(QWidget*,const QString&amp;)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="insertItem(int, QWidget*, const QIcon&amp;, const QString&amp;)">
+ <modify-function signature="insertItem(int,QWidget*,const QIcon&amp;,const QString&amp;)">
<modify-argument index="2">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="insertItem(int, QWidget*, const QString&amp;)">
+ <modify-function signature="insertItem(int,QWidget*,const QString&amp;)">
<modify-argument index="2">
<parent index="this" action="add"/>
</modify-argument>
@@ -1110,12 +1110,12 @@
</object-type>
<object-type name="QToolButton">
<enum-type name="ToolButtonPopupMode"/>
- <modify-function signature="setDefaultAction(QAction *)">
+ <modify-function signature="setDefaultAction(QAction*)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="setMenu(QMenu *)">
+ <modify-function signature="setMenu(QMenu*)">
</modify-function>
</object-type>
<object-type name="QToolTip"/>
@@ -1126,6 +1126,11 @@
<modify-function signature="drawRow(QPainter*,QStyleOptionViewItem,QModelIndex)const">
<modify-argument index="1" invalidate-after-use="yes"/>
</modify-function>
+ <modify-function signature="setHeader(QHeaderView*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
</object-type>
<object-type name="QUndoCommand">
<modify-function signature="mergeWith(const QUndoCommand*)">
@@ -1145,12 +1150,12 @@
</modify-function>
</object-type>
<object-type name="QUndoStack">
- <modify-function signature="createUndoAction(QObject*, const QString&amp;)const">
+ <modify-function signature="createUndoAction(QObject*,const QString&amp;)const">
<modify-argument index="return">
<parent index="1" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="createRedoAction(QObject*, const QString&amp;)const">
+ <modify-function signature="createRedoAction(QObject*,const QString&amp;)const">
<modify-argument index="return">
<parent index="1" action="add"/>
</modify-argument>
@@ -1162,22 +1167,22 @@
</modify-function>
</object-type>
<object-type name="QUndoView">
- <modify-function signature="setGroup(QUndoGroup *)">
+ <modify-function signature="setGroup(QUndoGroup*)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="setStack(QUndoStack *)">
+ <modify-function signature="setStack(QUndoStack*)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="QUndoView(QUndoGroup *,QWidget *)">
+ <modify-function signature="QUndoView(QUndoGroup*,QWidget*)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="QUndoView(QUndoStack *,QWidget *)">
+ <modify-function signature="QUndoView(QUndoStack*,QWidget*)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
@@ -1205,14 +1210,14 @@
</object-type>
<object-type name="QGraphicsSceneDragDropEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::GraphicsSceneDragEnter || %1-&gt;type() == QEvent::GraphicsSceneDragLeave || %1-&gt;type() == QEvent::GraphicsSceneDragMove || %1-&gt;type() == QEvent::GraphicsSceneDrop" >
<!-- ### "setMimeData(const QMimeData*)" is an internal method. -->
- <modify-function signature="setMimeData(const QMimeData *)" remove="all"/>
+ <modify-function signature="setMimeData(const QMimeData*)" remove="all"/>
<!-- ### "setSource(QWidget*)" is an internal method. -->
- <modify-function signature="setSource(QWidget *)" remove="all"/>
+ <modify-function signature="setSource(QWidget*)" remove="all"/>
<!-- ### -->
</object-type>
<object-type name="QGraphicsSceneEvent" copyable="false">
<!-- ### "setWidget(QWidget*)" is an internal method. -->
- <modify-function signature="setWidget(QWidget *)" remove="all"/>
+ <modify-function signature="setWidget(QWidget*)" remove="all"/>
</object-type>
<object-type name="QGraphicsSceneMoveEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::GraphicsSceneMove" />
<object-type name="QGraphicsSceneResizeEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::GraphicsSceneResize" />
@@ -1282,7 +1287,7 @@
<rename to="widget" />
</modify-argument>
</modify-function>
- <modify-function signature="hitTestComplexControl(QStyle::ComplexControl, const QStyleOptionComplex*, const QPoint&amp;, const QWidget*)const">
+ <modify-function signature="hitTestComplexControl(QStyle::ComplexControl,const QStyleOptionComplex*,const QPoint&amp;,const QWidget*)const">
<modify-argument index="4">
<replace-default-expression with="0"/>
<rename to="widget" />
@@ -1300,9 +1305,9 @@
</object-type>
<object-type name="QColorDialog">
<enum-type name="ColorDialogOption" flags="ColorDialogOptions"/>
- <modify-function signature="getColor(const QColor&amp;, QWidget*, const QString&amp;, QFlags&lt;QColorDialog::ColorDialogOption>)" allow-thread="yes" />
+ <modify-function signature="getColor(const QColor&amp;,QWidget*,const QString&amp;,QFlags&lt;QColorDialog::ColorDialogOption>)" allow-thread="yes" />
<!-- Qt5: obsolete -->
- <modify-function signature="getRgba(unsigned int, bool*, QWidget*)" remove="all" />
+ <modify-function signature="getRgba(unsigned int,bool*,QWidget*)" remove="all" />
</object-type>
<object-type name="QLayout">
@@ -1351,12 +1356,12 @@
</inject-code>
</modify-function>
- <modify-function signature="addWidget(QWidget *)">
+ <modify-function signature="addWidget(QWidget*)">
<inject-code class="target" position="beginning">
addLayoutOwnership(%CPPSELF, %1);
</inject-code>
</modify-function>
- <modify-function signature="addChildWidget(QWidget *)">
+ <modify-function signature="addChildWidget(QWidget*)">
<inject-code class="target" position="beginning">
addLayoutOwnership(%CPPSELF, %1);
</inject-code>
@@ -1423,29 +1428,29 @@
<enum-type name="Direction" />
- <modify-function signature="addWidget(QWidget *, int, QFlags&lt;Qt::AlignmentFlag&gt;)">
+ <modify-function signature="addWidget(QWidget*,int,QFlags&lt;Qt::AlignmentFlag&gt;)">
<inject-code class="target" position="beginning">
addLayoutOwnership(%CPPSELF, %1);
</inject-code>
</modify-function>
- <modify-function signature="addLayout(QLayout *, int)">
+ <modify-function signature="addLayout(QLayout*,int)">
<inject-code class="target" position="beginning">
addLayoutOwnership(%CPPSELF, %1);
</inject-code>
</modify-function>
- <modify-function signature="insertWidget(int, QWidget *, int, QFlags&lt;Qt::AlignmentFlag&gt;)">
+ <modify-function signature="insertWidget(int,QWidget*,int,QFlags&lt;Qt::AlignmentFlag&gt;)">
<inject-code class="target" position="beginning">
addLayoutOwnership(%CPPSELF, %2);
</inject-code>
</modify-function>
- <modify-function signature="insertLayout(int, QLayout *, int)">
+ <modify-function signature="insertLayout(int,QLayout*,int)">
<inject-code class="target" position="beginning">
addLayoutOwnership(%CPPSELF, %2);
</inject-code>
</modify-function>
- <modify-function signature="insertItem(int, QLayoutItem *)">
+ <modify-function signature="insertItem(int,QLayoutItem*)">
<inject-code class="target" position="beginning">
addLayoutOwnership(%CPPSELF, %2);
</inject-code>
@@ -1464,7 +1469,7 @@
<object-type name="QGridLayout">
<inject-code class="native" position="beginning" file="glue/qlayout_help_functions.cpp"/>
- <modify-function signature="itemAtPosition (int, int) const">
+ <modify-function signature="itemAtPosition (int,int)const">
<modify-argument index="return">
<define-ownership owner="default"/>
</modify-argument>
@@ -1472,7 +1477,7 @@
addLayoutOwnership(%CPPSELF, %0);
</inject-code>
</modify-function>
- <modify-function signature="addWidget(QWidget *, int, int, QFlags&lt;Qt::AlignmentFlag&gt;)">
+ <modify-function signature="addWidget(QWidget*,int,int,QFlags&lt;Qt::AlignmentFlag&gt;)">
<modify-argument index="4">
<rename to="alignment"/>
</modify-argument>
@@ -1480,7 +1485,7 @@
addLayoutOwnership(%CPPSELF, %1);
</inject-code>
</modify-function>
- <modify-function signature="addWidget(QWidget *, int, int, int, int, QFlags&lt;Qt::AlignmentFlag&gt;)">
+ <modify-function signature="addWidget(QWidget*,int,int,int,int,QFlags&lt;Qt::AlignmentFlag&gt;)">
<modify-argument index="6">
<rename to="alignment"/>
</modify-argument>
@@ -1488,7 +1493,7 @@
addLayoutOwnership(%CPPSELF, %1);
</inject-code>
</modify-function>
- <modify-function signature="addLayout(QLayout *, int, int, QFlags&lt;Qt::AlignmentFlag&gt;)">
+ <modify-function signature="addLayout(QLayout*,int,int,QFlags&lt;Qt::AlignmentFlag&gt;)">
<modify-argument index="4">
<rename to="alignment"/>
</modify-argument>
@@ -1496,7 +1501,7 @@
addLayoutOwnership(%CPPSELF, %1);
</inject-code>
</modify-function>
- <modify-function signature="addLayout(QLayout *, int, int, int, int, QFlags&lt;Qt::AlignmentFlag&gt;)">
+ <modify-function signature="addLayout(QLayout*,int,int,int,int,QFlags&lt;Qt::AlignmentFlag&gt;)">
<modify-argument index="6">
<rename to="alignment"/>
</modify-argument>
@@ -1504,7 +1509,7 @@
addLayoutOwnership(%CPPSELF, %1);
</inject-code>
</modify-function>
- <modify-function signature="addItem(QLayoutItem *, int, int, int, int, QFlags&lt;Qt::AlignmentFlag&gt;)">
+ <modify-function signature="addItem(QLayoutItem*,int,int,int,int,QFlags&lt;Qt::AlignmentFlag&gt;)">
<modify-argument index="4">
<rename to="rowSpan"/>
</modify-argument>
@@ -1557,7 +1562,7 @@
<enum-type name="OptimizationFlag" flags="OptimizationFlags"/>
<enum-type name="ViewportAnchor"/>
<enum-type name="ViewportUpdateMode"/>
- <modify-function signature="setupViewport(QWidget *)" access="non-final"/>
+ <modify-function signature="setupViewport(QWidget*)" access="non-final"/>
<modify-function signature="setScene(QGraphicsScene*)">
<modify-argument index="1">
<reference-count action="set"/>
@@ -1589,7 +1594,7 @@
</modify-function>
<!-- TODO: Support conversions on virtual function -->
- <modify-function signature="drawItems(QPainter*, int, QGraphicsItem*[], const QStyleOptionGraphicsItem[])">
+ <modify-function signature="drawItems(QPainter*,int,QGraphicsItem*[],const QStyleOptionGraphicsItem[])">
<modify-argument index="2">
<remove-argument/>
<conversion-rule class="native">
@@ -1642,7 +1647,7 @@
<enum-type name="InputDialogOption"/>
<enum-type name="InputMode"/>
- <modify-function signature="getInt(QWidget*, const QString&amp;, const QString&amp;, int, int, int, int, bool*, QFlags&lt;Qt::WindowType&gt;)" allow-thread="yes">
+ <modify-function signature="getInt(QWidget*,const QString&amp;,const QString&amp;,int,int,int,int,bool*,QFlags&lt;Qt::WindowType&gt;)" allow-thread="yes">
<modify-argument index="8">
<remove-default-expression/>
<remove-argument/>
@@ -1652,7 +1657,7 @@
</inject-code>
</modify-function>
- <modify-function signature="getItem(QWidget*, const QString&amp;, const QString&amp;, const QStringList&amp;, int, bool, bool*, QFlags&lt;Qt::WindowType&gt;,QFlags&lt;Qt::InputMethodHint&gt;)" allow-thread="yes">
+ <modify-function signature="getItem(QWidget*,const QString&amp;,const QString&amp;,const QStringList&amp;,int,bool,bool*,QFlags&lt;Qt::WindowType&gt;,QFlags&lt;Qt::InputMethodHint&gt;)" allow-thread="yes">
<modify-argument index="7">
<remove-default-expression/>
<remove-argument/>
@@ -1662,7 +1667,7 @@
</inject-code>
</modify-function>
- <modify-function signature="getMultiLineText(QWidget*, const QString&amp;, const QString&amp;, const QString&amp;, bool*, QFlags&lt;Qt::WindowType&gt;, QFlags&lt;Qt::InputMethodHint&gt;)" allow-thread="yes">
+ <modify-function signature="getMultiLineText(QWidget*,const QString&amp;,const QString&amp;,const QString&amp;,bool*,QFlags&lt;Qt::WindowType&gt;,QFlags&lt;Qt::InputMethodHint&gt;)" allow-thread="yes">
<modify-argument index="5">
<remove-default-expression/>
<remove-argument/>
@@ -1672,7 +1677,7 @@
</inject-code>
</modify-function>
- <modify-function signature="getText(QWidget*, const QString&amp;, const QString&amp;, QLineEdit::EchoMode, const QString&amp;, bool*, QFlags&lt;Qt::WindowType&gt;,QFlags&lt;Qt::InputMethodHint&gt;)" allow-thread="yes">
+ <modify-function signature="getText(QWidget*,const QString&amp;,const QString&amp;,QLineEdit::EchoMode,const QString&amp;,bool*,QFlags&lt;Qt::WindowType&gt;,QFlags&lt;Qt::InputMethodHint&gt;)" allow-thread="yes">
<modify-argument index="6">
<remove-default-expression/>
<remove-argument/>
@@ -1682,7 +1687,7 @@
</inject-code>
</modify-function>
- <modify-function signature="getDouble(QWidget*, const QString&amp;, const QString&amp;, double, double, double, int, bool*, QFlags&lt;Qt::WindowType&gt;)" allow-thread="yes">
+ <modify-function signature="getDouble(QWidget*,const QString&amp;,const QString&amp;,double,double,double,int,bool*,QFlags&lt;Qt::WindowType&gt;)" allow-thread="yes">
<modify-argument index="8">
<remove-default-expression/>
<remove-argument/>
@@ -1786,29 +1791,29 @@
</modify-argument>
</modify-function>
- <modify-function signature="addEllipse(const QRectF&amp;, const QPen&amp;, const QBrush&amp;)">
+ <modify-function signature="addEllipse(const QRectF&amp;,const QPen&amp;,const QBrush&amp;)">
<modify-argument index="return">
<parent index="this" action="add" />
</modify-argument>
</modify-function>
- <modify-function signature="addEllipse(qreal, qreal, qreal, qreal, const QPen&amp;, const QBrush&amp;)">
+ <modify-function signature="addEllipse(qreal,qreal,qreal,qreal,const QPen&amp;,const QBrush&amp;)">
<modify-argument index="return">
<parent index="this" action="add" />
</modify-argument>
</modify-function>
- <modify-function signature="addLine(const QLineF&amp;, const QPen&amp;)">
+ <modify-function signature="addLine(const QLineF&amp;,const QPen&amp;)">
<modify-argument index="return">
<parent index="this" action="add" />
</modify-argument>
</modify-function>
- <modify-function signature="addLine(qreal, qreal, qreal, qreal, const QPen&amp;)">
+ <modify-function signature="addLine(qreal,qreal,qreal,qreal,const QPen&amp;)">
<modify-argument index="return">
<parent index="this" action="add" />
</modify-argument>
</modify-function>
- <modify-function signature="addPath(const QPainterPath&amp;, const QPen&amp;, const QBrush&amp;)">
+ <modify-function signature="addPath(const QPainterPath&amp;,const QPen&amp;,const QBrush&amp;)">
<modify-argument index="return">
<parent index="this" action="add" />
</modify-argument>
@@ -1818,28 +1823,28 @@
<parent index="this" action="add" />
</modify-argument>
</modify-function>
- <modify-function signature="addPolygon(const QPolygonF&amp;, const QPen&amp;, const QBrush&amp;)">
+ <modify-function signature="addPolygon(const QPolygonF&amp;,const QPen&amp;,const QBrush&amp;)">
<modify-argument index="return">
<parent index="this" action="add" />
</modify-argument>
</modify-function>
- <modify-function signature="addRect(const QRectF&amp;, const QPen&amp;, const QBrush&amp;)">
+ <modify-function signature="addRect(const QRectF&amp;,const QPen&amp;,const QBrush&amp;)">
<modify-argument index="return">
<parent index="this" action="add" />
</modify-argument>
</modify-function>
- <modify-function signature="addRect(qreal, qreal, qreal, qreal, const QPen&amp;, const QBrush&amp;)">
+ <modify-function signature="addRect(qreal,qreal,qreal,qreal,const QPen&amp;,const QBrush&amp;)">
<modify-argument index="return">
<parent index="this" action="add" />
</modify-argument>
</modify-function>
- <modify-function signature="addText(const QString&amp;, const QFont&amp;)">
+ <modify-function signature="addText(const QString&amp;,const QFont&amp;)">
<modify-argument index="return">
<parent index="this" action="add" />
</modify-argument>
</modify-function>
- <modify-function signature="addSimpleText(const QString&amp;, const QFont&amp;)">
+ <modify-function signature="addSimpleText(const QString&amp;,const QFont&amp;)">
<modify-argument index="return">
<parent index="this" action="add" />
</modify-argument>
@@ -1855,7 +1860,7 @@
</modify-function>
<!-- use glue code -->
- <modify-function signature="drawItems(QPainter*, int, QGraphicsItem**, const QStyleOptionGraphicsItem*, QWidget *)">
+ <modify-function signature="drawItems(QPainter*,int,QGraphicsItem**,const QStyleOptionGraphicsItem*,QWidget*)">
<modify-argument index="2">
<remove-argument/>
</modify-argument>
@@ -1902,10 +1907,15 @@
</modify-function>
</object-type>
<object-type name="QTreeWidget">
+ <modify-function signature="setItemWidget(QTreeWidgetItem*,int,QWidget*)">
+ <modify-argument index="3">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
<modify-function signature="dropMimeData(QTreeWidgetItem*,int,const QMimeData*,Qt::DropAction)">
<modify-argument index="1" invalidate-after-use="yes"/>
</modify-function>
- <modify-function signature="addTopLevelItem(QTreeWidgetItem *)">
+ <modify-function signature="addTopLevelItem(QTreeWidgetItem*)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
@@ -1920,12 +1930,12 @@
<parent index="1" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="insertTopLevelItem(int, QTreeWidgetItem *)">
+ <modify-function signature="insertTopLevelItem(int,QTreeWidgetItem*)">
<modify-argument index="2">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="insertTopLevelItems(int, const QList&lt;QTreeWidgetItem*&gt; &amp;)">
+ <modify-function signature="insertTopLevelItems(int,const QList&lt;QTreeWidgetItem*&gt; &amp;)">
<modify-argument index="2">
<parent index="this" action="add"/>
</modify-argument>
@@ -1982,22 +1992,22 @@
</object-type>
<object-type name="QListWidgetItem" >
<enum-type name="ItemType"/>
- <modify-function signature="QListWidgetItem(const QString&amp;, QListWidget*, int)">
+ <modify-function signature="QListWidgetItem(const QString&amp;,QListWidget*,int)">
<modify-argument index="this">
<parent index="2" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="QListWidgetItem(const QIcon&amp;, const QString&amp;, QListWidget*, int)">
+ <modify-function signature="QListWidgetItem(const QIcon&amp;,const QString&amp;,QListWidget*,int)">
<modify-argument index="this">
<parent index="3" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="QListWidgetItem(QListWidget*, int)">
+ <modify-function signature="QListWidgetItem(QListWidget*,int)">
<modify-argument index="this">
<parent index="1" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="listWidget() const">
+ <modify-function signature="listWidget()const">
<modify-argument index="return">
<define-ownership owner="target"/>
</modify-argument>
@@ -2048,37 +2058,37 @@
<modify-function signature="write(QDataStream&amp;)const">
<modify-argument index="1" invalidate-after-use="yes"/>
</modify-function>
- <modify-function signature="QTreeWidgetItem(QTreeWidget*, int)">
+ <modify-function signature="QTreeWidgetItem(QTreeWidget*,int)">
<modify-argument index="this">
<parent index="1" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="QTreeWidgetItem(QTreeWidget*, const QStringList&amp;, int)">
+ <modify-function signature="QTreeWidgetItem(QTreeWidget*,const QStringList&amp;,int)">
<modify-argument index="this">
<parent index="1" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="QTreeWidgetItem(QTreeWidget*, QTreeWidgetItem*, int)">
+ <modify-function signature="QTreeWidgetItem(QTreeWidget*,QTreeWidgetItem*,int)">
<modify-argument index="this">
<parent index="1" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="QTreeWidgetItem(QTreeWidgetItem *,int)">
+ <modify-function signature="QTreeWidgetItem(QTreeWidgetItem*,int)">
<modify-argument index="this">
<parent index="1" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="QTreeWidgetItem(QTreeWidgetItem*, const QStringList &amp;, int)">
+ <modify-function signature="QTreeWidgetItem(QTreeWidgetItem*,const QStringList &amp;,int)">
<modify-argument index="this">
<parent index="1" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="QTreeWidgetItem(QTreeWidgetItem*, QTreeWidgetItem*, int)">
+ <modify-function signature="QTreeWidgetItem(QTreeWidgetItem*,QTreeWidgetItem*,int)">
<modify-argument index="this">
<parent index="1" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="addChild(QTreeWidgetItem *)">
+ <modify-function signature="addChild(QTreeWidgetItem*)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
@@ -2088,12 +2098,12 @@
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="insertChild(int, QTreeWidgetItem *)">
+ <modify-function signature="insertChild(int,QTreeWidgetItem*)">
<modify-argument index="2">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="insertChildren(int, const QList&lt;QTreeWidgetItem*&gt; &amp;)">
+ <modify-function signature="insertChildren(int,const QList&lt;QTreeWidgetItem*&gt; &amp;)">
<modify-argument index="2">
<parent index="this" action="add"/>
</modify-argument>
@@ -2113,7 +2123,7 @@
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="parent() const">
+ <modify-function signature="parent()const">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
@@ -2124,7 +2134,7 @@
Shiboken::Object::setParent(%PYARG_0, %PYSELF);
</inject-code>
</modify-function>
- <modify-function signature="treeWidget() const">
+ <modify-function signature="treeWidget()const">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
@@ -2138,7 +2148,7 @@
</object-type>
<object-type name="QListWidget">
- <modify-function signature="setItemWidget(QListWidgetItem *, QWidget *)">
+ <modify-function signature="setItemWidget(QListWidgetItem*,QWidget*)">
<modify-argument index="2">
<parent index="1" action="add"/>
</modify-argument>
@@ -2148,7 +2158,7 @@
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="insertItem(int, QListWidgetItem*)">
+ <modify-function signature="insertItem(int,QListWidgetItem*)">
<modify-argument index="2">
<parent index="this" action="add"/>
</modify-argument>
@@ -2179,7 +2189,7 @@
<object-type name="QWidget">
<!-- Qt5: remove native event for now -->
- <modify-function signature="nativeEvent(const QByteArray &amp;, void *, long *)" remove="all" />
+ <modify-function signature="nativeEvent(const QByteArray &amp;,void*,long*)" remove="all" />
<extra-includes>
<include file-name="QIcon" location="global"/>
@@ -2196,7 +2206,7 @@
</modify-argument>
</modify-function>
- <modify-function signature="setParent(QWidget*, QFlags&lt;Qt::WindowType&gt;)">
+ <modify-function signature="setParent(QWidget*,QFlags&lt;Qt::WindowType&gt;)">
<modify-argument index="this">
<parent index="1" action="add"/>
</modify-argument>
@@ -2406,20 +2416,20 @@
</insert-template>
</inject-code>
</modify-function>
- <modify-function signature="insertAction(QAction*, QAction*)">
+ <modify-function signature="insertAction(QAction*,QAction*)">
<modify-argument index="2">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="setLayout(QLayout *)">
+ <modify-function signature="setLayout(QLayout*)">
<inject-code class="target" position="beginning">
qwidgetSetLayout(%CPPSELF, %1);
// %FUNCTION_NAME() - disable generation of function call.
</inject-code>
</modify-function>
<modify-function signature="raise()" rename="raise_" />
- <modify-function signature="setParent(QWidget*, QFlags&lt;Qt::WindowType>)">
+ <modify-function signature="setParent(QWidget*,QFlags&lt;Qt::WindowType>)">
<modify-argument index="this">
<parent index="1" action="add"/>
</modify-argument>
@@ -2445,26 +2455,26 @@
<include file-name="QPixmap" location="global"/>
</extra-includes>
- <modify-function signature="critical(QWidget*, const QString&amp;, const QString&amp;, QFlags&lt;QMessageBox::StandardButton&gt;, QMessageBox::StandardButton)" allow-thread="yes"/>
- <modify-function signature="information(QWidget*, const QString&amp;, const QString&amp;, QFlags&lt;QMessageBox::StandardButton&gt;, QMessageBox::StandardButton)" allow-thread="yes"/>
- <modify-function signature="question(QWidget*, const QString&amp;, const QString&amp;, QFlags&lt;QMessageBox::StandardButton&gt;, QMessageBox::StandardButton)" allow-thread="yes"/>
- <modify-function signature="warning(QWidget*, const QString&amp;, const QString&amp;, QFlags&lt;QMessageBox::StandardButton&gt;, QMessageBox::StandardButton)" allow-thread="yes"/>
- <modify-function signature="QMessageBox(const QString&amp;, const QString&amp;, QMessageBox::Icon, int, int, int, QWidget*, QFlags&lt;Qt::WindowType&gt;)" remove="all"/>
- <modify-function signature="critical(QWidget*, const QString&amp;, const QString&amp;, int, int, int)" remove="all"/>
- <modify-function signature="critical(QWidget*, const QString&amp;, const QString&amp;, const QString&amp;, const QString&amp;, const QString&amp;, int, int)" remove="all"/>
- <modify-function signature="information(QWidget*, const QString&amp;, const QString&amp;, int, int, int)" remove="all"/>
- <modify-function signature="information(QWidget*, const QString&amp;, const QString&amp;, const QString&amp;, const QString&amp;, const QString&amp;, int, int)" remove="all"/>
- <modify-function signature="question(QWidget*, const QString&amp;, const QString&amp;, int, int, int)" remove="all"/>
- <modify-function signature="question(QWidget*, const QString&amp;, const QString&amp;, const QString&amp;, const QString&amp;, const QString&amp;, int, int)" remove="all"/>
- <modify-function signature="warning(QWidget*, const QString&amp;, const QString&amp;, int, int, int)" remove="all"/>
- <modify-function signature="warning(QWidget*, const QString&amp;, const QString&amp;, const QString&amp;, const QString&amp;, const QString&amp;, int, int)" remove="all"/>
+ <modify-function signature="critical(QWidget*,const QString&amp;,const QString&amp;,QFlags&lt;QMessageBox::StandardButton&gt;,QMessageBox::StandardButton)" allow-thread="yes"/>
+ <modify-function signature="information(QWidget*,const QString&amp;,const QString&amp;,QFlags&lt;QMessageBox::StandardButton&gt;,QMessageBox::StandardButton)" allow-thread="yes"/>
+ <modify-function signature="question(QWidget*,const QString&amp;,const QString&amp;,QFlags&lt;QMessageBox::StandardButton&gt;,QMessageBox::StandardButton)" allow-thread="yes"/>
+ <modify-function signature="warning(QWidget*,const QString&amp;,const QString&amp;,QFlags&lt;QMessageBox::StandardButton&gt;,QMessageBox::StandardButton)" allow-thread="yes"/>
+ <modify-function signature="QMessageBox(const QString&amp;,const QString&amp;,QMessageBox::Icon,int,int,int,QWidget*,QFlags&lt;Qt::WindowType&gt;)" remove="all"/>
+ <modify-function signature="critical(QWidget*,const QString&amp;,const QString&amp;,int,int,int)" remove="all"/>
+ <modify-function signature="critical(QWidget*,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,int,int)" remove="all"/>
+ <modify-function signature="information(QWidget*,const QString&amp;,const QString&amp;,int,int,int)" remove="all"/>
+ <modify-function signature="information(QWidget*,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,int,int)" remove="all"/>
+ <modify-function signature="question(QWidget*,const QString&amp;,const QString&amp;,int,int,int)" remove="all"/>
+ <modify-function signature="question(QWidget*,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,int,int)" remove="all"/>
+ <modify-function signature="warning(QWidget*,const QString&amp;,const QString&amp;,int,int,int)" remove="all"/>
+ <modify-function signature="warning(QWidget*,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,int,int)" remove="all"/>
</object-type>
<object-type name="QAbstractSpinBox">
<enum-type name="ButtonSymbols"/>
<enum-type name="CorrectionMode"/>
<enum-type name="StepEnabledFlag" flags="StepEnabled"/>
- <modify-function signature="setLineEdit(QLineEdit *)">
+ <modify-function signature="setLineEdit(QLineEdit*)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
@@ -2477,7 +2487,7 @@
<insert-template name="return_QString"/>
</inject-code>
</modify-function>
- <modify-function signature="validate(QString &amp;, int &amp;)const">
+ <modify-function signature="validate(QString &amp;,int &amp;)const">
<modify-argument index="return">
<replace-type modified-type="PyObject"/>
<conversion-rule class="native">
@@ -2493,27 +2503,27 @@
<object-type name="QTabWidget">
<enum-type name="TabPosition"/>
<enum-type name="TabShape"/>
- <modify-function signature="addTab(QWidget*, const QString&amp;)">
+ <modify-function signature="addTab(QWidget*,const QString&amp;)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="addTab(QWidget*, const QIcon&amp;, const QString&amp;)">
+ <modify-function signature="addTab(QWidget*,const QIcon&amp;,const QString&amp;)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="insertTab(int, QWidget*, const QIcon&amp;, const QString&amp;)">
+ <modify-function signature="insertTab(int,QWidget*,const QIcon&amp;,const QString&amp;)">
<modify-argument index="2">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="insertTab(int, QWidget*, const QString&amp;)">
+ <modify-function signature="insertTab(int,QWidget*,const QString&amp;)">
<modify-argument index="2">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="setCornerWidget(QWidget*, Qt::Corner)">
+ <modify-function signature="setCornerWidget(QWidget*,Qt::Corner)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
@@ -2577,13 +2587,13 @@
</modify-function>
</object-type>
<object-type name="QLabel">
- <modify-function signature="setBuddy(QWidget *)">
+ <modify-function signature="setBuddy(QWidget*)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="setMovie(QMovie *)">
+ <modify-function signature="setMovie(QMovie*)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
@@ -2611,9 +2621,9 @@
</modify-argument>
</modify-function>
- <modify-function signature="getExistingDirectory(QWidget*, const QString&amp;, const QString&amp;, QFlags&lt;QFileDialog::Option>)" allow-thread="yes" />
- <modify-function signature="getExistingDirectoryUrl(QWidget*, const QString&amp;, const QUrl&amp;, QFlags&lt;QFileDialog::Option>, const QStringList&amp;)" />
- <modify-function signature="getOpenFileName(QWidget*, const QString&amp;, const QString&amp;, const QString&amp;, QString*, QFlags&lt;QFileDialog::Option&gt;)" allow-thread="yes">
+ <modify-function signature="getExistingDirectory(QWidget*,const QString&amp;,const QString&amp;,QFlags&lt;QFileDialog::Option>)" allow-thread="yes" />
+ <modify-function signature="getExistingDirectoryUrl(QWidget*,const QString&amp;,const QUrl&amp;,QFlags&lt;QFileDialog::Option>,const QStringList&amp;)" />
+ <modify-function signature="getOpenFileName(QWidget*,const QString&amp;,const QString&amp;,const QString&amp;,QString*,QFlags&lt;QFileDialog::Option&gt;)" allow-thread="yes">
<modify-argument index="return">
<replace-type modified-type="(fileName, selectedFilter)"/>
</modify-argument>
@@ -2625,7 +2635,7 @@
<insert-template name="return_for_QFileDialog"/>
</inject-code>
</modify-function>
- <modify-function signature="getOpenFileNames(QWidget*, const QString&amp;, const QString&amp;, const QString&amp;, QString*, QFlags&lt;QFileDialog::Option&gt;)" allow-thread="yes">
+ <modify-function signature="getOpenFileNames(QWidget*,const QString&amp;,const QString&amp;,const QString&amp;,QString*,QFlags&lt;QFileDialog::Option&gt;)" allow-thread="yes">
<modify-argument index="return">
<replace-type modified-type="(fileNames, selectedFilter)"/>
</modify-argument>
@@ -2638,7 +2648,7 @@
</inject-code>
</modify-function>
- <modify-function signature="getOpenFileUrl(QWidget*, const QString&amp;, const QUrl&amp;, const QString&amp;, QString*, QFlags&lt;QFileDialog::Option&gt;, const QStringList&amp;)" allow-thread="yes">
+ <modify-function signature="getOpenFileUrl(QWidget*,const QString&amp;,const QUrl&amp;,const QString&amp;,QString*,QFlags&lt;QFileDialog::Option&gt;,const QStringList&amp;)" allow-thread="yes">
<modify-argument index="return">
<replace-type modified-type="(fileName, selectedFilter)"/>
</modify-argument>
@@ -2651,7 +2661,7 @@
</inject-code>
</modify-function>
- <modify-function signature="getOpenFileUrls(QWidget*, const QString&amp;, const QUrl&amp;, const QString&amp;, QString *, QFlags&lt;QFileDialog::Option&gt;, const QStringList&amp;)" allow-thread="yes">
+ <modify-function signature="getOpenFileUrls(QWidget*,const QString&amp;,const QUrl&amp;,const QString&amp;,QString*,QFlags&lt;QFileDialog::Option&gt;,const QStringList&amp;)" allow-thread="yes">
<modify-argument index="return">
<replace-type modified-type="(fileName, selectedFilter)"/>
</modify-argument>
@@ -2664,7 +2674,7 @@
</inject-code>
</modify-function>
- <modify-function signature="getSaveFileName(QWidget*, const QString&amp;, const QString&amp;, const QString&amp;, QString*, QFlags&lt;QFileDialog::Option&gt;)" allow-thread="yes">
+ <modify-function signature="getSaveFileName(QWidget*,const QString&amp;,const QString&amp;,const QString&amp;,QString*,QFlags&lt;QFileDialog::Option&gt;)" allow-thread="yes">
<modify-argument index="return">
<replace-type modified-type="(fileName, selectedFilter)"/>
</modify-argument>
@@ -2677,7 +2687,7 @@
</inject-code>
</modify-function>
- <modify-function signature="getSaveFileUrl(QWidget*, const QString&amp;, const QUrl&amp;, const QString&amp;, QString*, QFlags&lt;QFileDialog::Option&gt;, const QStringList&amp;)" allow-thread="yes">
+ <modify-function signature="getSaveFileUrl(QWidget*,const QString&amp;,const QUrl&amp;,const QString&amp;,QString*,QFlags&lt;QFileDialog::Option&gt;,const QStringList&amp;)" allow-thread="yes">
<modify-argument index="return">
<replace-type modified-type="(fileName, selectedFilter)"/>
</modify-argument>
@@ -2705,7 +2715,7 @@
<object-type name="QScrollBar" />
<object-type name="QAbstractScrollArea">
<enum-type name="SizeAdjustPolicy"/>
- <modify-function signature="setViewport(QWidget *)">
+ <modify-function signature="setViewport(QWidget*)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
@@ -2746,7 +2756,7 @@
</object-type>
<object-type name="QRubberBand">
<enum-type name="Shape"/>
- <modify-function signature="QRubberBand(QRubberBand::Shape, QWidget*)">
+ <modify-function signature="QRubberBand(QRubberBand::Shape,QWidget*)">
<modify-argument index="this">
<parent index="2" action="add"/>
</modify-argument>
@@ -2756,12 +2766,12 @@
</modify-function>
</object-type>
<object-type name="QTableWidget">
- <modify-function signature="setHorizontalHeaderItem(int, QTableWidgetItem *)">
+ <modify-function signature="setHorizontalHeaderItem(int,QTableWidgetItem*)">
<modify-argument index="2">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="setItem(int, int, QTableWidgetItem *)">
+ <modify-function signature="setItem(int,int,QTableWidgetItem*)">
<modify-argument index="3">
<parent index="this" action="add"/>
</modify-argument>
@@ -2781,12 +2791,12 @@
<parent index="this" action="remove"/>
</modify-argument>
</modify-function>
- <modify-function signature="setItemPrototype(const QTableWidgetItem *)">
+ <modify-function signature="setItemPrototype(const QTableWidgetItem*)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="setVerticalHeaderItem(int, QTableWidgetItem *)">
+ <modify-function signature="setVerticalHeaderItem(int,QTableWidgetItem*)">
<modify-argument index="2">
<parent index="this" action="add"/>
</modify-argument>
@@ -2824,12 +2834,12 @@
</insert-template>
</inject-code>
</modify-function>
- <modify-function signature="addWidget(QWidget *)">
+ <modify-function signature="addWidget(QWidget*)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="insertWidget(int, QWidget *)">
+ <modify-function signature="insertWidget(int,QWidget*)">
<modify-argument index="2">
<parent index="this" action="add"/>
</modify-argument>
@@ -2875,7 +2885,7 @@
</modify-argument>
</modify-function>
<modify-function signature="del()" rename="del_" />
- <modify-function signature="getTextMargins(int*, int*, int*, int*) const">
+ <modify-function signature="getTextMargins(int*,int*,int*,int*)const">
<modify-argument index="0">
<replace-type modified-type="PyObject *" />
</modify-argument>
@@ -2971,19 +2981,19 @@
<object-type name="QTextBrowser"/>
<object-type name="QDoubleSpinBox"/>
<object-type name="QButtonGroup">
- <modify-function signature="addButton(QAbstractButton*, int)">
+ <modify-function signature="addButton(QAbstractButton*,int)">
<modify-argument index="1">
<parent index="this" action="add"/>
<no-null-pointer/>
</modify-argument>
</modify-function>
- <modify-function signature="removeButton(QAbstractButton *)">
+ <modify-function signature="removeButton(QAbstractButton*)">
<modify-argument index="1">
<parent index="this" action="add"/>
<no-null-pointer/>
</modify-argument>
</modify-function>
- <modify-function signature="setId(QAbstractButton *,int)">
+ <modify-function signature="setId(QAbstractButton*,int)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
@@ -3028,7 +3038,7 @@
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="addAction(const QIcon&amp;, const QString&amp;)">
+ <modify-function signature="addAction(const QIcon&amp;,const QString&amp;)">
<modify-argument index="return">
<parent index="this" action="add"/>
</modify-argument>
@@ -3104,23 +3114,23 @@
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="setItemDelegate(QAbstractItemDelegate *)">
+ <modify-function signature="setItemDelegate(QAbstractItemDelegate*)">
<modify-argument index="1">
<reference-count action="set"/>
<no-null-pointer/>
</modify-argument>
</modify-function>
- <modify-function signature="setView(QAbstractItemView *)">
+ <modify-function signature="setView(QAbstractItemView*)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="setLineEdit(QLineEdit *)">
+ <modify-function signature="setLineEdit(QLineEdit*)">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="setModel(QAbstractItemModel *)">
+ <modify-function signature="setModel(QAbstractItemModel*)">
<modify-argument index="1">
<no-null-pointer/>
<reference-count action="set"/>
@@ -3146,7 +3156,7 @@
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="print(QPagedPaintDevice*) const" rename="print_"/>
+ <modify-function signature="print(QPagedPaintDevice*)const" rename="print_"/>
</object-type>
<object-type name="QAction">
<enum-type name="ActionEvent"/>
@@ -3449,7 +3459,7 @@
</modify-function>
</object-type>
<object-type name="QGraphicsProxyWidget">
- <modify-function signature="QGraphicsProxyWidget(QGraphicsItem*, QFlags&lt;Qt::WindowType&gt;)">
+ <modify-function signature="QGraphicsProxyWidget(QGraphicsItem*,QFlags&lt;Qt::WindowType&gt;)">
<modify-argument index="this">
<parent index="1" action="add"/>
</modify-argument>
@@ -3631,7 +3641,7 @@
<enum-type name="PixmapPadMode"/>
</object-type>
- <object-type name="QGraphicsObject" since="4.6" />
+ <object-type name="QGraphicsObject" since="4.6" default-superclass="QGraphicsItem"/>
<object-type name="QGraphicsOpacityEffect" since="4.6"/>
<object-type name="QGraphicsRotation" since="4.6"/>
<object-type name="QGraphicsScale" since="4.6"/>
diff --git a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_mac.xml b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_mac.xml
index a2d665b0a..2dc29f815 100644
--- a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_mac.xml
+++ b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_mac.xml
@@ -49,7 +49,7 @@
<enum-type name="FocusRectPolicy"/>
<enum-type name="WidgetSizePolicy"/>
</object-type>
- -->
+ -->
<rejection class="QWidget" function-name="macCGHandle"/>
<rejection class="QWidget" function-name="macQDHandle"/>
</typesystem>
diff --git a/sources/pyside2/PySide2/QtXml/typesystem_xml.xml b/sources/pyside2/PySide2/QtXml/typesystem_xml.xml
index d78a1d77c..d5b2ec974 100644
--- a/sources/pyside2/PySide2/QtXml/typesystem_xml.xml
+++ b/sources/pyside2/PySide2/QtXml/typesystem_xml.xml
@@ -69,7 +69,7 @@
<value-type name="QDomDocument">
<!-- will be replaced in inject code -->
- <modify-function signature="setContent(const QByteArray&amp;, bool, QString*, int*, int*)">
+ <modify-function signature="setContent(const QByteArray&amp;,bool,QString*,int*,int*)">
<modify-argument index="3">
<remove-argument/>
<remove-default-expression/>
@@ -89,7 +89,7 @@
<insert-template name="qdomdocument_setcontent" />
</inject-code>
</modify-function>
- <modify-function signature="setContent(const QString&amp;, bool, QString*, int*, int*)">
+ <modify-function signature="setContent(const QString&amp;,bool,QString*,int*,int*)">
<modify-argument index="3">
<remove-argument/>
<remove-default-expression/>
@@ -109,7 +109,7 @@
<insert-template name="qdomdocument_setcontent" />
</inject-code>
</modify-function>
- <modify-function signature="setContent(QIODevice*, bool, QString*, int*, int*)">
+ <modify-function signature="setContent(QIODevice*,bool,QString*,int*,int*)">
<modify-argument index="3">
<remove-argument/>
<remove-default-expression/>
@@ -129,7 +129,7 @@
<insert-template name="qdomdocument_setcontent" />
</inject-code>
</modify-function>
- <modify-function signature="setContent(const QByteArray&amp;, QString*, int*, int*)">
+ <modify-function signature="setContent(const QByteArray&amp;,QString*,int*,int*)">
<modify-argument index="2">
<remove-argument/>
<remove-default-expression/>
@@ -209,7 +209,7 @@
<insert-template name="qdomdocument_setcontent" />
</inject-code>
</modify-function>
- <modify-function signature="setContent(const QString&amp;, QString*,int*,int*)">
+ <modify-function signature="setContent(const QString&amp;,QString*,int*,int*)">
<modify-argument index="2">
<remove-argument/>
<remove-default-expression/>
@@ -244,7 +244,7 @@
<value-type name="QDomNode">
<enum-type name="EncodingPolicy"/>
<enum-type name="NodeType"/>
- <modify-function signature="save(QTextStream&amp;, int, QDomNode::EncodingPolicy)const" allow-thread="yes"/>
+ <modify-function signature="save(QTextStream&amp;,int,QDomNode::EncodingPolicy)const" allow-thread="yes"/>
</value-type>
<value-type name="QDomNodeList" />
@@ -281,7 +281,7 @@
</template>
<object-type name="QXmlEntityResolver">
- <modify-function signature="resolveEntity(const QString&amp;, const QString&amp;, QXmlInputSource*&amp;)">
+ <modify-function signature="resolveEntity(const QString&amp;,const QString&amp;,QXmlInputSource*&amp;)">
<modify-argument index="3">
<remove-argument/>
</modify-argument>
@@ -308,7 +308,7 @@
<define-ownership owner="c++"/>
</modify-argument>
</modify-function>
- <modify-function signature="resolveEntity(const QString&amp;, const QString&amp;, QXmlInputSource*&amp;)">
+ <modify-function signature="resolveEntity(const QString&amp;,const QString&amp;,QXmlInputSource*&amp;)">
<modify-argument index="3">
<remove-argument/>
</modify-argument>
diff --git a/sources/pyside2/PySide2/QtXmlPatterns/typesystem_xmlpatterns.xml b/sources/pyside2/PySide2/QtXmlPatterns/typesystem_xmlpatterns.xml
index 888595ccc..c597b41d1 100644
--- a/sources/pyside2/PySide2/QtXmlPatterns/typesystem_xmlpatterns.xml
+++ b/sources/pyside2/PySide2/QtXmlPatterns/typesystem_xmlpatterns.xml
@@ -44,7 +44,7 @@
<object-type name="QXmlSchema" since="4.6" /> <!-- Qt scoped pointer does not allow declare this as value type -->
<object-type name="QXmlSchemaValidator" since="4.6">
- <modify-function signature="schema() const">
+ <modify-function signature="schema()const">
<modify-argument index="return">
<replace-type modified-type="QXmlSchema*"/>
<define-ownership owner="target"/>
@@ -70,7 +70,7 @@
<primitive-type name="PrefixCode"/>
<primitive-type name="LocalNameCode"/>
<!-- ### These methods aren't part of Qt public API -->
- <modify-function signature="QXmlName(QXmlName::NamespaceCode, QXmlName::LocalNameCode, QXmlName::PrefixCode)" remove="all"/>
+ <modify-function signature="QXmlName(QXmlName::NamespaceCode,QXmlName::LocalNameCode,QXmlName::PrefixCode)" remove="all"/>
<modify-function signature="setNamespaceURI(QXmlName::NamespaceCode)" remove="all" />
<modify-function signature="localName()const" remove="all" />
<modify-function signature="prefix()const" remove="all" />
@@ -101,7 +101,7 @@
<modify-function signature="kind()const" remove="all" />
<modify-function signature="isDeepEqual(const QXmlNodeModelIndex&amp;)const" remove="all" />
<modify-function signature="compareOrder(const QXmlNodeModelIndex &amp;)const" remove="all" />
- <modify-function signature="sendNamespaces(QAbstractXmlReceiver *)const" remove="all" />
+ <modify-function signature="sendNamespaces(QAbstractXmlReceiver*)const" remove="all" />
<modify-function signature="namespaceBindings()const" remove="all" />
<modify-function signature="namespaceForPrefix(QXmlName::PrefixCode)const" remove="all" />
<modify-function signature="stringValue()const" remove="all" />
diff --git a/sources/pyside2/PySide2/__init__.py.in b/sources/pyside2/PySide2/__init__.py.in
index 4ce266b69..f33b05e31 100644
--- a/sources/pyside2/PySide2/__init__.py.in
+++ b/sources/pyside2/PySide2/__init__.py.in
@@ -20,10 +20,16 @@ def _setupQtDirectories():
# Used by signature module.
os.environ["PYSIDE_PACKAGE_DIR"] = pyside_package_dir
- # On Windows add the PySide2\openssl folder (if it exists) to the
- # PATH so that the SSL DLLs can be found when Qt tries to dynamically
- # load them. Tell Qt to load them and then reset the PATH.
if sys.platform == 'win32':
+ # PATH has to contain the package directory, otherwise plugins
+ # won't be able to find their required Qt libraries (e.g. the
+ # svg image plugin won't find Qt5Svg.dll).
+ os.environ['PATH'] = pyside_package_dir + ";" + os.environ['PATH']
+
+ # On Windows add the PySide2\openssl folder (if it exists) to
+ # the PATH so that the SSL DLLs can be found when Qt tries to
+ # dynamically load them. Tell Qt to load them and then reset
+ # the PATH.
openssl_dir = os.path.join(pyside_package_dir, 'openssl')
if os.path.exists(openssl_dir):
path = os.environ['PATH']
diff --git a/sources/pyside2/PySide2/qt.conf.in b/sources/pyside2/PySide2/qt.conf.in
new file mode 100644
index 000000000..ff5b0a30e
--- /dev/null
+++ b/sources/pyside2/PySide2/qt.conf.in
@@ -0,0 +1,2 @@
+[Paths]
+Prefix = @QT_CONF_PREFIX@
diff --git a/sources/pyside2/PySide2/support/signature/qt_attribution.json b/sources/pyside2/PySide2/support/signature/qt_attribution.json
new file mode 100644
index 000000000..331b3e814
--- /dev/null
+++ b/sources/pyside2/PySide2/support/signature/qt_attribution.json
@@ -0,0 +1,12 @@
+{
+ "Id": "python",
+ "Name": "Python",
+ "QDocModule": "QtForPython",
+ "QtUsage": "Used for Qt for Python in the signature extension.",
+ "Description": "Qt for Python is an add-on for Python. The signature packages of PySide uses certain copied and adapted source files (inspect.py, backport_inspect.py, typing27.py, typing36.py). See the folder sources/pyside2/PySide2/support/signature .",
+ "Homepage": "http://www.python.org/",
+ "Version": "3.6.5",
+ "License": "PSF LICENSE AGREEMENT FOR PYTHON 3.6.5",
+ "LicenseFile": "backport_inspect.py",
+ "Copyright": "© Copyright 2001-2018, Python Software Foundation."
+}
diff --git a/sources/pyside2/libpyside/pyside.cpp b/sources/pyside2/libpyside/pyside.cpp
index b223edc6c..51bbb22e1 100644
--- a/sources/pyside2/libpyside/pyside.cpp
+++ b/sources/pyside2/libpyside/pyside.cpp
@@ -162,10 +162,10 @@ static void destructionVisitor(SbkObject* pyObj, void* data)
void destroyQCoreApplication()
{
- SignalManager::instance().clear();
QCoreApplication* app = QCoreApplication::instance();
if (!app)
return;
+ SignalManager::instance().clear();
Shiboken::BindingManager& bm = Shiboken::BindingManager::instance();
SbkObject* pyQApp = bm.retrieveWrapper(app);
@@ -442,6 +442,11 @@ static const unsigned char qt_resource_struct[] = {
0x0,0x0,0x0,0x16,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0
};
+// Note that setting QT_LOGGING_RULES for categories used before QCoreApplication is instantiated,
+// will only work on Qt 5.9.4+. On lower versions, it will appear that setting QT_LOGGING_RULES
+// does not affect lcPysideQtConf in any way.
+Q_LOGGING_CATEGORY(lcPySide2, "pyside2", QtWarningMsg)
+
bool registerInternalQtConf()
{
// Guard to ensure single registration.
@@ -449,18 +454,49 @@ bool registerInternalQtConf()
static bool registrationAttempted = false;
#else
static bool registrationAttempted = true;
+ qCDebug(lcPySide2) << "PySide2 was built without qt.conf modification support. "
+ "No special qt.conf behavior will be applied.";
#endif
static bool isRegistered = false;
if (registrationAttempted)
return isRegistered;
registrationAttempted = true;
+ // Support PyInstaller case when a qt.conf file might be provided next to the generated
+ // PyInstaller executable.
+ // This will disable the internal qt.conf which points to the PySide2 subdirectory (due to the
+ // subdirectory not existing anymore).
+ QString executablePath =
+#if PY_MAJOR_VERSION >= 3
+ QString::fromWCharArray(Py_GetProgramFullPath());
+#else
+ // Python 2 unfortunately returns a char* array instead of a wchar*, which means that on
+ // Windows if the executable path contains unicode characters, the returned path will be
+ // invalid. We can't use QCoreApplication::applicationFilePath because it requires an
+ // existing QCoreApplication instance despite being a static method.
+ // This means that a qt.conf near an executable won't be picked up correctly on
+ // Windows + Python 2.
+ QString::fromLocal8Bit(Py_GetProgramFullPath());
+#endif
+ QString appDirPath = QFileInfo(executablePath).absolutePath();
+ QString maybeQtConfPath = QDir(appDirPath).filePath(QStringLiteral("qt.conf"));
+ bool executableQtConfAvailable = QFileInfo::exists(maybeQtConfPath);
+ maybeQtConfPath = QDir::toNativeSeparators(maybeQtConfPath);
+ if (!executableQtConfAvailable) {
+ qCDebug(lcPySide2) << "No qt.conf found near executable at: " << maybeQtConfPath
+ << "\nTrying next candidates.";
+ }
+
// Allow disabling the usage of the internal qt.conf. This is necessary for tests to work,
// because tests are executed before the package is installed, and thus the Prefix specified
// in qt.conf would point to a not yet existing location.
bool disableInternalQtConf =
qEnvironmentVariableIntValue("PYSIDE_DISABLE_INTERNAL_QT_CONF") > 0 ? true : false;
- if (disableInternalQtConf) {
+ if (disableInternalQtConf || executableQtConfAvailable) {
+ if (executableQtConfAvailable)
+ qCDebug(lcPySide2) << "Using qt.conf found near executable at: " << maybeQtConfPath;
+ if (disableInternalQtConf)
+ qCDebug(lcPySide2) << "Internal qt.conf usage disabled via environment variable.";
registrationAttempted = true;
return false;
}
@@ -494,7 +530,14 @@ bool registerInternalQtConf()
// rccData needs to be static, otherwise when it goes out of scope, the Qt resource system
// will point to invalid memory.
- static QByteArray rccData = QByteArray("[Paths]\nPrefix = ") + prefixPath.toLocal8Bit();
+ static QByteArray rccData = QByteArray("[Paths]\nPrefix = ") + prefixPath.toLocal8Bit()
+#ifdef Q_OS_WIN
+ // LibraryExecutables needs to point to Prefix instead of ./bin because we don't
+ // currently conform to the Qt default directory layout on Windows. This is necessary
+ // for QtWebEngineCore to find the location of QtWebEngineProcess.exe.
+ + QByteArray("\nLibraryExecutables = ") + prefixPath.toLocal8Bit()
+#endif
+ ;
rccData.append('\n');
// The RCC data structure expects a 4-byte size value representing the actual data.
@@ -510,6 +553,9 @@ bool registerInternalQtConf()
reinterpret_cast<const unsigned char *>(
rccData.constData()));
+ if (isRegistered)
+ qCDebug(lcPySide2) << "Using internal qt.conf with prefix pointing to: " << prefixPath;
+
return isRegistered;
}
diff --git a/sources/pyside2/libpyside/pyside.h b/sources/pyside2/libpyside/pyside.h
index becb92208..d36965d7b 100644
--- a/sources/pyside2/libpyside/pyside.h
+++ b/sources/pyside2/libpyside/pyside.h
@@ -50,6 +50,7 @@
#include <QMetaType>
#include <QHash>
#include <QList>
+#include <QLoggingCategory>
struct SbkObjectType;
@@ -163,6 +164,8 @@ PYSIDE_API QString pyStringToQString(PyObject *str);
*/
PYSIDE_API bool registerInternalQtConf();
+Q_DECLARE_LOGGING_CATEGORY(lcPySide2)
+
} //namespace PySide
diff --git a/sources/pyside2/libpyside/signalmanager.cpp.in b/sources/pyside2/libpyside/signalmanager.cpp.in
index 08c57c218..ca176c693 100644
--- a/sources/pyside2/libpyside/signalmanager.cpp.in
+++ b/sources/pyside2/libpyside/signalmanager.cpp.in
@@ -116,19 +116,19 @@ namespace PySide {
PyObjectWrapper::PyObjectWrapper()
:m_me(Py_None)
{
- Py_INCREF(m_me);
+ Py_XINCREF(m_me);
}
PyObjectWrapper::PyObjectWrapper(PyObject* me)
: m_me(me)
{
- Py_INCREF(m_me);
+ Py_XINCREF(m_me);
}
PyObjectWrapper::PyObjectWrapper(const PyObjectWrapper &other)
: m_me(other.m_me)
{
- Py_INCREF(m_me);
+ Py_XINCREF(m_me);
}
PyObjectWrapper::~PyObjectWrapper()
@@ -139,13 +139,13 @@ PyObjectWrapper::~PyObjectWrapper()
return;
Shiboken::GilState gil;
- Py_DECREF(m_me);
+ Py_XDECREF(m_me);
}
PyObjectWrapper& PyObjectWrapper::operator=(const PySide::PyObjectWrapper& other)
{
- Py_INCREF(other.m_me);
- Py_DECREF(m_me);
+ Py_XINCREF(other.m_me);
+ Py_XDECREF(m_me);
m_me = other.m_me;
return *this;
}
diff --git a/sources/pyside2/tests/QtCore/qobject_inherits_test.py b/sources/pyside2/tests/QtCore/qobject_inherits_test.py
index 8c4c797a4..1d089776b 100644
--- a/sources/pyside2/tests/QtCore/qobject_inherits_test.py
+++ b/sources/pyside2/tests/QtCore/qobject_inherits_test.py
@@ -29,8 +29,12 @@
'''Test cases for QObject methods'''
import unittest
+import sys
-from PySide2.QtCore import QObject
+from PySide2.QtCore import QObject, QTimer
+from PySide2.QtWidgets import QApplication, QLabel, QVBoxLayout
+
+is_alive = None
class InheritsCase(unittest.TestCase):
'''Test case for QObject.inherits'''
@@ -87,5 +91,36 @@ class InheritsCase(unittest.TestCase):
self.assertRaises(TypeError, declareClass)
+ # PYSIDE-11:
+ # The takeOwnership() method was relying that the SbkObject
+ # had a converter, which it's not the case when multiple
+ # inheritance is used.
+ # The deleteLater() method uses the takeOwnership() to give
+ # control of the object to C++, so it can be remove once
+ # the destructor is called.
+ # The solution was to add a default case when the object
+ # is null under the pythonTypeIsValueType() method in shiboken.
+ def testDeleteMultipleInheritance(self):
+ app = QApplication(sys.argv)
+ class DerivedLabel(QLabel, QObject):
+ def __del__(self):
+ global is_alive
+ is_alive = False
+
+ global is_alive
+ child = DerivedLabel('Hello')
+ is_alive = True
+ parent = QVBoxLayout()
+ parent.addWidget(child)
+ parent.removeWidget(child)
+ child.deleteLater()
+ self.assertTrue(is_alive)
+ del child
+ self.assertTrue(is_alive)
+ QTimer.singleShot(100, app.quit)
+ app.exec_()
+ self.assertFalse(is_alive)
+
+
if __name__ == '__main__':
unittest.main()
diff --git a/sources/pyside2/tests/QtLocation/CMakeLists.txt b/sources/pyside2/tests/QtLocation/CMakeLists.txt
new file mode 100644
index 000000000..b97ac1098
--- /dev/null
+++ b/sources/pyside2/tests/QtLocation/CMakeLists.txt
@@ -0,0 +1 @@
+PYSIDE_TEST(location.py)
diff --git a/sources/pyside2/tests/QtLocation/location.py b/sources/pyside2/tests/QtLocation/location.py
new file mode 100644
index 000000000..ca964c46c
--- /dev/null
+++ b/sources/pyside2/tests/QtLocation/location.py
@@ -0,0 +1,41 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of PySide2.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit test for Location'''
+
+from PySide2.QtLocation import QGeoServiceProvider
+import unittest
+
+class QLocationTestCase(unittest.TestCase):
+ def test(self):
+ geoServiceProvider = QGeoServiceProvider("none")
+ self.assertEqual(geoServiceProvider.errorString(),
+ 'The geoservices provider none is not supported.')
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside2/tests/QtPositioning/CMakeLists.txt b/sources/pyside2/tests/QtPositioning/CMakeLists.txt
new file mode 100644
index 000000000..b9f7631b1
--- /dev/null
+++ b/sources/pyside2/tests/QtPositioning/CMakeLists.txt
@@ -0,0 +1 @@
+PYSIDE_TEST(positioning.py)
diff --git a/sources/pyside2/tests/QtPositioning/positioning.py b/sources/pyside2/tests/QtPositioning/positioning.py
new file mode 100644
index 000000000..9f61fe1ef
--- /dev/null
+++ b/sources/pyside2/tests/QtPositioning/positioning.py
@@ -0,0 +1,43 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of PySide2.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit test for Positioning'''
+
+from PySide2.QtPositioning import QGeoPositionInfoSource
+import unittest
+
+class QPositioningTestCase(unittest.TestCase):
+ def test(self):
+ source = QGeoPositionInfoSource.createDefaultSource(None)
+ self.assertTrue(source is not None)
+ name = source.sourceName()
+ print('QtPositioning source: {}'.format(name))
+ self.assertTrue(name)
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside2/tests/QtSensors/CMakeLists.txt b/sources/pyside2/tests/QtSensors/CMakeLists.txt
new file mode 100644
index 000000000..87e548f87
--- /dev/null
+++ b/sources/pyside2/tests/QtSensors/CMakeLists.txt
@@ -0,0 +1 @@
+PYSIDE_TEST(sensors.py)
diff --git a/sources/pyside2/tests/QtSensors/sensors.py b/sources/pyside2/tests/QtSensors/sensors.py
new file mode 100644
index 000000000..5b41ac63d
--- /dev/null
+++ b/sources/pyside2/tests/QtSensors/sensors.py
@@ -0,0 +1,55 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of PySide2.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QSensor'''
+
+from PySide2.QtSensors import QSensor, QSensorReading
+import unittest
+
+class QSensorTest(unittest.TestCase):
+ def test(self):
+ for sensorType in QSensor.sensorTypes():
+ identifiers = QSensor.sensorsForType(sensorType)
+ values = []
+ usedIdentifier = None
+ for identifier in identifiers:
+ sensor = QSensor(sensorType, None);
+ sensor.setIdentifier(identifier)
+ if sensor.connectToBackend():
+ usedIdentifier = identifier
+ reading = sensor.reading()
+ for i in range(0, reading.valueCount()):
+ values.append(reading.value(i))
+ break
+ if usedIdentifier:
+ print('Sensor ', sensorType, usedIdentifier, values)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtWebEngineCore/CMakeLists.txt b/sources/pyside2/tests/QtWebEngineCore/CMakeLists.txt
new file mode 100644
index 000000000..2e361383c
--- /dev/null
+++ b/sources/pyside2/tests/QtWebEngineCore/CMakeLists.txt
@@ -0,0 +1,29 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of PySide2.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+PYSIDE_TEST(web_engine_custom_scheme.py)
diff --git a/sources/pyside2/tests/QtWebEngineCore/web_engine_custom_scheme.py b/sources/pyside2/tests/QtWebEngineCore/web_engine_custom_scheme.py
new file mode 100644
index 000000000..b7c57d8e6
--- /dev/null
+++ b/sources/pyside2/tests/QtWebEngineCore/web_engine_custom_scheme.py
@@ -0,0 +1,64 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of PySide2.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function
+
+import unittest
+
+from PySide2.QtCore import QBuffer, QTimer
+from PySide2.QtWidgets import QApplication
+from PySide2.QtWebEngineWidgets import QWebEngineView, QWebEngineProfile
+from PySide2.QtWebEngineCore import QWebEngineUrlSchemeHandler
+
+class TestSchemeHandler(QWebEngineUrlSchemeHandler):
+ def requestStarted(self, request):
+ if request.requestUrl() == "testpy:hello":
+ request.redirect("testpy:goodbye")
+ return
+
+ self.buffer = QBuffer()
+ self.buffer.setData("Really nice goodbye text.")
+ self.buffer.aboutToClose.connect(self.buffer.deleteLater)
+ request.reply("text/plain;charset=utf-8", self.buffer)
+
+class MainTest(unittest.TestCase):
+ def test_SchemeHandlerRedirect(self):
+ app = QApplication([])
+ handler = TestSchemeHandler()
+ profile = QWebEngineProfile.defaultProfile()
+ profile.installUrlSchemeHandler("testpy", handler)
+ view = QWebEngineView()
+ view.loadFinished.connect(app.quit)
+ QTimer.singleShot(5000, app.quit)
+ view.show()
+ view.load("testpy:hello")
+ app.exec_()
+ self.assertEqual(view.url(), "testpy:goodbye")
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtWebEngineWidgets/pyside-474-qtwebengineview.py b/sources/pyside2/tests/QtWebEngineWidgets/pyside-474-qtwebengineview.py
index 6ea3aa95a..b4aef26d1 100644
--- a/sources/pyside2/tests/QtWebEngineWidgets/pyside-474-qtwebengineview.py
+++ b/sources/pyside2/tests/QtWebEngineWidgets/pyside-474-qtwebengineview.py
@@ -39,11 +39,7 @@ class MainTest(unittest.TestCase):
qApp = (QtWidgets.QApplication.instance() or
QtWidgets.QApplication([]))
view = QtWebEngineWidgets.QWebEngineView()
- with self.assertRaises(TypeError):
- view.findText(123)
view.findText("nothing")
- # we are testing only the existence of the function,
- # after it suddenly showed up.
if __name__ == '__main__':
unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/CMakeLists.txt b/sources/pyside2/tests/QtWidgets/CMakeLists.txt
index fa64d1c3b..9caf7e365 100644
--- a/sources/pyside2/tests/QtWidgets/CMakeLists.txt
+++ b/sources/pyside2/tests/QtWidgets/CMakeLists.txt
@@ -82,6 +82,7 @@ PYSIDE_TEST(parent_method_test.py)
PYSIDE_TEST(python_properties_test.py)
PYSIDE_TEST(qabstracttextdocumentlayout_test.py)
PYSIDE_TEST(qaction_test.py)
+PYSIDE_TEST(qapp_issue_585.py)
PYSIDE_TEST(qapp_test.py)
PYSIDE_TEST(qapplication_exit_segfault_test.py)
PYSIDE_TEST(qapplication_singleton_test.py)
@@ -92,6 +93,7 @@ PYSIDE_TEST(qdynamic_signal.py)
PYSIDE_TEST(qformlayout_test.py)
PYSIDE_TEST(qgraphicsitem_test.py)
PYSIDE_TEST(qgraphicsitem_isblocked_test.py)
+PYSIDE_TEST(qgraphicsobjectreimpl_test.py)
PYSIDE_TEST(qgraphicsproxywidget_test.py)
PYSIDE_TEST(qgraphicsscene_test.py)
PYSIDE_TEST(qimage_test.py)
@@ -121,6 +123,7 @@ PYSIDE_TEST(qtabwidgetclear_test.py)
PYSIDE_TEST(qtextedit_test.py)
PYSIDE_TEST(qtextedit_signal_test.py)
PYSIDE_TEST(qtreeview_test.py)
+PYSIDE_TEST(qtreewidget_test.py)
PYSIDE_TEST(qtoolbar_test.py)
PYSIDE_TEST(qtoolbox_test.py)
PYSIDE_TEST(qvariant_test.py)
diff --git a/sources/pyside2/tests/QtWidgets/qapp_issue_585.py b/sources/pyside2/tests/QtWidgets/qapp_issue_585.py
new file mode 100644
index 000000000..9dd2014c0
--- /dev/null
+++ b/sources/pyside2/tests/QtWidgets/qapp_issue_585.py
@@ -0,0 +1,68 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of PySide2.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""
+The bug was caused by this commit:
+"Support the qApp macro correctly, final version incl. debug"
+e30e0c161b2b4d50484314bf006e9e5e8ff6b380
+2017-10-27
+
+The bug was first solved by this commit:
+"Fix qApp macro refcount"
+b811c874dedd14fd8b072bc73761d39255216073
+2018-03-21
+
+This test triggers the refcounting bug of qApp, issue PYSIDE-585.
+Finally, the real patch included more changes, because another error
+was in the ordering of shutdown calls. It was found using the following
+Python configuration:
+
+ In Python 3.6 create a directory 'debug' and cd into it.
+
+ ../configure --with-pydebug --prefix=$HOME/pydebug/ --enable-shared
+
+Then a lot more refcounting errors show up, which are due to a bug in
+the code position of the shutdown procedure.
+The reason for the initial refcount bug was that the shutdown code is once
+more often called than the creation of the qApp wrapper.
+Finally, it was easiest and more intuitive to simply make the refcount of
+qApp_content equal to that of Py_None, which is also not supposed to be
+garbage-collected.
+
+For some reason, the test does not work as a unittest because it creates
+no crash. We leave it this way.
+"""
+
+from PySide2.QtCore import QTimer
+from PySide2 import QtWidgets
+
+app_instance = QtWidgets.QApplication([])
+# If the following line is commented, application doesn't crash on exit anymore.
+app_instance2 = app_instance
+QTimer.singleShot(0, qApp.quit)
+app_instance.exec_()
diff --git a/sources/pyside2/tests/QtWidgets/qgraphicsobjectreimpl_test.py b/sources/pyside2/tests/QtWidgets/qgraphicsobjectreimpl_test.py
new file mode 100644
index 000000000..fd79ce3aa
--- /dev/null
+++ b/sources/pyside2/tests/QtWidgets/qgraphicsobjectreimpl_test.py
@@ -0,0 +1,76 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of PySide2.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' Test cases related to QGraphicsItem and subclasses'''
+
+import unittest
+
+from PySide2.QtWidgets import QGraphicsObject, QGraphicsWidget
+from PySide2.QtCore import QRectF
+
+from helper import UsesQApplication
+
+class GObjA(QGraphicsObject):
+ def paint(self, *args):
+ pass
+
+ def boundingRect(self):
+ return QRectF()
+
+ def itemChange(self, *args):
+ return QGraphicsObject.itemChange(self, *args)
+
+class GObjB(QGraphicsObject):
+ def paint(self, *args):
+ pass
+
+ def boundingRect(self):
+ return QRectF()
+
+class QGraphicsObjectReimpl(UsesQApplication):
+ '''Test case for reimplementing QGraphicsObject'''
+
+ def testReimplementationTypes(self):
+ w = QGraphicsWidget()
+
+ # PYSIDE-86:
+ # This case failed because GObjA was reimplementing
+ # the method itemChange() from QGraphicsItem,
+ # and then the QVariant was not associated with
+ # a QGraphicsItem but a QObjectItem because the base
+ # class was a QObject.
+ gobjA = GObjA()
+ gobjA.setParentItem(w)
+ self.assertIs(type(w), type(gobjA.parentItem()))
+
+ gobjB = GObjB()
+ gobjB.setParentItem(w)
+ self.assertIs(type(w), type(gobjB.parentItem()))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qtreeview_test.py b/sources/pyside2/tests/QtWidgets/qtreeview_test.py
index a731ddafa..703131ec3 100644
--- a/sources/pyside2/tests/QtWidgets/qtreeview_test.py
+++ b/sources/pyside2/tests/QtWidgets/qtreeview_test.py
@@ -29,7 +29,9 @@
import unittest
from PySide2.QtGui import QStandardItemModel
-from PySide2.QtWidgets import QWidget, QTreeView, QVBoxLayout, QStyledItemDelegate
+from PySide2.QtWidgets import (QWidget, QTreeView, QVBoxLayout,
+ QStyledItemDelegate, QHeaderView)
+from PySide2.QtCore import Qt
from helper import UsesQApplication
class Widget(QWidget):
@@ -85,5 +87,10 @@ class QWidgetTest(UsesQApplication):
t.setItemDelegate(QStyledItemDelegate())
self.assertIsInstance(t.itemDelegate(), QStyledItemDelegate)
+ def testHeader(self):
+ tree = QTreeView()
+ tree.setHeader(QHeaderView(Qt.Horizontal))
+ self.assertIsNotNone(tree.header())
+
if __name__ == '__main__':
unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qtreewidget_test.py b/sources/pyside2/tests/QtWidgets/qtreewidget_test.py
new file mode 100644
index 000000000..11fa83c5a
--- /dev/null
+++ b/sources/pyside2/tests/QtWidgets/qtreewidget_test.py
@@ -0,0 +1,64 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of PySide2.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import unittest
+
+from PySide2.QtWidgets import QTreeWidget, QTreeWidgetItem, QPushButton
+from helper import UsesQApplication
+
+class QTreeWidgetTest(UsesQApplication):
+
+ # PYSIDE-73:
+ # There was a problem when adding items to a QTreeWidget
+ # when the Widget was being build on the method call instead
+ # of as a separate variable.
+ # The problem was there was not ownership transfer, so the
+ # QTreeWidget did not own the QWidget element
+ def testSetItemWidget(self):
+
+ treeWidget = QTreeWidget()
+ treeWidget.setColumnCount(2)
+
+ item = QTreeWidgetItem(['text of column 0', ''])
+ treeWidget.insertTopLevelItem(0, item)
+ # Adding QPushButton inside the method
+ treeWidget.setItemWidget(item, 1,
+ QPushButton('Push button on column 1'))
+
+ # Getting the widget back
+ w = treeWidget.itemWidget(treeWidget.itemAt(0,1), 1)
+ self.assertIsInstance(w, QPushButton)
+
+ p = QPushButton('New independent button')
+ # Adding QPushButton object from variable
+ treeWidget.setItemWidget(item, 0, p)
+ w = treeWidget.itemWidget(treeWidget.itemAt(0,0), 0)
+ self.assertIsInstance(w, QPushButton)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/shiboken2/ApiExtractor/CMakeLists.txt b/sources/shiboken2/ApiExtractor/CMakeLists.txt
index 4355e32ef..8d68b0dcf 100644
--- a/sources/shiboken2/ApiExtractor/CMakeLists.txt
+++ b/sources/shiboken2/ApiExtractor/CMakeLists.txt
@@ -1,5 +1,7 @@
project(apiextractor)
+cmake_minimum_required(VERSION 3.1)
+cmake_policy(VERSION 3.1)
find_package(LibXml2 2.6.32)
find_package(LibXslt 1.1.19)
@@ -55,11 +57,13 @@ clangparser/clangdebugutils.cpp
clangparser/clangutils.cpp
# Old parser
parser/codemodel.cpp
+parser/enumvalue.cpp
)
set(APIEXTRACTOR_EXTRA_INCLUDES ${CLANG_EXTRA_INCLUDES})
set(APIEXTRACTOR_EXTRA_LIBRARIES ${CLANG_EXTRA_LIBRARIES})
+add_subdirectory(doc)
if (NOT DISABLE_DOCSTRINGS)
set(apiextractor_SRC
${apiextractor_SRC}
diff --git a/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp b/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
index 1afc7d135..b862ba548 100644
--- a/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
+++ b/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
@@ -508,8 +508,6 @@ void AbstractMetaBuilderPrivate::traverseDom(const FileModelItem &dom)
addAbstractMetaClass(cls);
}
- figureOutEnumValues();
-
for (const ClassModelItem &item : typeValues)
traverseClassMembers(item);
@@ -684,7 +682,6 @@ void AbstractMetaBuilderPrivate::traverseDom(const FileModelItem &dom)
traverseStreamOperator(item);
}
- figureOutDefaultEnumArguments();
checkFunctionModifications();
// sort all classes topologically
@@ -839,207 +836,6 @@ AbstractMetaClass *AbstractMetaBuilderPrivate::traverseNamespace(const FileModel
return metaClass;
}
-struct Operator
-{
- enum Type { Complement, Plus, ShiftRight, ShiftLeft, None };
-
- Operator() : type(None) {}
-
- int calculate(int x)
- {
- switch (type) {
- case Complement: return ~value;
- case Plus: return x + value;
- case ShiftRight: return x >> value;
- case ShiftLeft: return x << value;
- case None: return x;
- }
- return x;
- }
-
- Type type;
- int value;
-};
-
-
-
-Operator findOperator(QString* s)
-{
- const char *names[] = {
- "~",
- "+",
- ">>",
- "<<"
- };
-
- for (int i = 0; i < Operator::None; ++i) {
- QString name = QLatin1String(names[i]);
- QString str = *s;
- int splitPoint = str.indexOf(name);
- if (splitPoint > -1) {
- bool ok;
- QString right = str.mid(splitPoint + name.length());
- Operator op;
-
- op.value = right.toInt(&ok);
- if (!ok && right.length() > 0 && right.at(right.length() - 1).toLower() == QLatin1Char('u'))
- op.value = right.left(right.length() - 1).toUInt(&ok, 0);
-
- if (ok) {
- op.type = Operator::Type(i);
- if (splitPoint > 0)
- *s = str.left(splitPoint).trimmed();
- else
- *s = QString();
- return op;
- }
- }
- }
- return Operator();
-}
-
-int AbstractMetaBuilderPrivate::figureOutEnumValue(const QString &stringValue,
- int oldValuevalue,
- AbstractMetaEnum *metaEnum,
- AbstractMetaFunction *metaFunction)
-{
- if (stringValue.isEmpty())
- return oldValuevalue;
-
- QStringList stringValues = stringValue.split(QLatin1Char('|'));
-
- int returnValue = 0;
-
- bool matched = false;
-
- for (int i = 0; i < stringValues.size(); ++i) {
- QString s = stringValues.at(i).trimmed();
-
- bool ok;
- int v;
-
- Operator op = findOperator(&s);
-
- if (s.length() > 0 && s.at(0) == QLatin1Char('0'))
- v = s.toUInt(&ok, 0);
- else if (s.length() > 0 && s.at(s.length() - 1).toLower() == QLatin1Char('u'))
- v = s.left(s.length() - 1).toUInt(&ok, 0);
- else
- v = s.toInt(&ok);
-
- if (ok || s.isEmpty()) {
- matched = true;
- } else if (m_enumValues.contains(s)) {
- v = m_enumValues[s]->value();
- matched = true;
- } else {
- if (metaEnum) {
- v = findOutValueFromString(s, matched);
- if (!matched) {
- QString enclosingClass = QString(metaEnum->enclosingClass() ? metaEnum->enclosingClass()->name() + colonColon() : QString());
- qCWarning(lcShiboken).noquote().nospace()
- << "unhandled enum value: " << s << " in "
- << enclosingClass << metaEnum->name() << " from header '"
- << metaEnum->typeEntry()->include().name() << '\'';
- }
- } else {
- qCWarning(lcShiboken) << "unhandled enum value: Unknown enum";
- }
- }
-
- if (matched)
- returnValue |= op.calculate(v);
- }
-
- if (!matched) {
- QString warn = QStringLiteral("unmatched enum %1").arg(stringValue);
-
- if (metaFunction) {
- warn += QStringLiteral(" when parsing default value of '%1' in class '%2'")
- .arg(metaFunction->name(), metaFunction->implementingClass()->name());
- }
- warn += QLatin1String(" from header '") + metaEnum->typeEntry()->include().name()
- + QLatin1Char('\'');
-
- qCWarning(lcShiboken).noquote().nospace() << warn;
- returnValue = oldValuevalue;
- }
-
- return returnValue;
-}
-
-void AbstractMetaBuilderPrivate::figureOutEnumValuesForClass(AbstractMetaClass *metaClass,
- QSet<AbstractMetaClass *> *classes)
-{
- AbstractMetaClass* base = metaClass->baseClass();
-
- if (base && !classes->contains(base))
- figureOutEnumValuesForClass(base, classes);
-
- if (classes->contains(metaClass))
- return;
-
- const AbstractMetaEnumList &enums = metaClass->enums();
- for (AbstractMetaEnum* e : enums) {
- if (!e) {
- qCWarning(lcShiboken).noquote().nospace() << "bad enum in class " << metaClass->name();
- continue;
- }
- AbstractMetaEnumValueList lst = e->values();
- int value = 0;
- for (int i = 0; i < lst.size(); ++i) {
- value = figureOutEnumValue(lst.at(i)->stringValue(), value, e);
- lst.at(i)->setValue(value);
- value++;
- }
- }
-
- *classes += metaClass;
-}
-
-
-void AbstractMetaBuilderPrivate::figureOutEnumValues()
-{
- // Keep a set of classes that we already traversed. We use this to
- // enforce that we traverse base classes prior to subclasses.
- QSet<AbstractMetaClass*> classes;
- for (AbstractMetaClass *c : qAsConst(m_metaClasses))
- figureOutEnumValuesForClass(c, &classes);
-
- for (AbstractMetaEnum* metaEnum : qAsConst(m_globalEnums)) {
- AbstractMetaEnumValueList enumValues = metaEnum->values();
- int value = 0;
- for (int i = 0; i < enumValues.size(); ++i) {
- value = figureOutEnumValue(enumValues.at(i)->stringValue(), value, metaEnum);
- enumValues.at(i)->setValue(value);
- value++;
- }
- }
-}
-
-void AbstractMetaBuilderPrivate::figureOutDefaultEnumArguments()
-{
- for (AbstractMetaClass* metaClass : qAsConst(m_metaClasses)) {
- const AbstractMetaFunctionList &functions = metaClass->functions();
- for (AbstractMetaFunction* metaFunction : functions) {
- const AbstractMetaArgumentList &arguments = metaFunction->arguments();
- for (AbstractMetaArgument *arg : arguments) {
- QString expr = arg->defaultValueExpression();
- if (expr.isEmpty())
- continue;
-
- if (!metaFunction->replacedDefaultExpression(metaFunction->implementingClass(),
- arg->argumentIndex() + 1).isEmpty()) {
- continue;
- }
-
- arg->setDefaultValueExpression(expr);
- }
- }
- }
-}
-
-
AbstractMetaEnum *AbstractMetaBuilderPrivate::traverseEnum(EnumModelItem enumItem,
AbstractMetaClass *enclosing,
const QSet<QString> &enumsDeclarations)
@@ -1055,7 +851,7 @@ AbstractMetaEnum *AbstractMetaBuilderPrivate::traverseEnum(EnumModelItem enumIte
nspace = QStringList(names.mid(0, names.size() - 1)).join(colonColon());
typeEntry = new EnumTypeEntry(nspace, enumName, QVersionNumber(0, 0));
TypeDatabase::instance()->addType(typeEntry);
- } else if (!enumItem->isAnonymous()) {
+ } else if (enumItem->enumKind() != AnonymousEnum) {
typeEntry = TypeDatabase::instance()->findType(qualifiedName);
} else {
QStringList tmpQualifiedName = enumItem->qualifiedName();
@@ -1096,12 +892,15 @@ AbstractMetaEnum *AbstractMetaBuilderPrivate::traverseEnum(EnumModelItem enumIte
}
AbstractMetaEnum *metaEnum = new AbstractMetaEnum;
+ metaEnum->setEnumKind(enumItem->enumKind());
+ metaEnum->setSigned(enumItem->isSigned());
if (enumsDeclarations.contains(qualifiedName)
|| enumsDeclarations.contains(enumName)) {
metaEnum->setHasQEnumsDeclaration(true);
}
- metaEnum->setTypeEntry((EnumTypeEntry*) typeEntry);
+ EnumTypeEntry *enumTypeEntry = static_cast<EnumTypeEntry *>(typeEntry);
+ metaEnum->setTypeEntry(enumTypeEntry);
switch (enumItem->accessPolicy()) {
case CodeModel::Public:
*metaEnum += AbstractMetaAttributes::Public;
@@ -1127,7 +926,8 @@ AbstractMetaEnum *AbstractMetaBuilderPrivate::traverseEnum(EnumModelItem enumIte
metaEnumValue->setName(value->name());
// Deciding the enum value...
- metaEnumValue->setStringValue(value->value());
+ metaEnumValue->setStringValue(value->stringValue());
+ metaEnumValue->setValue(value->value());
metaEnum->addEnumValue(metaEnumValue);
if (ReportHandler::isDebug(ReportHandler::FullDebug)) {
@@ -1158,7 +958,9 @@ AbstractMetaEnum *AbstractMetaBuilderPrivate::traverseEnum(EnumModelItem enumIte
name += colonColon();
}
name += e->name();
- EnumValueTypeEntry* enumValue = new EnumValueTypeEntry(name, e->value(), static_cast<EnumTypeEntry*>(typeEntry), typeEntry->version());
+ EnumValueTypeEntry *enumValue =
+ new EnumValueTypeEntry(name, e->stringValue(),
+ enumTypeEntry, enumTypeEntry->version());
TypeDatabase::instance()->addType(enumValue);
}
@@ -2286,6 +2088,20 @@ AbstractMetaFunction *AbstractMetaBuilderPrivate::traverseFunction(FunctionModel
bool ok;
AbstractMetaType* metaType = translateType(arg->type(), &ok);
if (!ok) {
+ // If an invalid argument has a default value, simply remove it
+ if (arg->defaultValue()) {
+ if (!m_currentClass
+ || (m_currentClass->typeEntry()->codeGeneration()
+ & TypeEntry::GenerateTargetLang)) {
+ qCWarning(lcShiboken).noquote().nospace()
+ << "Stripping argument #" << (i + 1) << " of "
+ << originalQualifiedSignatureWithReturn
+ << " due to unmatched type \"" << arg->type().toString()
+ << "\" with default expression \""
+ << arg->defaultValueExpression() << "\".";
+ }
+ break;
+ }
Q_ASSERT(metaType == 0);
const QString reason = msgUnmatchedParameterType(arg, i);
qCWarning(lcShiboken).noquote().nospace()
@@ -2321,7 +2137,7 @@ AbstractMetaFunction *AbstractMetaBuilderPrivate::traverseFunction(FunctionModel
metaFunction->setArguments(metaArguments);
// Find the correct default values
- for (int i = 0; i < arguments.size(); ++i) {
+ for (int i = 0, size = metaArguments.size(); i < size; ++i) {
ArgumentModelItem arg = arguments.at(i);
AbstractMetaArgument* metaArg = metaArguments.at(i);
@@ -2570,9 +2386,9 @@ AbstractMetaType *AbstractMetaBuilderPrivate::translateType(const TypeInfo &_typ
arrayType->setArrayElementType(elementType);
if (!typeInfo.arrays.at(i).isEmpty()) {
bool _ok;
- const int elems = findOutValueFromString(typeInfo.arrays.at(i), _ok);
+ const qint64 elems = findOutValueFromString(typeInfo.arrays.at(i), _ok);
if (_ok)
- arrayType->setArrayElementCount(elems);
+ arrayType->setArrayElementCount(int(elems));
}
arrayType->setTypeEntry(new ArrayTypeEntry(elementType->typeEntry() , elementType->typeEntry()->version()));
decideUsagePattern(arrayType);
@@ -2712,9 +2528,9 @@ AbstractMetaType *AbstractMetaBuilderPrivate::translateType(const TypeInfo &_typ
}
-int AbstractMetaBuilderPrivate::findOutValueFromString(const QString &stringValue, bool &ok)
+qint64 AbstractMetaBuilderPrivate::findOutValueFromString(const QString &stringValue, bool &ok)
{
- int value = stringValue.toInt(&ok);
+ qint64 value = stringValue.toLongLong(&ok);
if (ok)
return value;
@@ -2735,13 +2551,13 @@ int AbstractMetaBuilderPrivate::findOutValueFromString(const QString &stringValu
AbstractMetaEnumValue *enumValue = AbstractMetaClass::findEnumValue(m_metaClasses, stringValue);
if (enumValue) {
ok = true;
- return enumValue->value();
+ return enumValue->value().value();
}
for (AbstractMetaEnum *metaEnum : qAsConst(m_globalEnums)) {
if (const AbstractMetaEnumValue *ev = metaEnum->findEnumValue(stringValue)) {
ok = true;
- return ev->value();
+ return ev->value().value();
}
}
diff --git a/sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h b/sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h
index 7a2565914..7f5e866ab 100644
--- a/sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h
+++ b/sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h
@@ -60,11 +60,6 @@ public:
AbstractMetaClass *argumentToClass(ArgumentModelItem);
- void figureOutEnumValuesForClass(AbstractMetaClass *metaClass, QSet<AbstractMetaClass *> *classes);
- int figureOutEnumValue(const QString &name, int value, AbstractMetaEnum *meta_enum, AbstractMetaFunction *metaFunction = 0);
- void figureOutEnumValues();
- void figureOutDefaultEnumArguments();
-
void addAbstractMetaClass(AbstractMetaClass *cls);
AbstractMetaClass *traverseTypeDef(const FileModelItem &dom,
const TypeDefModelItem &typeDef);
@@ -129,7 +124,7 @@ public:
bool resolveType = true,
bool resolveScope = true);
- int findOutValueFromString(const QString &stringValue, bool &ok);
+ qint64 findOutValueFromString(const QString &stringValue, bool &ok);
void decideUsagePattern(AbstractMetaType *type);
diff --git a/sources/shiboken2/ApiExtractor/abstractmetalang.cpp b/sources/shiboken2/ApiExtractor/abstractmetalang.cpp
index 4e507cd38..235413165 100644
--- a/sources/shiboken2/ApiExtractor/abstractmetalang.cpp
+++ b/sources/shiboken2/ApiExtractor/abstractmetalang.cpp
@@ -1700,7 +1700,10 @@ QDebug operator<<(QDebug d, const AbstractMetaEnum *ae)
d.nospace();
d << "AbstractMetaEnum(";
if (ae) {
- d << ae->fullName() << '[';
+ d << ae->fullName();
+ if (!ae->isSigned())
+ d << " (unsigned) ";
+ d << '[';
const AbstractMetaEnumValueList &values = ae->values();
for (int i = 0, count = values.size(); i < count; ++i) {
if (i)
@@ -2411,7 +2414,7 @@ QDebug operator<<(QDebug d, const AbstractMetaClass *ac)
*/
AbstractMetaEnum::AbstractMetaEnum() :
- m_hasQenumsDeclaration(false)
+ m_hasQenumsDeclaration(false), m_signed(true)
{
}
@@ -2457,8 +2460,3 @@ QString AbstractMetaEnum::package() const
{
return m_typeEntry->targetLangPackage();
}
-
-bool AbstractMetaEnum::isAnonymous() const
-{
- return m_typeEntry->isAnonymous();
-}
diff --git a/sources/shiboken2/ApiExtractor/abstractmetalang.h b/sources/shiboken2/ApiExtractor/abstractmetalang.h
index 45a55e570..7e0bfa322 100644
--- a/sources/shiboken2/ApiExtractor/abstractmetalang.h
+++ b/sources/shiboken2/ApiExtractor/abstractmetalang.h
@@ -34,6 +34,7 @@
#include "typesystem_typedefs.h"
#include "parser/codemodel_enums.h"
+#include "parser/enumvalue.h"
#include <QtCore/qobjectdefs.h>
#include <QtCore/QStringList>
@@ -1090,12 +1091,12 @@ class AbstractMetaEnumValue
public:
AbstractMetaEnumValue() {}
- int value() const
+ EnumValue value() const
{
return m_value;
}
- void setValue(int value)
+ void setValue(EnumValue value)
{
m_value = value;
}
@@ -1134,7 +1135,7 @@ private:
QString m_name;
QString m_stringValue;
- int m_value = 0;
+ EnumValue m_value;
Documentation m_doc;
};
@@ -1168,6 +1169,11 @@ public:
return package() + QLatin1Char('.') + qualifier() + QLatin1Char('.') + name();
}
+ EnumKind enumKind() const { return m_enumKind; }
+ void setEnumKind(EnumKind kind) { m_enumKind = kind; }
+
+ bool isAnonymous() const { return m_enumKind == AnonymousEnum; }
+
// Has the enum been declared inside a Q_ENUMS() macro in its enclosing class?
void setHasQEnumsDeclaration(bool on)
{
@@ -1199,14 +1205,17 @@ public:
m_class = c;
}
- bool isAnonymous() const;
+ bool isSigned() const { return m_signed; }
+ void setSigned(bool s) { m_signed = s; }
private:
AbstractMetaEnumValueList m_enumValues;
EnumTypeEntry *m_typeEntry = nullptr;
AbstractMetaClass *m_class = nullptr;
+ EnumKind m_enumKind = CEnum;
uint m_hasQenumsDeclaration : 1;
+ uint m_signed : 1;
};
#ifndef QT_NO_DEBUG_STREAM
diff --git a/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp b/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp
index 1ed054d91..b57ef2f43 100644
--- a/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp
+++ b/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp
@@ -41,6 +41,7 @@
#include <QtCore/QVector>
#include <string.h>
+#include <ctype.h>
#if QT_VERSION < 0x050800
# define Q_FALLTHROUGH() (void)0
@@ -123,6 +124,24 @@ static void setFileName(const CXCursor &cursor, _CodeModelItem *item)
}
}
+static bool isSigned(CXTypeKind kind)
+{
+ switch (kind) {
+ case CXType_UChar:
+ case CXType_Char16:
+ case CXType_Char32:
+ case CXType_UShort:
+ case CXType_UInt:
+ case CXType_ULong:
+ case CXType_ULongLong:
+ case CXType_UInt128:
+ return false;
+ default:
+ break;
+ }
+ return true;
+}
+
class BuilderPrivate {
public:
typedef QHash<CXCursor, ClassModelItem> CursorClassHash;
@@ -437,6 +456,36 @@ QString BuilderPrivate::cursorValueExpression(BaseVisitor *bv, const CXCursor &c
return QString::fromLocal8Bit(equalSign, int(snippet.second - equalSign)).trimmed();
}
+// A hacky reimplementation of clang_EnumDecl_isScoped() for Clang < 5.0
+// which simply checks for a blank-delimited " class " keyword in the enum snippet.
+
+#define CLANG_NO_ENUMDECL_ISSCOPED \
+ (CINDEX_VERSION_MAJOR == 0 && CINDEX_VERSION_MINOR < 43)
+
+#if CLANG_NO_ENUMDECL_ISSCOPED
+static const char *indexOf(const BaseVisitor::CodeSnippet &snippet, const char *needle)
+{
+ const size_t snippetLength = snippet.first ? size_t(snippet.second - snippet.first) : 0;
+ const size_t needleLength = strlen(needle);
+ if (needleLength > snippetLength)
+ return nullptr;
+ for (const char *c = snippet.first, *end = snippet.second - needleLength; c < end; ++c) {
+ if (memcmp(c, needle, needleLength) == 0)
+ return c;
+ }
+ return nullptr;
+}
+
+long clang_EnumDecl_isScoped4(BaseVisitor *bv, const CXCursor &cursor)
+{
+ BaseVisitor::CodeSnippet snippet = bv->getCodeSnippet(cursor);
+ const char *classSpec = indexOf(snippet, "class");
+ const bool isClass = classSpec && classSpec > snippet.first
+ && isspace(*(classSpec - 1)) && isspace(*(classSpec + 5));
+ return isClass ? 1 : 0;
+}
+#endif // CLANG_NO_ENUMDECL_ISSCOPED
+
// Add a base class to the current class from CXCursor_CXXBaseSpecifier
void BuilderPrivate::addBaseClass(const CXCursor &cursor)
{
@@ -641,13 +690,22 @@ BaseVisitor::StartTokenResult Builder::startToken(const CXCursor &cursor)
break;
case CXCursor_EnumDecl: {
QString name = getCursorSpelling(cursor);
- const bool anonymous = name.isEmpty();
- if (anonymous)
+ EnumKind kind = CEnum;
+ if (name.isEmpty()) {
+ kind = AnonymousEnum;
name = QStringLiteral("enum_") + QString::number(++d->m_anonymousEnumCount);
+#if !CLANG_NO_ENUMDECL_ISSCOPED
+ } else if (clang_EnumDecl_isScoped(cursor) != 0) {
+#else
+ } else if (clang_EnumDecl_isScoped4(this, cursor) != 0) {
+#endif
+ kind = EnumClass;
+ }
d->m_currentEnum.reset(new _EnumModelItem(d->m_model, name));
setFileName(cursor, d->m_currentEnum.data());
d->m_currentEnum->setScope(d->m_scope);
- d->m_currentEnum->setAnonymous(anonymous);
+ d->m_currentEnum->setEnumKind(kind);
+ d->m_currentEnum->setSigned(isSigned(clang_getEnumDeclIntegerType(cursor).kind));
if (!qSharedPointerDynamicCast<_ClassModelItem>(d->m_scopeStack.back()).isNull())
d->m_currentEnum->setAccessPolicy(accessPolicy(clang_getCXXAccessSpecifier(cursor)));
d->m_scopeStack.back()->addEnum(d->m_currentEnum);
@@ -661,8 +719,14 @@ BaseVisitor::StartTokenResult Builder::startToken(const CXCursor &cursor)
appendDiagnostic(d);
return Error;
}
+ EnumValue enumValue;
+ if (d->m_currentEnum->isSigned())
+ enumValue.setValue(clang_getEnumConstantDeclValue(cursor));
+ else
+ enumValue.setUnsignedValue(clang_getEnumConstantDeclUnsignedValue(cursor));
EnumeratorModelItem enumConstant(new _EnumeratorModelItem(d->m_model, name));
- enumConstant->setValue(d->cursorValueExpression(this, cursor));
+ enumConstant->setStringValue(d->cursorValueExpression(this, cursor));
+ enumConstant->setValue(enumValue);
d->m_currentEnum->addEnumerator(enumConstant);
}
break;
diff --git a/sources/shiboken2/ApiExtractor/doc/CMakeLists.txt b/sources/shiboken2/ApiExtractor/doc/CMakeLists.txt
index d78844dc8..a1995e96f 100644
--- a/sources/shiboken2/ApiExtractor/doc/CMakeLists.txt
+++ b/sources/shiboken2/ApiExtractor/doc/CMakeLists.txt
@@ -1,10 +1,10 @@
-
+message("Building ApiExtractor documentation")
find_program(SPHINX sphinx-build DOC "Path to sphinx-build binary.")
if (SPHINX)
- message("-- sphinx-build - found")
+ message(STATUS "sphinx-build - found")
configure_file(conf.py.in conf.py @ONLY)
- add_custom_target(doc ${SPHINX} -b html -c . ${CMAKE_CURRENT_SOURCE_DIR} html )
+ add_custom_target(doc_apiextractor ${SPHINX} -b html -c . ${CMAKE_CURRENT_SOURCE_DIR} html )
else()
- message("-- sphinx-build - not found! doc target disabled")
-endif() \ No newline at end of file
+ message(STATUS "sphinx-build - not found! doc_apiextractor target disabled")
+endif()
diff --git a/sources/shiboken2/ApiExtractor/doc/conf.py.in b/sources/shiboken2/ApiExtractor/doc/conf.py.in
index 3a42707ad..7251aaccd 100644
--- a/sources/shiboken2/ApiExtractor/doc/conf.py.in
+++ b/sources/shiboken2/ApiExtractor/doc/conf.py.in
@@ -22,7 +22,8 @@ import sys, os
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.ifconfig', 'sphinx.ext.refcounting', 'sphinx.ext.coverage']
+extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest',
+ 'sphinx.ext.ifconfig', 'sphinx.ext.coverage']
rst_epilog = """
.. |project| replace:: API Extractor
diff --git a/sources/shiboken2/ApiExtractor/doc/typesystem_specifying_types.rst b/sources/shiboken2/ApiExtractor/doc/typesystem_specifying_types.rst
index 646e76043..322f9bca6 100644
--- a/sources/shiboken2/ApiExtractor/doc/typesystem_specifying_types.rst
+++ b/sources/shiboken2/ApiExtractor/doc/typesystem_specifying_types.rst
@@ -180,10 +180,6 @@ enum-type
Notice that the **enum-type** tag can either have **name** or **identified-by-value**
but not both.
- The *optional* boolean attribute **class** specifies whether the underlying
- enumeration is a C++ 11 enumeration class. In that case, the enumeration values
- need to be qualified by the enumeration name to match the C++ Syntax.
-
The **revision** attribute can be used to specify a revision for each type, easing the
production of ABI compatible bindings.
diff --git a/sources/shiboken2/ApiExtractor/parser/codemodel.cpp b/sources/shiboken2/ApiExtractor/parser/codemodel.cpp
index a35ca314b..1262f5901 100644
--- a/sources/shiboken2/ApiExtractor/parser/codemodel.cpp
+++ b/sources/shiboken2/ApiExtractor/parser/codemodel.cpp
@@ -1014,22 +1014,32 @@ void _EnumModelItem::addEnumerator(EnumeratorModelItem item)
m_enumerators.append(item);
}
-bool _EnumModelItem::isAnonymous() const
+bool _EnumModelItem::isSigned() const
{
- return m_anonymous;
+ return m_signed;
}
-void _EnumModelItem::setAnonymous(bool anonymous)
+void _EnumModelItem::setSigned(bool s)
{
- m_anonymous = anonymous;
+ m_signed = s;
}
#ifndef QT_NO_DEBUG_STREAM
void _EnumModelItem::formatDebug(QDebug &d) const
{
_CodeModelItem::formatDebug(d);
- if (m_anonymous)
- d << " (anonymous)";
+ switch (m_enumKind) {
+ case CEnum:
+ break;
+ case AnonymousEnum:
+ d << " (anonymous)";
+ break;
+ case EnumClass:
+ d << " (class)";
+ break;
+ }
+ if (!m_signed)
+ d << " (unsigned)";
formatModelItemList(d, ", enumerators=", m_enumerators);
}
#endif // !QT_NO_DEBUG_STREAM
@@ -1039,22 +1049,21 @@ _EnumeratorModelItem::~_EnumeratorModelItem()
{
}
-QString _EnumeratorModelItem::value() const
+QString _EnumeratorModelItem::stringValue() const
{
- return m_value;
+ return m_stringValue;
}
-void _EnumeratorModelItem::setValue(const QString &value)
+void _EnumeratorModelItem::setStringValue(const QString &value)
{
- m_value = value;
+ m_stringValue = value;
}
#ifndef QT_NO_DEBUG_STREAM
void _EnumeratorModelItem::formatDebug(QDebug &d) const
{
_CodeModelItem::formatDebug(d);
- if (!m_value.isEmpty())
- d << ", value=\"" << m_value << '"';
+ d << ", value=" << m_value << ", stringValue=\"" << m_stringValue << '"';
}
#endif // !QT_NO_DEBUG_STREAM
diff --git a/sources/shiboken2/ApiExtractor/parser/codemodel.h b/sources/shiboken2/ApiExtractor/parser/codemodel.h
index 2aaea1f78..ed0eedf7d 100644
--- a/sources/shiboken2/ApiExtractor/parser/codemodel.h
+++ b/sources/shiboken2/ApiExtractor/parser/codemodel.h
@@ -33,6 +33,7 @@
#include "codemodel_fwd.h"
#include "codemodel_enums.h"
+#include "enumvalue.h"
#include <QtCore/QHash>
#include <QtCore/QSet>
@@ -631,10 +632,10 @@ class _EnumModelItem: public _CodeModelItem
public:
DECLARE_MODEL_NODE(Enum)
- explicit _EnumModelItem(CodeModel *model, int kind = __node_kind)
- : _CodeModelItem(model, kind), m_accessPolicy(CodeModel::Public), m_anonymous(false) {}
explicit _EnumModelItem(CodeModel *model, const QString &name, int kind = __node_kind)
- : _CodeModelItem(model, name, kind), m_accessPolicy(CodeModel::Public), m_anonymous(false) {}
+ : _CodeModelItem(model, name, kind) {}
+ explicit _EnumModelItem(CodeModel *model, int kind = __node_kind)
+ : _CodeModelItem(model, kind) {}
~_EnumModelItem();
CodeModel::AccessPolicy accessPolicy() const;
@@ -642,17 +643,22 @@ public:
EnumeratorList enumerators() const;
void addEnumerator(EnumeratorModelItem item);
- bool isAnonymous() const;
- void setAnonymous(bool anonymous);
+
+ EnumKind enumKind() const { return m_enumKind; }
+ void setEnumKind(EnumKind kind) { m_enumKind = kind; }
#ifndef QT_NO_DEBUG_STREAM
void formatDebug(QDebug &d) const override;
#endif
+ bool isSigned() const;
+ void setSigned(bool s);
+
private:
- CodeModel::AccessPolicy m_accessPolicy;
+ CodeModel::AccessPolicy m_accessPolicy = CodeModel::Public;
EnumeratorList m_enumerators;
- bool m_anonymous;
+ EnumKind m_enumKind = CEnum;
+ bool m_signed = true;
};
class _EnumeratorModelItem: public _CodeModelItem
@@ -666,15 +672,19 @@ public:
: _CodeModelItem(model, name, kind) {}
~_EnumeratorModelItem();
- QString value() const;
- void setValue(const QString &value);
+ QString stringValue() const;
+ void setStringValue(const QString &stringValue);
+
+ EnumValue value() const { return m_value; }
+ void setValue(EnumValue v) { m_value = v; }
#ifndef QT_NO_DEBUG_STREAM
void formatDebug(QDebug &d) const override;
#endif
private:
- QString m_value;
+ QString m_stringValue;
+ EnumValue m_value;
};
class _TemplateParameterModelItem: public _CodeModelItem
diff --git a/sources/shiboken2/ApiExtractor/parser/codemodel_enums.h b/sources/shiboken2/ApiExtractor/parser/codemodel_enums.h
index aa8b051d8..3115a9a94 100644
--- a/sources/shiboken2/ApiExtractor/parser/codemodel_enums.h
+++ b/sources/shiboken2/ApiExtractor/parser/codemodel_enums.h
@@ -35,4 +35,10 @@ enum ReferenceType {
RValueReference
};
+enum EnumKind {
+ CEnum, // Standard C: enum Foo { value1, value2 }
+ AnonymousEnum, // enum { value1, value2 }
+ EnumClass // C++ 11 : enum class Foo { value1, value2 }
+};
+
#endif // CODEMODEL_ENUMS_H
diff --git a/sources/shiboken2/ApiExtractor/parser/enumvalue.cpp b/sources/shiboken2/ApiExtractor/parser/enumvalue.cpp
new file mode 100644
index 000000000..84723eb14
--- /dev/null
+++ b/sources/shiboken2/ApiExtractor/parser/enumvalue.cpp
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of PySide2.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "enumvalue.h"
+
+#include <QtCore/QDebug>
+#include <QtCore/QString>
+#include <QtCore/QTextStream>
+
+QString EnumValue::toString() const
+{
+ return m_type == EnumValue::Signed
+ ? QString::number(m_value) : QString::number(m_unsignedValue);
+}
+
+void EnumValue::setValue(qint64 v)
+{
+ m_value = v;
+ m_type = Signed;
+}
+
+void EnumValue::setUnsignedValue(quint64 v)
+{
+ m_unsignedValue = v;
+ m_type = Unsigned;
+}
+
+#ifndef QT_NO_DEBUG_STREAM
+QDebug operator<<(QDebug d,const EnumValue &v)
+{
+ QDebugStateSaver saver(d);
+ d.nospace();
+ d.noquote();
+ d << "EnumValue(";
+ if (v.m_type == EnumValue::Signed)
+ d << v.m_value;
+ else
+ d << v.m_unsignedValue << 'u';
+ d << ')';
+ return d;
+}
+#endif // !QT_NO_DEBUG_STREAM
+
+QTextStream &operator<<(QTextStream &s, const EnumValue &v)
+{
+ if (v.m_type == EnumValue::Signed)
+ s << v.m_value;
+ else
+ s << v.m_unsignedValue;
+ return s;
+}
diff --git a/sources/shiboken2/ApiExtractor/parser/enumvalue.h b/sources/shiboken2/ApiExtractor/parser/enumvalue.h
new file mode 100644
index 000000000..2e2070306
--- /dev/null
+++ b/sources/shiboken2/ApiExtractor/parser/enumvalue.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of PySide2.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ENUMVALUE_H
+#define ENUMVALUE_H
+
+#include <QtCore/QtGlobal>
+
+QT_FORWARD_DECLARE_CLASS(QDebug)
+QT_FORWARD_DECLARE_CLASS(QString)
+QT_FORWARD_DECLARE_CLASS(QTextStream)
+
+class EnumValue
+{
+public:
+ enum Type
+ {
+ Signed,
+ Unsigned
+ };
+
+ QString toString() const;
+
+ Type type() { return m_type; }
+ qint64 value() const { return m_value; }
+ quint64 unsignedValue() const { return m_unsignedValue; }
+
+ void setValue(qint64 v);
+ void setUnsignedValue(quint64 v);
+
+private:
+#ifndef QT_NO_DEBUG_STREAM
+ friend QDebug operator<<(QDebug, const EnumValue &);
+#endif
+ friend QTextStream &operator<<(QTextStream &, const EnumValue &);
+
+ union
+ {
+ qint64 m_value = 0;
+ quint64 m_unsignedValue;
+ };
+ Type m_type = Signed;
+};
+
+#endif // ENUMVALUE_H
diff --git a/sources/shiboken2/ApiExtractor/qtdocparser.cpp b/sources/shiboken2/ApiExtractor/qtdocparser.cpp
index 0ac87bd16..85c3473cd 100644
--- a/sources/shiboken2/ApiExtractor/qtdocparser.cpp
+++ b/sources/shiboken2/ApiExtractor/qtdocparser.cpp
@@ -68,6 +68,17 @@ static void formatFunctionArgTypeQuery(QTextStream &str, const AbstractMetaArgum
str << name;
}
break;
+ case AbstractMetaType::ContainerPattern: { // QVector<int>
+ str << metaType->typeEntry()->qualifiedCppName() << '<';
+ const auto instantiations = metaType->instantiations();
+ for (int i = 0, size = instantiations.size(); i < size; ++i) {
+ if (i)
+ str << ", ";
+ str << instantiations.at(i)->typeEntry()->qualifiedCppName();
+ }
+ str << '>';
+ }
+ break;
default: // Fully qualify enums (Qt::AlignmentFlag), nested classes, etc.
str << metaType->typeEntry()->qualifiedCppName();
break;
@@ -218,7 +229,8 @@ Documentation QtDocParser::retrieveModuleDocumentation(const QString& name)
xquery.setFocus(QUrl(sourceFile));
// Module documentation
- QString query = QLatin1String("/WebXML/document/page[@name=\"") + moduleName + QLatin1String("\"]/description");
+ QString query = QLatin1String("/WebXML/document/module[@name=\"")
+ + moduleName + QLatin1String("\"]/description");
const Documentation doc = getDocumentation(xquery, query, DocModificationList());
if (doc.isEmpty())
qCWarning(lcShiboken(), "%s", qPrintable(msgCannotFindDocumentation(sourceFile, "module", name, query)));
diff --git a/sources/shiboken2/ApiExtractor/tests/testarrayargument.cpp b/sources/shiboken2/ApiExtractor/tests/testarrayargument.cpp
index cbeb216c9..eb10fc8a0 100644
--- a/sources/shiboken2/ApiExtractor/tests/testarrayargument.cpp
+++ b/sources/shiboken2/ApiExtractor/tests/testarrayargument.cpp
@@ -133,7 +133,7 @@ void TestArrayArgument::testArrayArgumentWithSizeDefinedByEnumValue()
const AbstractMetaArgument* arg = classA->functions().last()->arguments().first();
QVERIFY(arg->type()->isArray());
- QCOMPARE(arg->type()->arrayElementCount(), nvalues->value());
+ QCOMPARE(arg->type()->arrayElementCount(), nvalues->value().value());
QCOMPARE(arg->type()->arrayElementType()->name(), QLatin1String("double"));
};
@@ -164,7 +164,7 @@ void TestArrayArgument::testArrayArgumentWithSizeDefinedByEnumValueFromGlobalEnu
const AbstractMetaArgument* arg = classA->functions().last()->arguments().first();
QVERIFY(arg->type()->isArray());
- QCOMPARE(arg->type()->arrayElementCount(), nvalues->value());
+ QCOMPARE(arg->type()->arrayElementCount(), nvalues->value().value());
QCOMPARE(arg->type()->arrayElementType()->name(), QLatin1String("double"));
};
diff --git a/sources/shiboken2/ApiExtractor/tests/testenum.cpp b/sources/shiboken2/ApiExtractor/tests/testenum.cpp
index 55c098840..970f6d00c 100644
--- a/sources/shiboken2/ApiExtractor/tests/testenum.cpp
+++ b/sources/shiboken2/ApiExtractor/tests/testenum.cpp
@@ -149,12 +149,12 @@ void TestEnum::testAnonymousEnum()
AbstractMetaEnumValue* enumValueA0 = anonEnumA1->values().first();
QCOMPARE(enumValueA0->name(), QLatin1String("A0"));
- QCOMPARE(enumValueA0->value(), 0);
+ QCOMPARE(enumValueA0->value().value(), 0);
QCOMPARE(enumValueA0->stringValue(), QString());
AbstractMetaEnumValue* enumValueA1 = anonEnumA1->values().last();
QCOMPARE(enumValueA1->name(), QLatin1String("A1"));
- QCOMPARE(enumValueA1->value(), 1);
+ QCOMPARE(enumValueA1->value().value(), 1);
QCOMPARE(enumValueA1->stringValue(), QString());
AbstractMetaEnum* anonEnumIsThis = classes[0]->findEnum(QLatin1String("isThis"));
@@ -164,12 +164,12 @@ void TestEnum::testAnonymousEnum()
AbstractMetaEnumValue* enumValueIsThis = anonEnumIsThis->values().first();
QCOMPARE(enumValueIsThis->name(), QLatin1String("isThis"));
- QCOMPARE(enumValueIsThis->value(), static_cast<int>(true));
+ QCOMPARE(enumValueIsThis->value().value(), static_cast<int>(true));
QCOMPARE(enumValueIsThis->stringValue(), QLatin1String("true"));
AbstractMetaEnumValue* enumValueIsThat = anonEnumIsThis->values().last();
QCOMPARE(enumValueIsThat->name(), QLatin1String("isThat"));
- QCOMPARE(enumValueIsThat->value(), static_cast<int>(false));
+ QCOMPARE(enumValueIsThat->value().value(), static_cast<int>(false));
QCOMPARE(enumValueIsThat->stringValue(), QLatin1String("false"));
}
@@ -195,12 +195,12 @@ void TestEnum::testGlobalEnums()
AbstractMetaEnumValue* enumValueA0 = enumA->values().first();
QCOMPARE(enumValueA0->name(), QLatin1String("A0"));
- QCOMPARE(enumValueA0->value(), 0);
+ QCOMPARE(enumValueA0->value().value(), 0);
QCOMPARE(enumValueA0->stringValue(), QString());
AbstractMetaEnumValue* enumValueA1 = enumA->values().last();
QCOMPARE(enumValueA1->name(), QLatin1String("A1"));
- QCOMPARE(enumValueA1->value(), 1);
+ QCOMPARE(enumValueA1->value().value(), 1);
QCOMPARE(enumValueA1->stringValue(), QString());
AbstractMetaEnum* enumB = globalEnums.last();
@@ -208,12 +208,12 @@ void TestEnum::testGlobalEnums()
AbstractMetaEnumValue* enumValueB0 = enumB->values().first();
QCOMPARE(enumValueB0->name(), QLatin1String("B0"));
- QCOMPARE(enumValueB0->value(), 2);
+ QCOMPARE(enumValueB0->value().value(), 2);
QCOMPARE(enumValueB0->stringValue(), QLatin1String("2"));
AbstractMetaEnumValue* enumValueB1 = enumB->values().last();
QCOMPARE(enumValueB1->name(), QLatin1String("B1"));
- QCOMPARE(enumValueB1->value(), 4);
+ QCOMPARE(enumValueB1->value().value(), 4);
QCOMPARE(enumValueB1->stringValue(), QLatin1String("0x4"));
}
@@ -245,12 +245,12 @@ void TestEnum::testEnumValueFromNeighbourEnum()
AbstractMetaEnumValue* enumValueA0 = enumA->values().first();
QCOMPARE(enumValueA0->name(), QLatin1String("ValueA0"));
- QCOMPARE(enumValueA0->value(), 0);
+ QCOMPARE(enumValueA0->value().value(), 0);
QCOMPARE(enumValueA0->stringValue(), QString());
AbstractMetaEnumValue* enumValueA1 = enumA->values().last();
QCOMPARE(enumValueA1->name(), QLatin1String("ValueA1"));
- QCOMPARE(enumValueA1->value(), 1);
+ QCOMPARE(enumValueA1->value().value(), 1);
QCOMPARE(enumValueA1->stringValue(), QString());
AbstractMetaEnum* enumB = classes[0]->findEnum(QLatin1String("EnumB"));
@@ -259,12 +259,12 @@ void TestEnum::testEnumValueFromNeighbourEnum()
AbstractMetaEnumValue* enumValueB0 = enumB->values().first();
QCOMPARE(enumValueB0->name(), QLatin1String("ValueB0"));
- QCOMPARE(enumValueB0->value(), 1);
+ QCOMPARE(enumValueB0->value().value(), 1);
QCOMPARE(enumValueB0->stringValue(), QLatin1String("A::ValueA1"));
AbstractMetaEnumValue* enumValueB1 = enumB->values().last();
QCOMPARE(enumValueB1->name(), QLatin1String("ValueB1"));
- QCOMPARE(enumValueB1->value(), 0);
+ QCOMPARE(enumValueB1->value().value(), 0);
QCOMPARE(enumValueB1->stringValue(), QLatin1String("ValueA0"));
}
@@ -272,21 +272,25 @@ void TestEnum::testEnumValueFromExpression()
{
const char* cppCode ="\
struct A {\n\
- enum EnumA {\n\
+ enum EnumA : unsigned {\n\
ValueA0 = 3u,\n\
ValueA1 = ~3u,\n\
- ValueA2 = ~3,\n\
+ ValueA2 = 0xffffffff,\n\
ValueA3 = 0xf0,\n\
ValueA4 = 8 |ValueA3,\n\
ValueA5 = ValueA3|32,\n\
ValueA6 = ValueA3 >> 1,\n\
ValueA7 = ValueA3 << 1\n\
};\n\
+ enum EnumB : int {\n\
+ ValueB0 = ~3,\n\
+ };\n\
};\n";
const char* xmlCode = "\
<typesystem package=\"Foo\">\n\
<value-type name='A'>\n\
<enum-type name='EnumA'/>\n\
+ <enum-type name='EnumB'/>\n\
</value-type>\n\
</typesystem>\n";
@@ -298,47 +302,58 @@ void TestEnum::testEnumValueFromExpression()
AbstractMetaEnum* enumA = classA->findEnum(QLatin1String("EnumA"));
QVERIFY(enumA);
+ QVERIFY(!enumA->isSigned());
QCOMPARE(enumA->typeEntry()->qualifiedCppName(), QLatin1String("A::EnumA"));
AbstractMetaEnumValue* valueA0 = enumA->values().at(0);
QCOMPARE(valueA0->name(), QLatin1String("ValueA0"));
QCOMPARE(valueA0->stringValue(), QLatin1String("3u"));
- QCOMPARE(valueA0->value(), (int) 3u);
+ QCOMPARE(valueA0->value().unsignedValue(), 3u);
AbstractMetaEnumValue* valueA1 = enumA->values().at(1);
QCOMPARE(valueA1->name(), QLatin1String("ValueA1"));
QCOMPARE(valueA1->stringValue(), QLatin1String("~3u"));
- QCOMPARE(valueA1->value(), (int) ~3u);
+ QCOMPARE(valueA1->value().unsignedValue(), ~3u);
AbstractMetaEnumValue* valueA2 = enumA->values().at(2);
QCOMPARE(valueA2->name(), QLatin1String("ValueA2"));
- QCOMPARE(valueA2->stringValue(), QLatin1String("~3"));
- QCOMPARE(valueA2->value(), ~3);
+ QCOMPARE(valueA2->stringValue(), QLatin1String("0xffffffff"));
+ QCOMPARE(valueA2->value().unsignedValue(), 0xffffffffu);
AbstractMetaEnumValue* valueA3 = enumA->values().at(3);
QCOMPARE(valueA3->name(), QLatin1String("ValueA3"));
QCOMPARE(valueA3->stringValue(), QLatin1String("0xf0"));
- QCOMPARE(valueA3->value(), 0xf0);
+ QCOMPARE(valueA3->value().unsignedValue(), 0xf0u);
AbstractMetaEnumValue* valueA4 = enumA->values().at(4);
QCOMPARE(valueA4->name(), QLatin1String("ValueA4"));
QCOMPARE(valueA4->stringValue(), QLatin1String("8 |ValueA3"));
- QCOMPARE(valueA4->value(), 8|0xf0);
+ QCOMPARE(valueA4->value().unsignedValue(), 8|0xf0u);
AbstractMetaEnumValue* valueA5 = enumA->values().at(5);
QCOMPARE(valueA5->name(), QLatin1String("ValueA5"));
QCOMPARE(valueA5->stringValue(), QLatin1String("ValueA3|32"));
- QCOMPARE(valueA5->value(), 0xf0|32);
+ QCOMPARE(valueA5->value().unsignedValue(), 0xf0u|32);
AbstractMetaEnumValue* valueA6 = enumA->values().at(6);
QCOMPARE(valueA6->name(), QLatin1String("ValueA6"));
QCOMPARE(valueA6->stringValue(), QLatin1String("ValueA3 >> 1"));
- QCOMPARE(valueA6->value(), 0xf0 >> 1);
+ QCOMPARE(valueA6->value().unsignedValue(), 0xf0u >> 1);
AbstractMetaEnumValue* valueA7 = enumA->values().at(7);
QCOMPARE(valueA7->name(), QLatin1String("ValueA7"));
QCOMPARE(valueA7->stringValue(), QLatin1String("ValueA3 << 1"));
- QCOMPARE(valueA7->value(), 0xf0 << 1);
+ QCOMPARE(valueA7->value().unsignedValue(), 0xf0u << 1);
+
+ const AbstractMetaEnum *enumB = classA->findEnum(QLatin1String("EnumB"));
+ QVERIFY(enumB);
+ QVERIFY(enumB->isSigned());
+ QCOMPARE(enumB->typeEntry()->qualifiedCppName(), QLatin1String("A::EnumB"));
+ QCOMPARE(enumB->values().size(), 1);
+ const AbstractMetaEnumValue *valueB0 = enumB->values().at(0);
+ QCOMPARE(valueB0->name(), QLatin1String("ValueB0"));
+ QCOMPARE(valueB0->stringValue(), QLatin1String("~3"));
+ QCOMPARE(valueB0->value().value(), ~3);
}
void TestEnum::testPrivateEnum()
@@ -375,12 +390,12 @@ void TestEnum::testPrivateEnum()
AbstractMetaEnumValue* pub0 = publicEnum->values().first();
QCOMPARE(pub0->name(), QLatin1String("Pub0"));
- QCOMPARE(pub0->value(), 0x0f);
+ QCOMPARE(pub0->value().value(), 0x0f);
QCOMPARE(pub0->stringValue(), QLatin1String("Priv0"));
AbstractMetaEnumValue* pub1 = publicEnum->values().last();
QCOMPARE(pub1->name(), QLatin1String("Pub1"));
- QCOMPARE(pub1->value(), 0xf0);
+ QCOMPARE(pub1->value().value(), 0xf0);
QCOMPARE(pub1->stringValue(), QLatin1String("A::Priv1"));
}
@@ -408,12 +423,12 @@ void TestEnum::testTypedefEnum()
AbstractMetaEnumValue* enumValueA0 = enumA->values().first();
QCOMPARE(enumValueA0->name(), QLatin1String("A0"));
- QCOMPARE(enumValueA0->value(), 0);
+ QCOMPARE(enumValueA0->value().value(), 0);
QCOMPARE(enumValueA0->stringValue(), QLatin1String(""));
AbstractMetaEnumValue* enumValueA1 = enumA->values().last();
QCOMPARE(enumValueA1->name(), QLatin1String("A1"));
- QCOMPARE(enumValueA1->value(), 1);
+ QCOMPARE(enumValueA1->value().value(), 1);
QCOMPARE(enumValueA1->stringValue(), QString());
}
diff --git a/sources/shiboken2/ApiExtractor/typesystem.cpp b/sources/shiboken2/ApiExtractor/typesystem.cpp
index 600536aba..0a47b9b17 100644
--- a/sources/shiboken2/ApiExtractor/typesystem.cpp
+++ b/sources/shiboken2/ApiExtractor/typesystem.cpp
@@ -963,11 +963,6 @@ bool Handler::startElement(const QStringRef &n, const QXmlStreamAttributes &atts
m_currentEnum =
new EnumTypeEntry(QStringList(names.mid(0, names.size() - 1)).join(colonColon()),
names.constLast(), since);
- if (!attributes.value(enumIdentifiedByValueAttribute()).isEmpty()) {
- m_currentEnum->setEnumKind(EnumTypeEntry::AnonymousEnum);
- } else if (convertBoolean(attributes.value(classAttribute()), classAttribute(), false)) {
- m_currentEnum->setEnumKind(EnumTypeEntry::EnumClass);
- }
element->entry = m_currentEnum;
m_currentEnum->setCodeGeneration(m_generate);
m_currentEnum->setTargetLangPackage(m_defaultPackage);
diff --git a/sources/shiboken2/ApiExtractor/typesystem.h b/sources/shiboken2/ApiExtractor/typesystem.h
index 2f534c93d..eae064134 100644
--- a/sources/shiboken2/ApiExtractor/typesystem.h
+++ b/sources/shiboken2/ApiExtractor/typesystem.h
@@ -1041,12 +1041,6 @@ private:
class EnumTypeEntry : public TypeEntry
{
public:
- enum EnumKind {
- CEnum, // Standard C: enum Foo { value1, value2 }
- AnonymousEnum, // enum { value1, value2 }
- EnumClass // C++ 11 : enum class Foo { value1, value2 }
- };
-
explicit EnumTypeEntry(const QString &nspace, const QString &enumName,
const QVersionNumber &vr);
@@ -1068,9 +1062,6 @@ public:
m_qualifier = q;
}
- EnumKind enumKind() const { return m_enumKind; }
- void setEnumKind(EnumKind kind) { m_enumKind = kind; }
-
bool preferredConversion() const override;
bool isBoundsChecked() const
@@ -1136,8 +1127,6 @@ public:
m_forceInteger = force;
}
- bool isAnonymous() const { return m_enumKind == AnonymousEnum; }
-
private:
QString m_packageName;
QString m_qualifier;
@@ -1150,8 +1139,6 @@ private:
FlagsTypeEntry *m_flags = nullptr;
- EnumKind m_enumKind = CEnum;
-
bool m_extensible = false;
bool m_forceInteger = false;
};
diff --git a/sources/shiboken2/CMakeLists.txt b/sources/shiboken2/CMakeLists.txt
index e774a172b..b65e32974 100644
--- a/sources/shiboken2/CMakeLists.txt
+++ b/sources/shiboken2/CMakeLists.txt
@@ -56,6 +56,9 @@ endmacro()
set(CLANG_DIR "")
set(CLANG_DIR_SOURCE "")
+set(clang_not_found_message "Unable to detect CLANG location by checking LLVM_INSTALL_DIR, \
+ CLANG_INSTALL_DIR or running llvm-config.")
+
if (DEFINED ENV{LLVM_INSTALL_DIR})
set(CLANG_DIR $ENV{LLVM_INSTALL_DIR})
string(REPLACE "_ARCH_" "${PYTHON_ARCH}" CLANG_DIR "${CLANG_DIR}")
@@ -69,6 +72,10 @@ else ()
get_llvm_config()
endif()
set(CLANG_DIR_SOURCE "${LLVM_CONFIG}")
+ if ("${CLANG_DIR_SOURCE}" STREQUAL "")
+ message(FATAL_ERROR "${clang_not_found_message}")
+ endif()
+
EXEC_PROGRAM("${LLVM_CONFIG}" ARGS "--prefix" OUTPUT_VARIABLE CLANG_DIR)
if (NOT "${CLANG_DIR}" STREQUAL "")
EXEC_PROGRAM("${LLVM_CONFIG}" ARGS "--version" OUTPUT_VARIABLE CLANG_VERSION)
@@ -79,7 +86,7 @@ else ()
endif()
if ("${CLANG_DIR}" STREQUAL "")
- message(FATAL_ERROR "Unable to detect CLANG location by checking LLVM_INSTALL_DIR, CLANG_INSTALL_DIR or running llvm-config.")
+ message(FATAL_ERROR "${clang_not_found_message}")
elseif (NOT IS_DIRECTORY ${CLANG_DIR})
message(FATAL_ERROR "${CLANG_DIR} detected by ${CLANG_DIR_SOURCE} does not exist.")
endif()
diff --git a/sources/shiboken2/doc/README.md b/sources/shiboken2/doc/README.md
new file mode 100644
index 000000000..2575eafd2
--- /dev/null
+++ b/sources/shiboken2/doc/README.md
@@ -0,0 +1,12 @@
+# Shiboken Documentation
+
+The documentation was written and needs to be generated
+with [python-sphinx](http://www.sphinx-doc.org/en/master/)
+
+### Images
+
+The SVG diagrams use the Qt color scheme.
+The font also follows Qt styling, and it is called `Titillium`.
+It can be download from:
+* https://fonts.google.com/specimen/Titillium+Web
+* https://www.fontsquirrel.com/fonts/Titillium
diff --git a/sources/shiboken2/doc/codeinjectionsemantics.rst b/sources/shiboken2/doc/codeinjectionsemantics.rst
index d748a3aae..bf3ddbe5e 100644
--- a/sources/shiboken2/doc/codeinjectionsemantics.rst
+++ b/sources/shiboken2/doc/codeinjectionsemantics.rst
@@ -2,11 +2,12 @@
Code Injection Semantics
************************
-API Extractor provides the `inject-code
-<http://www.pyside.org/docs/apiextractor/typesystem_manipulating_objects.html#inject-code>`_ tag
-allowing the user to put custom written code to on specific locations of the generated code.
-Yet this is only part of what is needed to generate proper binding code, where the custom code
-should be written to depends upon the technology used on the generated binding code.
+API Extractor provides the `inject-code`_ tag allowing the user to put custom
+written code to on specific locations of the generated code.
+Yet this is only part of what is needed to generate proper binding code, where
+the custom code should be written to depends upon the technology used on the
+generated binding code.
+
This is the ``inject-code`` tag options that matters to |project|.
@@ -16,6 +17,7 @@ This is the ``inject-code`` tag options that matters to |project|.
// custom code
</inject-code>
+
Conventions
===========
@@ -86,7 +88,7 @@ The following table describes the semantics of ``inject-code`` tag as used on
| | | |signature. |
| +------+---------+--------------------------------------------------------------+
| |shell |beginning|Used only for virtual functions. The code is injected when the|
- | | | |function does not has a pyhton implementation, then the code |
+ | | | |function does not has a Python implementation, then the code |
| | | |is inserted before c++ call |
| | +---------+--------------------------------------------------------------+
| | |end |Same as above, but the code is inserted after c++ call |
@@ -158,7 +160,7 @@ If the argument is removed and no default value is provided, the generator will
not write any call to the method and expect the ``modify-function - target/beginning``
code injection to call the original C++ method on its own terms. If even this
custom code is not provided the generator will put an ``#error`` clause to
-prevent compilation of erroneus binding code.
+prevent compilation of erroneous binding code.
Calling the method with your own hands always!
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -352,7 +354,7 @@ Code injections to the class Python initialization function.
Code Injection for Modules
==========================
-The C++ libraries are wapped as Python modules, a collection of classes,
+The C++ libraries are wrapped as Python modules, a collection of classes,
functions, enums and namespaces. |project| creates wrapper files for all of
them and also one extra ``MODULENAME_module_wrapper.cpp`` to register the whole
module. Code injection xml tags who have the ``typesystem`` tag as parent will
@@ -395,3 +397,5 @@ to prevent bad custom code to pass unnoticed.
// Start of ``MODULENAME_module_wrapper.cpp``
+
+.. _`inject-code`: http://www.pyside.org/docs/apiextractor/typesystem_manipulating_objects.html#inject-code
diff --git a/sources/shiboken2/doc/dependency-pyqtb.svg b/sources/shiboken2/doc/dependency-pyqtb.svg
deleted file mode 100644
index a458bf6fb..000000000
--- a/sources/shiboken2/doc/dependency-pyqtb.svg
+++ /dev/null
@@ -1,600 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="800"
- height="340"
- id="svg2"
- sodipodi:version="0.32"
- inkscape:version="0.46"
- version="1.0"
- sodipodi:docname="dependency-pyqtb.svg"
- inkscape:output_extension="org.inkscape.output.svg.inkscape"
- inkscape:export-filename="/var/www/lauro/dependency-pyqtb.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4">
- <marker
- inkscape:stockid="Arrow1Lstart"
- orient="auto"
- refY="0"
- refX="0"
- id="Arrow1Lstart"
- style="overflow:visible">
- <path
- id="path3270"
- d="M 0,0 L 5,-5 L -12.5,0 L 5,5 L 0,0 z"
- style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
- transform="matrix(0.8,0,0,0.8,10,0)" />
- </marker>
- <marker
- inkscape:stockid="Arrow1Lend"
- orient="auto"
- refY="0"
- refX="0"
- id="Arrow1Lend"
- style="overflow:visible">
- <path
- id="path3679"
- d="M 0,0 L 5,-5 L -12.5,0 L 5,5 L 0,0 z"
- style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
- transform="matrix(-0.8,0,0,-0.8,-10,0)" />
- </marker>
- <inkscape:perspective
- sodipodi:type="inkscape:persp3d"
- inkscape:vp_x="0 : 526.18109 : 1"
- inkscape:vp_y="0 : 1000 : 0"
- inkscape:vp_z="744.09448 : 526.18109 : 1"
- inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
- id="perspective10" />
- <inkscape:perspective
- id="perspective3480"
- inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
- inkscape:vp_z="744.09448 : 526.18109 : 1"
- inkscape:vp_y="0 : 1000 : 0"
- inkscape:vp_x="0 : 526.18109 : 1"
- sodipodi:type="inkscape:persp3d" />
- <inkscape:perspective
- id="perspective3498"
- inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
- inkscape:vp_z="744.09448 : 526.18109 : 1"
- inkscape:vp_y="0 : 1000 : 0"
- inkscape:vp_x="0 : 526.18109 : 1"
- sodipodi:type="inkscape:persp3d" />
- <inkscape:perspective
- id="perspective3541"
- inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
- inkscape:vp_z="744.09448 : 526.18109 : 1"
- inkscape:vp_y="0 : 1000 : 0"
- inkscape:vp_x="0 : 526.18109 : 1"
- sodipodi:type="inkscape:persp3d" />
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- gridtolerance="10000"
- guidetolerance="10"
- objecttolerance="10"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="1.0425"
- inkscape:cx="400"
- inkscape:cy="170"
- inkscape:document-units="px"
- inkscape:current-layer="g3995"
- showgrid="false"
- showguides="true"
- inkscape:guide-bbox="true"
- inkscape:window-width="1280"
- inkscape:window-height="951"
- inkscape:window-x="0"
- inkscape:window-y="25" />
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(-94.976306,-355.09425)" />
- <g
- id="g4087"
- transform="translate(2.4157429e-6,1.9999951)">
- <g
- id="g3995"
- transform="translate(6,-3.2661035e-8)">
- <path
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.66823119px;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow1Lstart);marker-end:none;stroke-opacity:1"
- d="M 281.95594,47.06539 L 314.12853,47.06538"
- id="path2877"
- inkscape:connector-type="polyline" />
- <g
- id="g3801"
- transform="translate(-9.3125054,-154.20033)">
- <rect
- y="286.49988"
- x="322.2547"
- height="73.367416"
- width="194.85175"
- id="rect3595"
- style="fill:#9ac5ff;fill-opacity:1;fill-rule:evenodd;stroke:#003378;stroke-width:0.8142156;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- ry="10.318988"
- rx="8.598484" />
- <g
- transform="translate(1.7229236,-30.915768)"
- id="g3599">
- <text
- xml:space="preserve"
- style="font-size:16.27989578px;font-style:normal;font-weight:normal;fill:#00183c;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="329.46826"
- y="336.95081"
- id="text2443"><tspan
- sodipodi:role="line"
- id="tspan2445"
- x="329.46826"
- y="336.95081">API Extractor</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:8.40044498px;font-style:normal;font-weight:normal;fill:#00183c;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="329.46826"
- y="352.61548"
- id="text2447"><tspan
- sodipodi:role="line"
- id="tspan2449"
- x="329.46826"
- y="352.61548">0.2</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:9.33067703px;font-style:normal;font-weight:normal;fill:#00183c;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="329.46826"
- y="368.15546"
- id="text2451"><tspan
- sodipodi:role="line"
- x="329.46826"
- y="368.15546"
- id="tspan2453">Headers and libraries - compile-time</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:8.26250458px;font-style:normal;font-weight:normal;fill:#00183c;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="329.46826"
- y="383.47839"
- id="text2455"><tspan
- sodipodi:role="line"
- id="tspan2457"
- x="329.46826"
- y="383.47839">LGPL version 2.1</tspan></text>
- </g>
- </g>
- <g
- id="g3729"
- transform="translate(-9.3125054,-153.6367)">
- <rect
- y="164.01837"
- x="322.2547"
- height="73.367416"
- width="194.85175"
- id="rect2459"
- style="fill:#9ac5ff;fill-opacity:1;fill-rule:evenodd;stroke:#003378;stroke-width:0.8142156;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- ry="10.318988"
- rx="8.598484" />
- <g
- transform="translate(3.673984,2.3276517)"
- id="g3585">
- <text
- xml:space="preserve"
- style="font-size:16.27989578px;font-style:normal;font-weight:normal;fill:#00183c;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="329.46826"
- y="181.23659"
- id="text2461"><tspan
- sodipodi:role="line"
- id="tspan2463"
- x="329.46826"
- y="181.23659">Shiboken (generator)</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:8.40044498px;font-style:normal;font-weight:normal;fill:#00183c;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="329.46826"
- y="196.90126"
- id="text2465"><tspan
- sodipodi:role="line"
- id="tspan2467"
- x="329.46826"
- y="196.90126">0.1</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:9.33067703px;font-style:normal;font-weight:normal;fill:#00183c;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="329.46826"
- y="212.44124"
- id="text2469"><tspan
- sodipodi:role="line"
- x="329.46826"
- y="212.44124"
- id="tspan2471">Binary executable - compile-time</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:8.26250458px;font-style:normal;font-weight:normal;fill:#00183c;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="329.46826"
- y="227.76418"
- id="text2473"><tspan
- sodipodi:role="line"
- id="tspan2475"
- x="329.46826"
- y="227.76418">GPL version 2</tspan></text>
- </g>
- </g>
- <g
- id="g3789"
- transform="translate(-9.3125054,-154.20033)">
- <rect
- y="406.48441"
- x="322.2547"
- height="73.367416"
- width="194.85175"
- id="rect3597"
- style="fill:#f3a6a6;fill-opacity:1;fill-rule:evenodd;stroke:#6a0e0e;stroke-width:0.8142156;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- ry="10.318988"
- rx="8.598484" />
- <g
- transform="translate(-0.7447933,-64)"
- id="g3633">
- <text
- xml:space="preserve"
- style="font-size:16.27989578px;font-style:normal;font-weight:normal;fill:#350707;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="329.46826"
- y="489.09369"
- id="text2565"><tspan
- sodipodi:role="line"
- id="tspan2567"
- x="329.46826"
- y="489.09369">boost::graph</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:8.40044498px;font-style:normal;font-weight:normal;fill:#350707;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="329.46826"
- y="504.75836"
- id="text2569"><tspan
- sodipodi:role="line"
- id="tspan2571"
- x="329.46826"
- y="504.75836">1.38.0</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:9.33067703px;font-style:normal;font-weight:normal;fill:#350707;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="329.46826"
- y="520.29834"
- id="text2573"><tspan
- sodipodi:role="line"
- x="329.46826"
- y="520.29834"
- id="tspan2575">headers and libraries - compile-time</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:8.26250458px;font-style:normal;font-weight:normal;fill:#350707;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="329.46826"
- y="535.62128"
- id="text2577"><tspan
- sodipodi:role="line"
- id="tspan2579"
- x="329.46826"
- y="535.62128">Boost Software License 1.0</tspan></text>
- </g>
- </g>
- <path
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.77180147px;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow1Lstart);marker-end:none;stroke-opacity:1"
- d="M 410.36806,130.70564 L 410.36806,83.52386"
- id="path2879"
- inkscape:connector-type="polyline" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.77360356px;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow1Lstart);marker-mid:none;marker-end:none;stroke-opacity:1"
- d="M 410.36806,252.57322 L 410.36806,207.23899"
- id="path2881"
- inkscape:connector-type="polyline" />
- <g
- id="g3565"
- transform="translate(1.4608973,-106.88798)">
- <rect
- ry="22.567146"
- y="268.8403"
- x="6.7667637"
- height="163.45378"
- width="273.78238"
- id="rect7541"
- style="fill:#e3e2db;stroke:#000000;stroke-width:1.30499184;stroke-opacity:1"
- rx="22.567146" />
- <g
- transform="translate(0.2849671,3.2991583)"
- id="g3547">
- <g
- id="g3516"
- transform="translate(0,63.999998)">
- <text
- id="text7543"
- y="339.74512"
- x="76.614265"
- style="font-size:20.61732101px;font-style:normal;font-weight:normal;fill:#350707;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- xml:space="preserve"><tspan
- y="339.74512"
- x="76.614265"
- id="tspan7545"
- sodipodi:role="line">Boost</tspan></text>
- <rect
- ry="6.4285707"
- y="321.55374"
- x="21.614267"
- height="22.5"
- width="43.163269"
- id="rect7555"
- style="fill:#f3a6a6;fill-opacity:1;stroke:#6a0e0e;stroke-width:0.64285713;stroke-opacity:1"
- rx="6.4285707" />
- </g>
- <g
- id="g3521"
- transform="translate(0,-2.9523642)">
- <text
- id="text7547"
- y="372.67505"
- x="76.614265"
- style="font-size:20.61732101px;font-style:normal;font-weight:normal;fill:#1c2d0f;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- xml:space="preserve"><tspan
- y="372.67505"
- x="76.614265"
- id="tspan7549"
- sodipodi:role="line">Qt Software</tspan></text>
- <rect
- ry="6.4285707"
- y="355.4823"
- x="21.614267"
- height="22.5"
- width="43.163269"
- id="rect7561"
- style="fill:#97ce6c;fill-opacity:1;stroke:#385a1e;stroke-width:0.64285713;stroke-opacity:1"
- rx="6.4285707" />
- </g>
- <g
- id="g3486"
- transform="translate(0,2.8342009e-5)">
- <text
- id="text7551"
- y="304.38055"
- x="76.614265"
- style="font-size:20.61732101px;font-style:normal;font-weight:normal;fill:#00193c;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- xml:space="preserve"><tspan
- y="304.38055"
- x="76.614265"
- id="tspan7553"
- sodipodi:role="line">INdT/Nokia</tspan></text>
- <rect
- ry="6.4285707"
- y="286.4823"
- x="21.614267"
- height="22.5"
- width="43.163269"
- id="rect7563"
- style="fill:#9ac5ff;fill-opacity:1;stroke:#003378;stroke-width:0.64285713;stroke-opacity:1"
- rx="6.4285707" />
- </g>
- <g
- id="g3526"
- transform="translate(-1.3182277,-35.976168)"
- style="fill:#ffe052;fill-opacity:1">
- <text
- id="text3528"
- y="372.67505"
- x="76.614265"
- style="font-size:20.61732101px;font-style:normal;font-weight:normal;fill:#3c3100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- xml:space="preserve"><tspan
- y="372.67505"
- x="76.614265"
- id="tspan3530"
- sodipodi:role="line">Python Foundation</tspan></text>
- <rect
- ry="6.4285707"
- y="355.4823"
- x="21.614267"
- height="22.5"
- width="43.163269"
- id="rect3532"
- style="fill:#ffe052;fill-opacity:1;stroke:#786200;stroke-width:0.64285713;stroke-opacity:1"
- rx="6.4285707" />
- </g>
- </g>
- </g>
- <g
- id="g3717"
- transform="translate(232.28126,-66.767457)">
- <rect
- y="77.149132"
- x="322.2547"
- height="73.367416"
- width="194.85175"
- id="rect3657"
- style="fill:#9ac5ff;fill-opacity:1;fill-rule:evenodd;stroke:#003378;stroke-width:0.8142156;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- ry="10.318988"
- rx="8.598484" />
- <g
- transform="translate(4.8773009,-84.541588)"
- id="g3659">
- <text
- xml:space="preserve"
- style="font-size:16.27989578px;font-style:normal;font-weight:normal;fill:#00183c;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="329.46826"
- y="181.23659"
- id="text3661"><tspan
- sodipodi:role="line"
- id="tspan3663"
- x="329.46826"
- y="181.23659">libshiboken</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:8.40044498px;font-style:normal;font-weight:normal;fill:#00183c;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="329.46826"
- y="196.90126"
- id="text3665"><tspan
- sodipodi:role="line"
- id="tspan3667"
- x="329.46826"
- y="196.90126">0.1</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:9.33067703px;font-style:normal;font-weight:normal;fill:#00183c;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="329.46826"
- y="212.44124"
- id="text3669"><tspan
- sodipodi:role="line"
- x="329.46826"
- y="212.44124"
- id="tspan3671">Headers and libraries - compile-time</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:8.26250458px;font-style:normal;font-weight:normal;fill:#00183c;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="329.46826"
- y="227.76418"
- id="text3673"><tspan
- sodipodi:role="line"
- id="tspan3675"
- x="329.46826"
- y="227.76418">LGPL version 2.1</tspan></text>
- </g>
- </g>
- <g
- id="g3752"
- transform="translate(-10.802055,-155.79173)">
- <rect
- rx="8.3239012"
- y="166.21593"
- x="18.860012"
- height="73.282379"
- width="274.18781"
- id="rect2417"
- style="fill:#97ce6c;fill-opacity:1;fill-rule:evenodd;stroke:#385a1e;stroke-width:0.96558368px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- ry="9.2689295" />
- <g
- id="g3741">
- <text
- xml:space="preserve"
- style="font-size:16.27989578px;font-style:normal;font-weight:normal;fill:#1c2d0f;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="29.111408"
- y="183.02223"
- id="text2419"><tspan
- sodipodi:role="line"
- id="tspan2421"
- x="29.111408"
- y="183.02223">Qt 4.5</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:8.40044498px;font-style:normal;font-weight:normal;fill:#1c2d0f;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="29.111408"
- y="198.68694"
- id="text2423"><tspan
- sodipodi:role="line"
- id="tspan2425"
- x="29.111408"
- y="198.68694">4.5</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:9.33067703px;font-style:normal;font-weight:normal;fill:#1c2d0f;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="29.111408"
- y="214.22688"
- id="text2427"><tspan
- sodipodi:role="line"
- id="tspan2429"
- x="29.111408"
- y="214.22688">headers and libraries - compile-time and run-time</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:8.26250458px;font-style:normal;font-weight:normal;fill:#1c2d0f;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="29.111408"
- y="224.19267"
- id="text2431"><tspan
- sodipodi:role="line"
- id="tspan2433"
- x="29.111408"
- y="224.19267">GNU General Public License v3 /</tspan><tspan
- id="tspan2472"
- sodipodi:role="line"
- x="29.111408"
- y="234.5208">GNU Lesser General Public Licence v2.1</tspan></text>
- </g>
- </g>
- <g
- id="g3765"
- transform="translate(201.65125,55.15042)">
- <rect
- y="77.208275"
- x="322.31384"
- height="73.24913"
- width="255.99348"
- id="rect3767"
- style="fill:#ffe052;fill-opacity:1;fill-rule:evenodd;stroke:#786200;stroke-width:0.93250537;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- ry="10.318988"
- rx="8.598484" />
- <g
- transform="translate(4.8773009,-84.541588)"
- id="g3769">
- <text
- xml:space="preserve"
- style="font-size:16.27989578px;font-style:normal;font-weight:normal;fill:#3c3100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="329.46826"
- y="181.23659"
- id="text3771"><tspan
- sodipodi:role="line"
- id="tspan3773"
- x="329.46826"
- y="181.23659">Python</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:8.40044498px;font-style:normal;font-weight:normal;fill:#3c3100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="329.46826"
- y="196.90126"
- id="text3775"><tspan
- sodipodi:role="line"
- id="tspan3777"
- x="329.46826"
- y="196.90126">2.6</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:9.33067703px;font-style:normal;font-weight:normal;fill:#3c3100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="329.46826"
- y="212.44124"
- id="text3779"><tspan
- sodipodi:role="line"
- x="329.46826"
- y="212.44124"
- id="tspan3781">Headers and libraries - compile-time and run-time</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:8.26250458px;font-style:normal;font-weight:normal;fill:#3c3100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="329.46826"
- y="227.76418"
- id="text3783"><tspan
- sodipodi:role="line"
- id="tspan3785"
- x="329.46826"
- y="227.76418">Python license</tspan></text>
- </g>
- </g>
- <path
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.77180147px;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow1Lstart);marker-end:none;stroke-opacity:1"
- d="M 651.96184,131.80908 L 651.96184,84.6273"
- id="path3787"
- inkscape:connector-type="polyline" />
- </g>
- </g>
-</svg>
diff --git a/sources/shiboken2/doc/faq.rst b/sources/shiboken2/doc/faq.rst
index 77e0fbdfc..4b2bf9eea 100644
--- a/sources/shiboken2/doc/faq.rst
+++ b/sources/shiboken2/doc/faq.rst
@@ -2,8 +2,8 @@
Frequently Asked Questions
**************************
-This is a list of Frequently Asked Questions about |project|. Feel free to
-suggest new entries!
+This is a list of Frequently Asked Questions about |project|.
+Feel free to suggest new entries using our `Mailing list`_ or our IRC channel!
General
=======
@@ -11,17 +11,20 @@ General
What is Shiboken?
-----------------
-Shiboken is a `GeneratorRunner <http://www.pyside.org/home-binding/binding-generator>`_
-plugin that outputs C++ code for CPython extensions. The first version of PySide
-had source code based on Boost templates. It was easier to produce code but a
-paradigm change was needed, as the next question explains.
+Shiboken is a `GeneratorRunner`_ that outputs C++ code for CPython
+extensions.
+The first version of PySide had source code based on Boost templates.
+It was easier to produce code but a paradigm change was needed, as the next
+question explains.
+
Why did you switch from Boost.Python to Shiboken?
-------------------------------------------------
-The main reason was the size reduction. Boost.Python makes excessive use of templates
-resulting in a significant increase of the binaries size. On the other hand, as Shiboken
-generates CPython code, the resulting binaries are smaller.
+The main reason was the size reduction. Boost.Python makes excessive use of
+templates resulting in a significant increase of the binaries size.
+On the other hand, as Shiboken generates CPython code, the resulting binaries
+are smaller.
Creating bindings
=================
@@ -41,13 +44,12 @@ and the C++ library that is being wrapped.
What do I have to do to create my bindings?
-------------------------------------------
-.. todo: put link to typesystem documentation
+Most of the work is already done by the API Extractor.
+The developer creates a `typesystem`_ file with any customization wanted in
+the generated code, like removing classes or changing method signatures.
+The generator will output the *.h* and *.cpp* files with the CPython code that
+will wrap the target library for python.
-Most of the work is already done by the API Extractor. The developer creates
-a `typesystem <http://www.pyside.org/docs/apiextractor/typesystem.html>`_ file
-with any customization wanted in the generated code, like removing classes or
-changing method signatures. The generator will output the .h and .cpp files
-with the CPython code that will wrap the target library for python.
Is there any recommended build system?
--------------------------------------
@@ -63,5 +65,8 @@ What is 'inject code'?
----------------------
That's how we call customized code that will be *injected* into the
-generated at specific locations. They are specified inside the typesytem.
+generated at specific locations. They are specified inside the typesystem.
+.. _`Mailing list`: http://lists.qt-project.org/mailman/listinfo/pyside
+.. _`GeneratorRunner`: http://www.pyside.org/home-binding/binding-generator
+.. _`typesystem`: http://www.pyside.org/docs/apiextractor/typesystem.html
diff --git a/sources/shiboken2/doc/images/bindinggen-development.png b/sources/shiboken2/doc/images/bindinggen-development.png
index 2dd64ba1d..5931b126a 100644
--- a/sources/shiboken2/doc/images/bindinggen-development.png
+++ b/sources/shiboken2/doc/images/bindinggen-development.png
Binary files differ
diff --git a/sources/shiboken2/doc/images/bindinggen-development.svg b/sources/shiboken2/doc/images/bindinggen-development.svg
index 3b6b3a26e..591e1f2d1 100644
--- a/sources/shiboken2/doc/images/bindinggen-development.svg
+++ b/sources/shiboken2/doc/images/bindinggen-development.svg
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
@@ -12,9 +13,9 @@
height="200"
id="svg2"
sodipodi:version="0.32"
- inkscape:version="0.46"
+ inkscape:version="0.92.2 2405546, 2018-03-11"
version="1.0"
- sodipodi:docname="bindgen-development.svg"
+ sodipodi:docname="bindinggen-development.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
inkscape:export-filename="bindinggen-development.png"
inkscape:export-xdpi="90"
@@ -140,22 +141,24 @@
objecttolerance="10"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="1.0859375"
- inkscape:cx="320"
- inkscape:cy="136.17463"
+ inkscape:zoom="0.76787377"
+ inkscape:cx="286.61779"
+ inkscape:cy="101.18182"
inkscape:document-units="px"
- inkscape:current-layer="g5658"
+ inkscape:current-layer="g5440"
showgrid="false"
- inkscape:window-width="1156"
- inkscape:window-height="883"
- inkscape:window-x="1396"
- inkscape:window-y="35"
+ inkscape:window-width="1116"
+ inkscape:window-height="1042"
+ inkscape:window-x="10"
+ inkscape:window-y="28"
showguides="true"
- inkscape:guide-bbox="true">
+ inkscape:guide-bbox="true"
+ inkscape:window-maximized="0">
<sodipodi:guide
orientation="1,0"
position="-557.55608,678.10875"
- id="guide7299" />
+ id="guide7299"
+ inkscape:locked="false" />
</sodipodi:namedview>
<metadata
id="metadata7">
@@ -176,7 +179,7 @@
<flowRoot
xml:space="preserve"
id="flowRoot3229"
- style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ style="font-style:normal;font-weight:normal;line-height:0.01%;font-family:'Bitstream Vera Sans';fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
transform="translate(4.1137413,-2.3429609)"><flowRegion
id="flowRegion3231"><rect
id="rect3233"
@@ -184,166 +187,269 @@
height="40.5849"
x="388.45547"
y="279.5423" /></flowRegion><flowPara
- id="flowPara3235" /></flowRoot> <g
+ id="flowPara3235"
+ style="font-size:40px;line-height:1.25"> </flowPara></flowRoot> <g
id="g5658"
transform="translate(6.5767925,7.0112479)">
<g
- id="g5634">
+ transform="matrix(0,-1,1,0,697.50638,3244.256)"
+ id="g5624"
+ style="">
+ <g
+ id="g5626"
+ transform="matrix(0,-1,1,0,-294.81158,2953.0504)"
+ style="">
+ <path
+ sodipodi:nodetypes="cc"
+ inkscape:connector-type="polyline"
+ id="path5628"
+ d="m 1586.5317,1348.2858 0.091,41.5266"
+ style="display:inline;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-start:none"
+ inkscape:connector-curvature="0" />
+ <path
+ style="display:inline;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-start:none"
+ d="m 1586.7489,1389.4756 7.9979,-9.1068"
+ id="path5630"
+ inkscape:connector-type="polyline"
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0" />
+ <path
+ style="display:inline;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-start:none"
+ d="m 1586.6031,1389.5063 -7.9979,-9.1069"
+ id="path5632"
+ inkscape:connector-type="polyline"
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0" />
+ </g>
+ </g>
+ <g
+ transform="matrix(0,-1,1,0,908.50929,3242.9612)"
+ id="g5648"
+ style="">
+ <g
+ id="g5650"
+ transform="matrix(0,-1,1,0,-294.81158,2953.0504)"
+ style="">
+ <path
+ sodipodi:nodetypes="cc"
+ inkscape:connector-type="polyline"
+ id="path5652"
+ d="m 1586.5317,1348.2858 0.091,41.5266"
+ style="display:inline;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-start:none"
+ inkscape:connector-curvature="0" />
+ <path
+ style="display:inline;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-start:none"
+ d="m 1586.7489,1389.4756 7.9979,-9.1068"
+ id="path5654"
+ inkscape:connector-type="polyline"
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0" />
+ <path
+ style="display:inline;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-start:none"
+ d="m 1586.6031,1389.5063 -7.9979,-9.1069"
+ id="path5656"
+ inkscape:connector-type="polyline"
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0" />
+ </g>
+ </g>
+ <g
+ id="g5634"
+ style="">
<g
id="g6271"
- transform="translate(1086.3689,746.93837)">
+ transform="translate(1086.3689,746.93837)"
+ style="">
<g
transform="matrix(0,-1,1,0,-294.81158,2953.0504)"
- id="g6252">
+ id="g6252"
+ style="">
<path
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline"
- d="M 1586.5317,1300.2858 L 1586.6222,1389.8124"
+ style="display:inline;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-start:none"
+ d="m 1586.5317,1300.2858 0.091,89.5266"
id="path11089"
inkscape:connector-type="polyline"
- sodipodi:nodetypes="cc" />
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-type="polyline"
id="path2758"
- d="M 1586.7489,1389.4756 L 1594.7468,1380.3688"
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline" />
+ d="m 1586.7489,1389.4756 7.9979,-9.1068"
+ style="display:inline;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-start:none"
+ inkscape:connector-curvature="0" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-type="polyline"
id="path2760"
- d="M 1586.6031,1389.5063 L 1578.6052,1380.3994"
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline" />
+ d="m 1586.6031,1389.5063 -7.9979,-9.1069"
+ style="display:inline;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-start:none"
+ inkscape:connector-curvature="0" />
</g>
</g>
</g>
<g
- transform="translate(134.35978,44.472131)"
- id="g2777">
- <rect
- style="fill:#addc52;fill-opacity:1;stroke:#6ca400;stroke-width:0.82399696;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="rect5172"
- width="185.49777"
- height="75.08918"
- x="2047.775"
- y="2029.4594"
- ry="3.0323718"
- rx="2.6724329" />
- <text
- xml:space="preserve"
- style="font-size:40px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#035800;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="2140.5562"
- y="2062.9375"
- id="text5174"><tspan
- sodipodi:role="line"
- x="2140.5562"
- y="2062.9375"
- style="font-size:22px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;text-anchor:middle;fill:#050800;fill-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold"
- id="tspan5176">Qt bindings</tspan><tspan
- id="tspan6109"
- sodipodi:role="line"
- x="2140.5562"
- y="2084.457"
- style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;fill:#050800;fill-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans">(generated code)</tspan></text>
- </g>
- <g
- transform="translate(141.86951,-31.391207)"
- id="g3216">
- <rect
- style="fill:#bff3bc;fill-opacity:1;stroke:#0af400;stroke-width:0.64492828;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="rect3625"
- width="185.67708"
- height="75.268074"
- x="1829.1727"
- y="2105.2332"
- ry="2.3353095"
- rx="2.1257713" />
- <text
- xml:space="preserve"
- style="font-size:38.71272278px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#035800;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="1921.9705"
- y="2136.9409"
- id="text3627"
- transform="scale(1.0000266,0.9999734)"><tspan
- id="tspan3697"
- sodipodi:role="line"
- x="1921.9705"
- y="2136.9409"
- style="font-size:21.29199791px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;text-anchor:middle;fill:#035800;fill-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold">generator</tspan><tspan
- sodipodi:role="line"
- x="1921.9705"
- y="2163.5559"
- style="font-size:21.29199791px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;text-anchor:middle;fill:#035800;fill-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold"
- id="tspan2464">front-end</tspan></text>
- </g>
- <g
- id="g5641">
+ id="g5641"
+ style="">
<g
id="g5465"
- transform="translate(874.42628,746.93837)">
+ transform="translate(874.42628,746.93837)"
+ style="">
<g
transform="matrix(0,-1,1,0,-294.81158,2953.0504)"
- id="g5467">
+ id="g5467"
+ style="">
<path
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline"
- d="M 1586.5317,1300.2858 L 1586.6222,1389.8124"
+ style="display:inline;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-start:none"
+ d="m 1586.5317,1300.2858 0.091,89.5266"
id="path5469"
inkscape:connector-type="polyline"
- sodipodi:nodetypes="cc" />
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-type="polyline"
id="path5471"
- d="M 1586.7489,1389.4756 L 1594.7468,1380.3688"
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline" />
+ d="m 1586.7489,1389.4756 7.9979,-9.1068"
+ style="display:inline;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-start:none"
+ inkscape:connector-curvature="0" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-type="polyline"
id="path5473"
- d="M 1586.6031,1389.5063 L 1578.6052,1380.3994"
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline" />
+ d="m 1586.6031,1389.5063 -7.9979,-9.1069"
+ style="display:inline;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-start:none"
+ inkscape:connector-curvature="0" />
</g>
</g>
</g>
<g
transform="translate(-194.79968,-212.08495)"
id="g5440">
- <rect
- rx="1.2158648"
- ry="2.9911308"
- y="2285.8806"
- x="1953.809"
- height="75.360634"
- width="185.76964"
- id="rect3166"
- style="fill:#dfe994;fill-opacity:1;stroke:#d5f400;stroke-width:0.55236381;stroke-opacity:1" />
+ <path
+ style="fill:#41cd52;fill-opacity:1;stroke:none;stroke-width:2.18747473;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 2378.6251,2292.247 v 66.9548 h 171.1068 l 14.8788,-14.8788 v -66.9549 h -171.1068 z"
+ id="path3715-5-6-7-9-8-7"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccc" />
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;line-height:0%;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.29069424px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
+ x="2471.614"
+ y="2309.093"
+ id="text5174"><tspan
+ sodipodi:role="line"
+ x="2471.614"
+ y="2309.093"
+ style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-size:24px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:'Titillium, Semi-Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:1.29069424px;"
+ id="tspan953">Qt for Python</tspan><tspan
+ id="tspan6109"
+ sodipodi:role="line"
+ x="2471.614"
+ y="2339.093"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:1.29069424px;">(generated code)</tspan></text>
+ <path
+ style="fill:#6b7080;fill-opacity:1;stroke:none;stroke-width:2.18747473;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 2166.5963,2292.247 v 66.9548 h 171.1068 l 14.8788,-14.8788 v -66.9549 h -171.1068 z"
+ id="path3715-5-6-7-9-8-7-9-94"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccc" />
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;line-height:0%;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.50930572px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
+ x="2259.1294"
+ y="2311.0505"
+ id="text3627"
+ transform="scale(1.0000266,0.9999734)"><tspan
+ id="tspan3697"
+ sodipodi:role="line"
+ x="2259.1294"
+ y="2311.0505"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:1.50930572px;">generator</tspan><tspan
+ sodipodi:role="line"
+ x="2259.1294"
+ y="2341.0505"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:1.50930572px;"
+ id="tspan2464">front-end</tspan></text>
+ <path
+ style="fill:#6b7080;fill-opacity:1;stroke:none;stroke-width:2.18747473;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 1959.8625,2292.2469 v 66.9548 h 171.1068 l 14.8788,-14.8788 v -66.9549 h -171.1068 z"
+ id="path3715-5-6-7-9-8-7-9-1"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccc" />
<text
id="text3168"
- y="2328.8809"
- x="2046.646"
- style="font-size:27.94354057px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#4c5800;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ y="2326.4568"
+ x="2052.7678"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;line-height:0%;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.65129721px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
xml:space="preserve"><tspan
- style="font-size:19.56047821px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;text-anchor:middle;fill:#4c5800;fill-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
- y="2328.8809"
- x="2046.646"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:1.65129721px;"
+ y="2326.4568"
+ x="2052.7678"
sodipodi:role="line"
id="tspan5424">API Extractor</tspan></text>
+ <path
+ style="fill:#9d9faa;fill-opacity:1;stroke:none;stroke-width:2.18747473;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 2378.6251,2393.0867 v 66.9548 h 171.1068 l 14.8788,-14.8788 v -66.9549 h -171.1068 z"
+ id="path3715-5-6-7-9-8-7-9-9"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccc" />
+ <text
+ id="text3487"
+ y="2410.3647"
+ x="2471.614"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;line-height:0%;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.44197154px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
+ xml:space="preserve"><tspan
+ id="tspan2509"
+ style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-size:24px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:'Titillium, Semi-Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:1.44197154px;"
+ y="2410.3647"
+ x="2471.614"
+ sodipodi:role="line">typesystem</tspan><tspan
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:1.44197154px;"
+ y="2440.3647"
+ x="2471.614"
+ sodipodi:role="line"
+ id="tspan5432">(handwritten)</tspan></text>
+ <path
+ style="fill:#9d9faa;fill-opacity:1;stroke:none;stroke-width:2.18747473;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 2166.5963,2394.0075 v 66.9548 h 171.1068 l 14.8788,-14.8788 v -66.9549 h -171.1068 z"
+ id="path3715-5-6-7-9-8-7-9"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccc" />
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;line-height:0%;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.58586931px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
+ x="2259.5852"
+ y="2412.0415"
+ id="text2735"><tspan
+ sodipodi:role="line"
+ x="2259.5852"
+ y="2412.0415"
+ style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-size:24px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:'Titillium, Semi-Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:1.58586931px;"
+ id="tspan2737">injected code</tspan><tspan
+ id="tspan2743"
+ sodipodi:role="line"
+ x="2259.5852"
+ y="2442.0415"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:1.58586931px;">(handwritten)</tspan></text>
</g>
<g
transform="translate(-102.30216,-279.71223)"
- id="g5541">
+ id="g5541"
+ style="stroke:none">
<path
sodipodi:type="arc"
- style="fill:#f28888;fill-opacity:1;stroke:#d5f400;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:3, 3;stroke-dashoffset:0;stroke-opacity:1"
+ style="fill:#f28888;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:3, 3;stroke-dashoffset:0;stroke-opacity:1"
id="path5535"
sodipodi:cx="255.10791"
sodipodi:cy="326.69064"
sodipodi:rx="38.848923"
sodipodi:ry="38.848923"
- d="M 293.95683,326.69064 A 38.848923,38.848923 0 1 1 216.25899,326.69064 A 38.848923,38.848923 0 1 1 293.95683,326.69064 z"
+ d="m 293.95683,326.69064 a 38.848923,38.848923 0 0 1 -38.84892,38.84893 38.848923,38.848923 0 0 1 -38.84892,-38.84893 38.848923,38.848923 0 0 1 38.84892,-38.84892 38.848923,38.848923 0 0 1 38.84892,38.84892 z"
transform="matrix(0.4405339,0,0,0.4405339,1842.2283,2282.9708)" />
<text
xml:space="preserve"
- style="font-size:27.62000275px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ style="font-style:normal;font-weight:normal;line-height:0%;font-family:Titillium;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;-inkscape-font-specification:'Titillium, Normal';font-stretch:normal;font-variant:normal;font-size:26.66666667px;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal"
x="1946.3259"
y="2435.7"
id="text5537"><tspan
@@ -351,24 +457,25 @@
id="tspan5539"
x="1946.3259"
y="2435.7"
- style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:FreeMono;-inkscape-font-specification:FreeMono Bold">1</tspan></text>
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:26.66666667px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;stroke:none">1</tspan></text>
</g>
<g
transform="translate(52.589867,-352.69787)"
- id="g5546">
+ id="g5546"
+ style="stroke:none">
<path
sodipodi:type="arc"
- style="fill:#f28888;fill-opacity:1;stroke:#d5f400;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:3, 3;stroke-dashoffset:0;stroke-opacity:1"
+ style="fill:#f28888;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:3, 3;stroke-dashoffset:0;stroke-opacity:1"
id="path5548"
sodipodi:cx="255.10791"
sodipodi:cy="326.69064"
sodipodi:rx="38.848923"
sodipodi:ry="38.848923"
- d="M 293.95683,326.69064 A 38.848923,38.848923 0 1 1 216.25899,326.69064 A 38.848923,38.848923 0 1 1 293.95683,326.69064 z"
+ d="m 293.95683,326.69064 a 38.848923,38.848923 0 0 1 -38.84892,38.84893 38.848923,38.848923 0 0 1 -38.84892,-38.84893 38.848923,38.848923 0 0 1 38.84892,-38.84892 38.848923,38.848923 0 0 1 38.84892,38.84892 z"
transform="matrix(0.4405339,0,0,0.4405339,1842.2283,2282.9708)" />
<text
xml:space="preserve"
- style="font-size:27.62000275px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ style="font-style:normal;font-weight:normal;line-height:0%;font-family:Titillium;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;-inkscape-font-specification:'Titillium, Normal';font-stretch:normal;font-variant:normal;font-size:26.66666667px;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal"
x="1946.3259"
y="2435.7"
id="text5550"><tspan
@@ -376,134 +483,25 @@
id="tspan5552"
x="1946.3259"
y="2435.7"
- style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:FreeMono;-inkscape-font-specification:FreeMono Bold">2</tspan></text>
- </g>
- <g
- transform="matrix(0,-1,1,0,697.50638,3244.256)"
- id="g5624">
- <g
- id="g5626"
- transform="matrix(0,-1,1,0,-294.81158,2953.0504)">
- <path
- sodipodi:nodetypes="cc"
- inkscape:connector-type="polyline"
- id="path5628"
- d="M 1586.5317,1348.2858 L 1586.6222,1389.8124"
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline"
- d="M 1586.7489,1389.4756 L 1594.7468,1380.3688"
- id="path5630"
- inkscape:connector-type="polyline"
- sodipodi:nodetypes="cc" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline"
- d="M 1586.6031,1389.5063 L 1578.6052,1380.3994"
- id="path5632"
- inkscape:connector-type="polyline"
- sodipodi:nodetypes="cc" />
- </g>
- </g>
- <g
- transform="translate(5.3442137,15.993306)"
- id="g5459">
- <rect
- rx="2.4652832"
- ry="2.9818845"
- y="2151.3206"
- x="1965.7682"
- height="75.127686"
- width="185.53668"
- id="rect3485"
- style="fill:#b2e994;fill-opacity:1;stroke:#56f400;stroke-width:0.78531456;stroke-opacity:1" />
- <text
- id="text3487"
- y="2184.2461"
- x="2059.1909"
- style="font-size:27.94354057px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#1f5800;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- xml:space="preserve"><tspan
- id="tspan2509"
- style="font-size:19.56047821px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;text-anchor:middle;fill:#1f5800;fill-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
- y="2184.2461"
- x="2059.1909"
- sodipodi:role="line">typesystem</tspan><tspan
- style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;fill:#1f5800;fill-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
- y="2205.1477"
- x="2059.1909"
- sodipodi:role="line"
- id="tspan5432">(handwritten)</tspan></text>
- </g>
- <g
- transform="matrix(0,-1,1,0,908.50929,3242.9612)"
- id="g5648">
- <g
- id="g5650"
- transform="matrix(0,-1,1,0,-294.81158,2953.0504)">
- <path
- sodipodi:nodetypes="cc"
- inkscape:connector-type="polyline"
- id="path5652"
- d="M 1586.5317,1348.2858 L 1586.6222,1389.8124"
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline"
- d="M 1586.7489,1389.4756 L 1594.7468,1380.3688"
- id="path5654"
- inkscape:connector-type="polyline"
- sodipodi:nodetypes="cc" />
- <path
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline"
- d="M 1586.6031,1389.5063 L 1578.6052,1380.3994"
- id="path5656"
- inkscape:connector-type="polyline"
- sodipodi:nodetypes="cc" />
- </g>
- </g>
- <g
- transform="translate(299.78191,21.148391)"
- id="g2771">
- <rect
- style="fill:#cce994;fill-opacity:1;stroke:#a1f400;stroke-width:0.62429351;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="rect2733"
- width="185.69771"
- height="75.288704"
- x="1882.2529"
- y="2146.085"
- ry="2.2607138"
- rx="2.0576432" />
- <text
- xml:space="preserve"
- style="font-size:40px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#3a5800;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="1975.134"
- y="2180.2722"
- id="text2735"><tspan
- sodipodi:role="line"
- x="1975.134"
- y="2180.2722"
- style="font-size:22px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;text-anchor:middle;fill:#3a5800;fill-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold"
- id="tspan2737">injected code</tspan><tspan
- id="tspan2743"
- sodipodi:role="line"
- x="1975.134"
- y="2201.7917"
- style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;fill:#3a5800;fill-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans">(handwritten)</tspan></text>
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:26.66666667px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;stroke:none">2</tspan></text>
</g>
<g
transform="translate(200.4676,-222.96766)"
- id="g5554">
+ id="g5554"
+ style="stroke:none">
<path
sodipodi:type="arc"
- style="fill:#f28888;fill-opacity:1;stroke:#d5f400;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:3, 3;stroke-dashoffset:0;stroke-opacity:1"
+ style="fill:#f28888;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:3, 3;stroke-dashoffset:0;stroke-opacity:1"
id="path5556"
sodipodi:cx="255.10791"
sodipodi:cy="326.69064"
sodipodi:rx="38.848923"
sodipodi:ry="38.848923"
- d="M 293.95683,326.69064 A 38.848923,38.848923 0 1 1 216.25899,326.69064 A 38.848923,38.848923 0 1 1 293.95683,326.69064 z"
+ d="m 293.95683,326.69064 a 38.848923,38.848923 0 0 1 -38.84892,38.84893 38.848923,38.848923 0 0 1 -38.84892,-38.84893 38.848923,38.848923 0 0 1 38.84892,-38.84892 38.848923,38.848923 0 0 1 38.84892,38.84892 z"
transform="matrix(0.4405339,0,0,0.4405339,1842.2283,2282.9708)" />
<text
xml:space="preserve"
- style="font-size:27.62000275px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ style="font-style:normal;font-weight:normal;line-height:0%;font-family:Titillium;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;-inkscape-font-specification:'Titillium, Normal';font-stretch:normal;font-variant:normal;font-size:26.66666667px;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal"
x="1946.3259"
y="2435.7"
id="text5558"><tspan
@@ -511,24 +509,25 @@
id="tspan5560"
x="1946.3259"
y="2435.7"
- style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:FreeMono;-inkscape-font-specification:FreeMono Bold">3</tspan></text>
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:26.66666667px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;stroke:none">3</tspan></text>
</g>
<g
transform="translate(413.633,-206.84535)"
- id="g5562">
+ id="g5562"
+ style="stroke:none">
<path
sodipodi:type="arc"
- style="fill:#f28888;fill-opacity:1;stroke:#d5f400;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:3, 3;stroke-dashoffset:0;stroke-opacity:1"
+ style="fill:#f28888;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:3, 3;stroke-dashoffset:0;stroke-opacity:1"
id="path5564"
sodipodi:cx="255.10791"
sodipodi:cy="326.69064"
sodipodi:rx="38.848923"
sodipodi:ry="38.848923"
- d="M 293.95683,326.69064 A 38.848923,38.848923 0 1 1 216.25899,326.69064 A 38.848923,38.848923 0 1 1 293.95683,326.69064 z"
+ d="m 293.95683,326.69064 a 38.848923,38.848923 0 0 1 -38.84892,38.84893 38.848923,38.848923 0 0 1 -38.84892,-38.84893 38.848923,38.848923 0 0 1 38.84892,-38.84892 38.848923,38.848923 0 0 1 38.84892,38.84892 z"
transform="matrix(0.4405339,0,0,0.4405339,1842.2283,2282.9708)" />
<text
xml:space="preserve"
- style="font-size:27.62000275px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ style="font-style:normal;font-weight:normal;line-height:0%;font-family:Titillium;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;-inkscape-font-specification:'Titillium, Normal';font-stretch:normal;font-variant:normal;font-size:26.66666667px;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal"
x="1946.3259"
y="2435.7"
id="text5566"><tspan
@@ -536,7 +535,7 @@
id="tspan5568"
x="1946.3259"
y="2435.7"
- style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:FreeMono;-inkscape-font-specification:FreeMono Bold">4</tspan></text>
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:26.66666667px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;stroke:none">4</tspan></text>
</g>
</g>
</g>
diff --git a/sources/shiboken2/doc/images/boostqtarch.png b/sources/shiboken2/doc/images/boostqtarch.png
deleted file mode 100644
index f1b145e9c..000000000
--- a/sources/shiboken2/doc/images/boostqtarch.png
+++ /dev/null
Binary files differ
diff --git a/sources/shiboken2/doc/images/boostqtarch.svg b/sources/shiboken2/doc/images/boostqtarch.svg
deleted file mode 100644
index 9fbb38271..000000000
--- a/sources/shiboken2/doc/images/boostqtarch.svg
+++ /dev/null
@@ -1,226 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="350"
- height="220"
- id="svg2"
- sodipodi:version="0.32"
- inkscape:version="0.46"
- version="1.0"
- sodipodi:docname="boostqtarch.svg"
- inkscape:output_extension="org.inkscape.output.svg.inkscape"
- inkscape:export-filename="boostqtarch.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4">
- <marker
- inkscape:stockid="Arrow2Lend"
- orient="auto"
- refY="0"
- refX="0"
- id="Arrow2Lend"
- style="overflow:visible">
- <path
- id="path3636"
- style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
- d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.97309,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z"
- transform="matrix(-1.1,0,0,-1.1,-1.1,0)" />
- </marker>
- <inkscape:perspective
- sodipodi:type="inkscape:persp3d"
- inkscape:vp_x="0 : 526.18109 : 1"
- inkscape:vp_y="0 : 1000 : 0"
- inkscape:vp_z="744.09448 : 526.18109 : 1"
- inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
- id="perspective10" />
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- gridtolerance="10000"
- guidetolerance="10"
- objecttolerance="10"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="1.4812981"
- inkscape:cx="145.70936"
- inkscape:cy="94.089827"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="false"
- inkscape:window-width="1278"
- inkscape:window-height="951"
- inkscape:window-x="1592"
- inkscape:window-y="29"
- showguides="true"
- inkscape:guide-bbox="true" />
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(-61.076804,-301.50489)">
- <flowRoot
- xml:space="preserve"
- id="flowRoot3229"
- style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- transform="translate(2.0918751e-6,-6.0000008)"><flowRegion
- id="flowRegion3231"><rect
- id="rect3233"
- width="125.74072"
- height="40.5849"
- x="388.45547"
- y="279.5423" /></flowRegion><flowPara
- id="flowPara3235" /></flowRoot> <g
- id="g3010"
- transform="matrix(0.9508755,0,0,0.9508755,11.317746,20.273572)">
- <g
- transform="translate(0,-9.7919846e-6)"
- id="g2952">
- <rect
- style="fill:#dfe994;fill-opacity:1;stroke:#d5f400;stroke-width:0.7162478;stroke-opacity:1"
- id="rect3166"
- width="349.23203"
- height="67.403336"
- x="61.417336"
- y="377.74161"
- ry="2.6752985"
- rx="2.285728" />
- <text
- xml:space="preserve"
- style="font-size:29.38717079px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#4c5800;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="236.08904"
- y="397.98755"
- id="text3168"><tspan
- sodipodi:role="line"
- x="236.08904"
- y="397.98755"
- style="font-size:20.57102013px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;text-anchor:middle;fill:#4c5800;fill-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
- id="tspan3176">Boost::Python</tspan><tspan
- sodipodi:role="line"
- x="236.08904"
- y="418.35535"
- style="font-size:15.20761585px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;fill:#4c5800;fill-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
- id="tspan2880">helper library to interface with CPython API</tspan><tspan
- id="tspan2922"
- sodipodi:role="line"
- x="236.08904"
- y="437.36487"
- style="font-size:15.20761585px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;fill:#4c5800;fill-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans">and expose C++ entities to Python</tspan></text>
- </g>
- <g
- transform="translate(0,-9.7025776e-6)"
- id="g2959">
- <rect
- style="fill:#addc52;fill-opacity:1;stroke:#6ca400;stroke-width:0.71624762;stroke-opacity:1"
- id="rect3542"
- width="349.23203"
- height="67.403351"
- x="61.417336"
- y="301.84543"
- ry="2.675298"
- rx="2.285728" />
- <text
- xml:space="preserve"
- style="font-size:29.38717079px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#050800;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="236.5123"
- y="322.09137"
- id="text3544"><tspan
- id="tspan3596"
- sodipodi:role="line"
- x="236.5123"
- y="322.09137"
- style="font-size:20.57102013px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;text-anchor:middle;fill:#050800;fill-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans">Qt-Python Bindings</tspan><tspan
- sodipodi:role="line"
- x="236.5123"
- y="342.45917"
- style="font-size:15.20761585px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;fill:#050800;fill-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
- id="tspan12937">Qt classes and functions</tspan><tspan
- sodipodi:role="line"
- x="236.5123"
- y="361.46869"
- style="font-size:15.20761585px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;fill:#050800;fill-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
- id="tspan2411">exported to Python</tspan></text>
- </g>
- <g
- id="g2998">
- <g
- id="g2986">
- <rect
- rx="2.285728"
- ry="2.675298"
- y="453.63776"
- x="61.417336"
- height="67.403336"
- width="172.02341"
- id="rect3485"
- style="fill:#b2e994;fill-opacity:1;stroke:#56f400;stroke-width:0.71624762;stroke-opacity:1" />
- <text
- id="text3487"
- y="482.29712"
- x="147.73038"
- style="font-size:29.38717079px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#1f5800;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- xml:space="preserve"><tspan
- style="font-size:20.57102013px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;text-anchor:middle;fill:#1f5800;fill-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
- y="482.29712"
- x="147.73038"
- sodipodi:role="line"
- id="tspan3499">CPython</tspan><tspan
- id="tspan2509"
- style="font-size:20.57102013px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;text-anchor:middle;fill:#1f5800;fill-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
- y="508.01089"
- x="147.73038"
- sodipodi:role="line">API</tspan></text>
- </g>
- <g
- id="g2992">
- <rect
- rx="2.285728"
- ry="2.675298"
- y="453.63776"
- x="239.30101"
- height="67.403351"
- width="172.02295"
- id="rect2459"
- style="fill:#cce994;fill-opacity:1;stroke:#a1f400;stroke-width:0.71624762;stroke-opacity:1" />
- <text
- id="text2461"
- y="481.97067"
- x="324.86047"
- style="font-size:29.38717079px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#3a5800;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- xml:space="preserve"><tspan
- style="font-size:20.57102013px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;text-anchor:middle;fill:#3a5800;fill-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
- y="481.97067"
- x="324.86047"
- sodipodi:role="line"
- id="tspan2467">Qt4</tspan><tspan
- id="tspan2490"
- style="font-size:20.57102013px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;text-anchor:middle;fill:#3a5800;fill-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
- y="507.68445"
- x="324.86047"
- sodipodi:role="line">Libraries</tspan></text>
- </g>
- </g>
- </g>
- </g>
-</svg>
diff --git a/sources/shiboken2/doc/images/converter.dot b/sources/shiboken2/doc/images/converter.dot
deleted file mode 100644
index 412341df9..000000000
--- a/sources/shiboken2/doc/images/converter.dot
+++ /dev/null
@@ -1,14 +0,0 @@
-digraph Conversions {
- rankdir=LR
- CppType1 [ label="C++\nType" ]
- Converter1 [ label="Converter\nPython -> C++", shape=hexagon ]
- PythonType1 -> Converter1
- PythonType2 -> Converter1
- PythonType3 -> Converter1
- Converter1 -> CppType1
-
- CppType2 [ label="C++\nType" ]
- PythonType4 [ label="PythonType" ]
- Converter2 [ label="Converter\nPython -> C++", shape=hexagon ]
- CppType2 -> Converter2 -> PythonType4
-} \ No newline at end of file
diff --git a/sources/shiboken2/doc/images/converter.png b/sources/shiboken2/doc/images/converter.png
index 51cd2af71..cd52e2769 100644
--- a/sources/shiboken2/doc/images/converter.png
+++ b/sources/shiboken2/doc/images/converter.png
Binary files differ
diff --git a/sources/shiboken2/doc/images/converter.svg b/sources/shiboken2/doc/images/converter.svg
new file mode 100644
index 000000000..4305eb720
--- /dev/null
+++ b/sources/shiboken2/doc/images/converter.svg
@@ -0,0 +1,349 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="206.375mm"
+ height="100.54167mm"
+ viewBox="0 0 206.375 100.54167"
+ version="1.1"
+ id="svg8"
+ inkscape:version="0.92.2 2405546, 2018-03-11"
+ sodipodi:docname="converter.svg">
+ <defs
+ id="defs2">
+ <marker
+ inkscape:isstock="true"
+ style="overflow:visible"
+ id="marker1623"
+ refX="0"
+ refY="0"
+ orient="auto"
+ inkscape:stockid="Arrow1Lend">
+ <path
+ transform="matrix(-0.8,0,0,-0.8,-10,0)"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
+ id="path1621"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="marker1569"
+ style="overflow:visible"
+ inkscape:isstock="true"
+ inkscape:collect="always">
+ <path
+ id="path1567"
+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:isstock="true"
+ style="overflow:visible"
+ id="marker1521"
+ refX="0"
+ refY="0"
+ orient="auto"
+ inkscape:stockid="Arrow1Lend"
+ inkscape:collect="always">
+ <path
+ transform="matrix(-0.8,0,0,-0.8,-10,0)"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
+ id="path1519"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="marker1479"
+ style="overflow:visible"
+ inkscape:isstock="true"
+ inkscape:collect="always">
+ <path
+ id="path1477"
+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:isstock="true"
+ style="overflow:visible"
+ id="marker1443"
+ refX="0"
+ refY="0"
+ orient="auto"
+ inkscape:stockid="Arrow1Lend"
+ inkscape:collect="always">
+ <path
+ transform="matrix(-0.8,0,0,-0.8,-10,0)"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
+ id="path1441"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend"
+ style="overflow:visible"
+ inkscape:isstock="true"
+ inkscape:collect="always">
+ <path
+ id="path1154"
+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.35"
+ inkscape:cx="382.16184"
+ inkscape:cy="-28.417621"
+ inkscape:document-units="mm"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ inkscape:window-width="1002"
+ inkscape:window-height="1042"
+ inkscape:window-x="10"
+ inkscape:window-y="28"
+ inkscape:window-maximized="0">
+ <inkscape:grid
+ type="xygrid"
+ id="grid971"
+ originx="-58.208333"
+ originy="-68.791657" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata5">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-58.208333,-127.66667)">
+ <path
+ style="fill:#17a81a;fill-opacity:1;stroke:none;stroke-width:0.82824755;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 127,132.95834 0.0687,26.45833 h 63.43127 l 5.29167,-5.29167 v -26.45833 h -63.5 z"
+ id="path3715-5-6-7-9-8-7"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccc" />
+ <path
+ style="fill:#3a4055;fill-opacity:1;stroke:none;stroke-width:0.67261654;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 68.791667,132.95834 v 26.45833 H 105.83333 L 111.125,154.125 V 127.66667 H 74.083333 Z"
+ id="path3715-5-6-7-9-8-7-6-3"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccc" />
+ <path
+ style="fill:#848895;fill-opacity:1;stroke:none;stroke-width:0.52087492;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 58.208333,173.96875 V 185.875 h 48.947917 l 3.96875,-3.96875 V 170 H 62.177083 Z"
+ id="path3715-5-6-7-9-8-7-6-56"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccc" />
+ <path
+ style="fill:#17a81a;fill-opacity:1;stroke:none;stroke-width:0.82824755;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 127.00003,175.29167 0.0687,26.45833 H 190.5 l 5.29167,-5.29167 V 170 h -63.5 z"
+ id="path3715-5-6-7-9-8-7-2"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccc" />
+ <path
+ style="fill:#848895;fill-opacity:1;stroke:none;stroke-width:0.52087492;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 58.208333,195.13542 v 11.90625 h 48.947917 l 3.96875,-3.96875 V 191.16667 H 62.177083 Z"
+ id="path3715-5-6-7-9-8-7-6-56-7"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccc" />
+ <path
+ style="fill:#848895;fill-opacity:1;stroke:none;stroke-width:0.52087492;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 58.208343,216.30209 v 11.90625 h 48.947907 l 3.96875,-3.96875 V 212.33334 H 62.177093 Z"
+ id="path3715-5-6-7-9-8-7-6-56-0"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccc" />
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.05555534px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
+ x="65.68634"
+ y="179.68727"
+ id="text1032"><tspan
+ sodipodi:role="line"
+ id="tspan1030"
+ x="65.68634"
+ y="179.68727"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.05555534px;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke-width:0.26458332">PythonType1</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.05555534px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
+ x="65.326508"
+ y="200.85394"
+ id="text1032-1"><tspan
+ sodipodi:role="line"
+ id="tspan1030-1"
+ x="65.326508"
+ y="200.85394"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.05555534px;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke-width:0.26458332">PythonType2</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.05555534px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
+ x="65.319458"
+ y="222.02061"
+ id="text1032-4"><tspan
+ sodipodi:role="line"
+ id="tspan1030-6"
+ x="65.319458"
+ y="222.02061"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.05555534px;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke-width:0.26458332">PythonType3</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.58333302px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:Titillium;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
+ x="90.120621"
+ y="139.29776"
+ id="text1062"><tspan
+ sodipodi:role="line"
+ id="tspan1060"
+ x="90.120621"
+ y="139.29776"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:9.87777805px;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.26458332">C++</tspan><tspan
+ sodipodi:role="line"
+ x="90.120621"
+ y="152.52693"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:9.87777805px;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.26458332"
+ id="tspan1064">Type</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.58333302px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:Titillium;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
+ x="135.41069"
+ y="138.95909"
+ id="text1068"><tspan
+ sodipodi:role="line"
+ id="tspan1066"
+ x="135.41069"
+ y="138.95909"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.46666622px;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke-width:0.26458332">Converter</tspan><tspan
+ sodipodi:role="line"
+ x="135.41069"
+ y="152.18826"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.46666622px;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke-width:0.26458332"
+ id="tspan1070">C++ -&gt; Python</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.58333302px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:Titillium;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
+ x="135.41072"
+ y="181.29242"
+ id="text1068-9"><tspan
+ sodipodi:role="line"
+ id="tspan1066-7"
+ x="135.41072"
+ y="181.29242"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.46666622px;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke-width:0.26458332">Converter</tspan><tspan
+ sodipodi:role="line"
+ x="135.41072"
+ y="194.52159"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.46666622px;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke-width:0.26458332"
+ id="tspan1070-5">Python -&gt; C++</tspan></text>
+ <path
+ style="fill:#3a4055;fill-opacity:1;stroke:none;stroke-width:0.67261654;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 211.66667,175.29167 V 201.75 h 37.04166 L 254,196.45833 V 170 h -37.04167 z"
+ id="path3715-5-6-7-9-8-7-6-3-9"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccc" />
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.58333302px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:Titillium;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
+ x="232.99562"
+ y="181.63109"
+ id="text1062-7"><tspan
+ sodipodi:role="line"
+ id="tspan1060-4"
+ x="232.99562"
+ y="181.63109"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:9.87777805px;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.26458332">C++</tspan><tspan
+ sodipodi:role="line"
+ x="232.99562"
+ y="194.86026"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:9.87777805px;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.26458332"
+ id="tspan1064-9">Type</tspan></text>
+ <path
+ style="fill:#848895;fill-opacity:1;stroke:none;stroke-width:0.52087492;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 211.66667,131.63542 v 11.90625 h 48.94791 l 3.96875,-3.96875 v -11.90625 h -48.94791 z"
+ id="path3715-5-6-7-9-8-7-6-56-0-1"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccc" />
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.05555534px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
+ x="220.67876"
+ y="137.35394"
+ id="text1032-4-7"><tspan
+ sodipodi:role="line"
+ id="tspan1030-6-0"
+ x="220.67876"
+ y="137.35394"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.05555534px;font-family:Titillium;-inkscape-font-specification:'Titillium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke-width:0.26458332">PythonType</tspan></text>
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+ d="M 111.125,143.54167 H 127"
+ id="path1149"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker1443)"
+ d="M 111.125,175.29167 H 127"
+ id="path1433"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker1479)"
+ d="M 111.125,196.45834 127,185.875"
+ id="path1469"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker1521)"
+ d="M 111.125,217.625 127,201.75"
+ id="path1511"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker1569)"
+ d="m 195.79166,185.875 h 15.875"
+ id="path1559"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker1623)"
+ d="m 195.79166,138.25001 h 15.875"
+ id="path1613"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/sources/shiboken2/doc/images/shibokenqtarch.png b/sources/shiboken2/doc/images/shibokenqtarch.png
new file mode 100644
index 000000000..359413373
--- /dev/null
+++ b/sources/shiboken2/doc/images/shibokenqtarch.png
Binary files differ
diff --git a/sources/shiboken2/doc/images/shibokenqtarch.svg b/sources/shiboken2/doc/images/shibokenqtarch.svg
new file mode 100644
index 000000000..d9212f18c
--- /dev/null
+++ b/sources/shiboken2/doc/images/shibokenqtarch.svg
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="275"
+ height="197.55103"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.92.2 2405546, 2018-03-11"
+ version="1.0"
+ sodipodi:docname="shibokenqtarch.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape"
+ inkscape:export-filename="shibokenqtarch.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <defs
+ id="defs4">
+ <marker
+ inkscape:stockid="Arrow2Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow2Lend"
+ style="overflow:visible">
+ <path
+ id="path3636"
+ style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective10" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.0474359"
+ inkscape:cx="110.19617"
+ inkscape:cy="69.09871"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:window-width="1002"
+ inkscape:window-height="1042"
+ inkscape:window-x="10"
+ inkscape:window-y="28"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ inkscape:window-maximized="0">
+ <inkscape:grid
+ type="xygrid"
+ id="grid44"
+ originx="-44.999996"
+ originy="-12.44898" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-106.0768,-311.50489)">
+ <path
+ style="fill:#21be2b;fill-opacity:1;stroke:none;stroke-width:2.20567369;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 106.0768,322.72938 v 44.89796 h 262.2093 l 12.7907,-11.22449 V 311.50489 H 117.53514 Z"
+ id="path3715-5-6-7-9-8-7"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccc" />
+ <path
+ style="fill:#17a81a;fill-opacity:1;stroke:none;stroke-width:1.57079244;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 251.99517,457.61034 v 51.44557 H 369.85231 L 381.0768,498.76679 V 447.32122 H 263.21966 Z"
+ id="path3715-5-6-7-9-6-7"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccc" />
+ <path
+ style="fill:#53586b;fill-opacity:1;stroke:none;stroke-width:1.57079256;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 106.0768,457.61034 v 51.44557 h 117.85714 l 11.22449,-10.28912 V 447.32122 H 117.30129 Z"
+ id="path3715-5-6-7-9-6-7-5"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccc" />
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-size:16.68707466px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:'Titillium, Semi-Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.12244904;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ x="120.87232"
+ y="334.88406"
+ id="text153"><tspan
+ sodipodi:role="line"
+ id="tspan151"
+ x="120.87232"
+ y="334.88406"
+ style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-size:16.68707466px;font-family:Titillium;-inkscape-font-specification:'Titillium, Semi-Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.12244904;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1">Qt for Python</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.74510956px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:Titillium;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.31862774"
+ x="121.09701"
+ y="354.01886"
+ id="text157"><tspan
+ sodipodi:role="line"
+ x="121.09701"
+ y="354.01886"
+ id="tspan159"
+ style="fill:#ffffff;fill-opacity:1;stroke-width:0.31862774">Qt classes and functions exported to Python</tspan></text>
+ <path
+ style="fill:#53586b;fill-opacity:1;stroke:none;stroke-width:2.20567369;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 106.0768,391.19877 v 44.89796 h 262.2093 l 12.7907,-11.22449 V 379.97428 H 117.53514 Z"
+ id="path3715-5-6-7-9-8-7-6"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccc" />
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-size:16.68707466px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:'Titillium, Semi-Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.41717955"
+ x="121.0225"
+ y="403.38095"
+ id="text153-2"><tspan
+ sodipodi:role="line"
+ id="tspan151-9"
+ x="121.0225"
+ y="403.38095"
+ style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-size:16.68707466px;font-family:Titillium;-inkscape-font-specification:'Titillium, Semi-Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke-width:0.41717955">Shiboken</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.74510956px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:Titillium;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.31862774"
+ x="121.09701"
+ y="421.95245"
+ id="text157-1"><tspan
+ sodipodi:role="line"
+ x="121.09701"
+ y="421.95245"
+ id="tspan159-2"
+ style="fill:#ffffff;fill-opacity:1;stroke-width:0.31862774">Generator that exposes C++ classes to Python</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-size:17.95918465px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:'Titillium, Semi-Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.31862774"
+ x="123.35368"
+ y="482.61551"
+ id="text157-1-7"><tspan
+ sodipodi:role="line"
+ x="123.35368"
+ y="482.61551"
+ id="tspan159-2-0"
+ style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-size:17.95918465px;font-family:Titillium;-inkscape-font-specification:'Titillium, Semi-Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke-width:0.31862774">CPython API</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-size:17.95918465px;line-height:1.25;font-family:Titillium;-inkscape-font-specification:'Titillium, Semi-Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.4132798"
+ x="265.1445"
+ y="483.19019"
+ id="text157-1-9"><tspan
+ sodipodi:role="line"
+ x="265.1445"
+ y="483.19019"
+ id="tspan159-2-3"
+ style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-size:17.95918465px;font-family:Titillium;-inkscape-font-specification:'Titillium, Semi-Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke-width:0.4132798">Qt 5 Libraries</tspan></text>
+ </g>
+</svg>
diff --git a/sources/shiboken2/doc/overview.rst b/sources/shiboken2/doc/overview.rst
index 5f50610ff..97ef2c13c 100644
--- a/sources/shiboken2/doc/overview.rst
+++ b/sources/shiboken2/doc/overview.rst
@@ -23,13 +23,13 @@ Each module of the generator system has an specific role.
3. Modify the API to expose the objects in a way that fits you target language best.
4. Insert customizations where handwritten code is needed.
-.. figure:: images/boostqtarch.png
+.. figure:: images/shibokenqtarch.png
:scale: 80
:align: center
Runtime architecture
-The newly created binding will run on top of Boost.Python library which takes
+The newly created binding will run on top of Shiboken which takes
care of interfacing Python and the underlying C++ library.
Handwritten inputs
diff --git a/sources/shiboken2/doc/ownership.rst b/sources/shiboken2/doc/ownership.rst
index 69791f855..f3744a537 100644
--- a/sources/shiboken2/doc/ownership.rst
+++ b/sources/shiboken2/doc/ownership.rst
@@ -35,7 +35,7 @@ Invalidating objects
====================
To prevent segfaults and double frees, the wrapper objects are invalidated.
-An invalidated can't be passed as argument or have an attributte or method accessed.
+An invalidated can't be passed as argument or have an attribute or method accessed.
Trying to do this will raise RuntimeError.
The following situations can invalidate an object:
@@ -48,7 +48,7 @@ C++ taking ownership
:ref:`virtual destructor <ownership-virt-method>` or the transfer is due to the special case
of :ref:`parent ownership <ownership-parent>`.
- Besides being passed as argument, the callee object can have its ownership changed, like
+ Besides being passed as argument, the called object can have its ownership changed, like
the `setParent` method in Qt's `QObject`.
Invalidate after use
@@ -69,7 +69,7 @@ Objects with virtual methods
any derived class in Python also override it.
If the class has a virtual destructor (and C++ classes with virtual methods should have), this
- C++ instance invalidates the wrapper only when the overriden destructor is called.
+ C++ instance invalidates the wrapper only when the overridden destructor is called.
One exception to this rule is when the object is created in C++, like in a
factory method. This way the wrapped object is a C++ instance of the native
@@ -128,7 +128,7 @@ Not saving unowned objects references
-------------------------------------
Sometimes when you pass an instance as argument to a method and the receiving
- instance will need that object to live indifinitely, but will not take ownership
+ instance will need that object to live indefinitely, but will not take ownership
of the argument instance. In this case, you should hold a reference to the argument
instance.
diff --git a/sources/shiboken2/doc/projectfile.rst b/sources/shiboken2/doc/projectfile.rst
index 6c9808da4..aa703d941 100644
--- a/sources/shiboken2/doc/projectfile.rst
+++ b/sources/shiboken2/doc/projectfile.rst
@@ -4,9 +4,9 @@
Binding Project File
********************
-Instead of directing the Generator behaviour via command line, the binding developer
-can write a text project file describing the same information, and avoid the hassle
-of a long stream of command line arguments.
+Instead of directing the Generator behavior via command line, the binding
+developer can write a text project file describing the same information, and
+avoid the hassle of a long stream of command line arguments.
.. _project-file-structure:
@@ -34,11 +34,13 @@ Project file tags
The generator project file tags are in direct relation to the
:ref:`command line arguments <command-line>`. All of the current command line
-options provided by |project| were already seen on the :ref:`project-file-structure`,
-for new command line options provided by additional generator modules (e.g.: qtdoc,
-Shiboken) could also be used in the generator project file following simple conversion rules.
+options provided by |project| were already seen on the
+:ref:`project-file-structure`, for new command line options provided by
+additional generator modules (e.g.: qtdoc, Shiboken) could also be used in the
+generator project file following simple conversion rules.
-For tags without options, just write as an empty tag without any attributes. Example:
+For tags without options, just write as an empty tag without any attributes.
+Example:
.. code-block:: bash
diff --git a/sources/shiboken2/doc/sequenceprotocol.rst b/sources/shiboken2/doc/sequenceprotocol.rst
index 587c0f95b..26ae3b220 100644
--- a/sources/shiboken2/doc/sequenceprotocol.rst
+++ b/sources/shiboken2/doc/sequenceprotocol.rst
@@ -1,7 +1,8 @@
Sequence Protocol
-----------------
-Support for the sequence protocol is achieved adding functions with special names, this is done using the add-function tag.
+Support for the sequence protocol is achieved adding functions with special
+names, this is done using the add-function tag.
The special function names are:
@@ -15,9 +16,14 @@ The special function names are:
__concat__ PyObject* self, PyObject* _other PyObject* PySequence_Concat
============= =============================================== ==================== ===================
-You just need to inform the function name to the add-function tag, without any parameter or return type information, when you do it, |project| will create a C function with parameters and return type definied by the table above.
+You just need to inform the function name to the add-function tag, without any
+parameter or return type information, when you do it, |project| will create a C
+function with parameters and return type defined by the table above.
-The function needs to follow the same semantics of the *CPython equivalent* function, the only way to do it is using the :doc:`inject-code <codeinjectionsemantics>` tag.
-
-A concrete exemple how to add sequence protocol support to a class can be found on shiboken tests, more precisely in the definition of the Str class in ``tests/samplebinding/typesystem_sample.xml``.
+The function needs to follow the same semantics of the *CPython equivalent*
+function, the only way to do it is using the
+:doc:`inject-code <codeinjectionsemantics>` tag.
+A concrete example how to add sequence protocol support to a class can be found
+on shiboken tests, more precisely in the definition of the Str class in
+``tests/samplebinding/typesystem_sample.xml``.
diff --git a/sources/shiboken2/doc/typeconverters.rst b/sources/shiboken2/doc/typeconverters.rst
index 3779b26d7..ea32c7f0c 100644
--- a/sources/shiboken2/doc/typeconverters.rst
+++ b/sources/shiboken2/doc/typeconverters.rst
@@ -2,7 +2,13 @@
User Defined Type Conversion
****************************
-In the process of creating Python bindings of a C++ library, most of the C++ classes will have wrappers representing them in Python land. But there may be other classes that are very simple and/or have a Python type as a direct counter part. (Example: a "Complex" class, that represents complex numbers, has a Python equivalent in the "complex" type.) Such classes, instead of getting a Python wrapper, normally have conversions rules, from Python to C++ and vice-versa.
+In the process of creating Python bindings of a C++ library, most of the C++
+classes will have wrappers representing them in Python land.
+But there may be other classes that are very simple and/or have a Python type
+as a direct counter part. (Example: a "Complex" class, that represents complex
+numbers, has a Python equivalent in the "complex" type.) Such classes, instead
+of getting a Python wrapper, normally have conversions rules, from Python to
+C++ and vice-versa.
.. code-block:: c++
@@ -22,7 +28,8 @@ In the process of creating Python bindings of a C++ library, most of the C++ cla
Complex cpx(real, imag);
-For the user defined conversion code to be inserted in the proper places, the "<conversion-rule>" tag must be used.
+For the user defined conversion code to be inserted in the proper places,
+the "<conversion-rule>" tag must be used.
.. code-block:: xml
@@ -51,25 +58,23 @@ For the user defined conversion code to be inserted in the proper places, the "<
The details will be given later, but the gist of it are the tags
-`<native-to-target> <http://www.pyside.org/docs/apiextractor/typesystem_conversionrule.html#native-to-target>`_,
-which has only one conversion from C++ to Python, and
-`<target-to-native> <http://www.pyside.org/docs/apiextractor/typesystem_conversionrule.html#target-to-native>`_,
-that may define the conversion of multiple Python types to C++'s "Complex" type.
+`<native-to-target>`_, which has only one conversion from C++ to Python, and
+`<target-to-native>`_, that may define the conversion of multiple Python types
+to C++'s "Complex" type.
.. image:: images/converter.png
:height: 240px
:align: center
-|project| expects the code for `<native-to-target> <http://www.pyside.org/docs/apiextractor/typesystem_conversionrule.html#native-to-target>`_,
-to directly return the Python result of the conversion, and the added conversions inside the
-`<target-to-native> <http://www.pyside.org/docs/apiextractor/typesystem_conversionrule.html#target-to-native>`_
-must attribute the Python to C++ conversion result to the :ref:`%out <out>` variable.
+|project| expects the code for `<native-to-target>`_, to directly return the
+Python result of the conversion, and the added conversions inside the
+`<target-to-native>`_ must attribute the Python to C++ conversion result to
+the :ref:`%out <out>` variable.
-
-Expanding on the last example, if the binding developer want a Python 2-tuple of numbers to be accepted
-by wrapped C++ functions with "Complex" arguments, an
-`<add-conversion> <http://www.pyside.org/docs/apiextractor/typesystem_conversionrule.html#add-conversion>`_
-tag and a custom check must be added. Here's how to do it:
+Expanding on the last example, if the binding developer want a Python 2-tuple
+of numbers to be accepted by wrapped C++ functions with "Complex" arguments,
+an `<add-conversion>`_ tag and a custom check must be added.
+Here's how to do it:
.. code-block:: xml
@@ -120,18 +125,18 @@ tag and a custom check must be added. Here's how to do it:
</primitive-type>
-
.. _container_conversions:
Container Conversions
=====================
-Converters for
-`<container-type> <http://www.pyside.org/docs/apiextractor/typesystem_specifying_types.html#container-type>`_
-are pretty much the same as for other type, except that they make use of the type system variables
-:ref:`%INTYPE_# <intype_n>` and :ref:`%OUTTYPE_# <outtype_n>`. |project| combines the conversion code for
-containers with the conversion defined (or automatically generated) for the containees.
+Converters for `<container-type>`_ are pretty much the same as for other type,
+except that they make use of the type system variables
+:ref:`%INTYPE_# <intype_n>` and :ref:`%OUTTYPE_# <outtype_n>`.
+|project| combines the conversion code for containers with the conversion
+defined (or automatically generated) for the containers.
+.. _`container-type`: http://www.pyside.org/docs/apiextractor/typesystem_specifying_types.html#container-type
.. code-block:: xml
@@ -279,10 +284,14 @@ And implemented in a separate C++ file, like this:
}
-In this case, the parts of the implementation that will be used in the new conversion-rule
-are the ones in the two last method ``static inline PyObject* toPython(const Complex& cpx)``
-and ``static inline Complex toCpp(PyObject* pyobj)``. The ``isConvertible`` method is gone,
-and the ``checkType`` is now an attribute of the
-`<add-conversion> <http://www.pyside.org/docs/apiextractor/typesystem_conversionrule.html#add-conversion>`_
-tag. Refer back to the first example in this page and you will be able to correlate the above template
-with the new scheme of conversion rule definition.
+In this case, the parts of the implementation that will be used in the new
+conversion-rule are the ones in the two last method
+``static inline PyObject* toPython(const Complex& cpx)`` and
+``static inline Complex toCpp(PyObject* pyobj)``. The ``isConvertible`` method
+is gone, and the ``checkType`` is now an attribute of the `<add-conversion>`_
+tag. Refer back to the first example in this page and you will be able to
+correlate the above template with the new scheme of conversion rule definition.
+
+.. _`<native-to-target>`: http://www.pyside.org/docs/apiextractor/typesystem_conversionrule.html#native-to-target
+.. _`<target-to-native>`: http://www.pyside.org/docs/apiextractor/typesystem_conversionrule.html#target-to-native
+.. _`<add-conversion>`: http://www.pyside.org/docs/apiextractor/typesystem_conversionrule.html#add-conversion
diff --git a/sources/shiboken2/doc/typesystemvariables.rst b/sources/shiboken2/doc/typesystemvariables.rst
index 205430550..9de2b02f5 100644
--- a/sources/shiboken2/doc/typesystemvariables.rst
+++ b/sources/shiboken2/doc/typesystemvariables.rst
@@ -59,9 +59,8 @@ Variables
system), this value will be inserted in the argument list. If you want to remove
the argument so completely that it doesn't appear in any form on the
``%ARGUMENT_NAMES`` replacement, don't forget to remove also its default value
- with the `<remove-default-expression/>
- <http://www.pyside.org/docs/apiextractor/typesystem_arguments.html#remove-default-expression>`_
- type system tag.
+ with the `<remove-default-expression/>`_ type system tag.
+
Take the following method and related type system description as an example:
@@ -334,3 +333,5 @@ that expects a Python sequence instead.
</inject-code>
</modify-function>
+
+.. _`<remove-default-expression/>`: http://www.pyside.org/docs/apiextractor/typesystem_arguments.html#remove-default-expression
diff --git a/sources/shiboken2/doc/wordsofadvice.rst b/sources/shiboken2/doc/wordsofadvice.rst
index b66799338..9aebf1f03 100644
--- a/sources/shiboken2/doc/wordsofadvice.rst
+++ b/sources/shiboken2/doc/wordsofadvice.rst
@@ -75,7 +75,8 @@ C++ object. In summary: don't do it!
Python old style classes and PySide
===================================
-Because of some architectural decisions and deprecated Python types. Since PySide 1.1 old style classes are not supported with multiple inheritance.
+Because of some architectural decisions and deprecated Python types.
+Since PySide 1.1 old style classes are not supported with multiple inheritance.
Below you can check the examples:
@@ -92,7 +93,8 @@ Example with old style class:
pass
-this example will raise a 'TypeError' due to the limitation on PySide, to fix this you will need use the new style class:
+this example will raise a 'TypeError' due to the limitation on PySide, to fix
+this you will need use the new style class:
.. code-block:: python
@@ -106,4 +108,5 @@ this example will raise a 'TypeError' due to the limitation on PySide, to fix th
pass
-All classes used for multiple inheritance with other PySide types need to have 'object' as base class.
+All classes used for multiple inheritance with other PySide types need to have
+'object' as base class.
diff --git a/sources/shiboken2/generator/main.cpp b/sources/shiboken2/generator/main.cpp
index 774775fb0..b787d9f7e 100644
--- a/sources/shiboken2/generator/main.cpp
+++ b/sources/shiboken2/generator/main.cpp
@@ -146,13 +146,18 @@ static void printOptions(QTextStream& s, const OptionDescriptions& options)
{
s.setFieldAlignment(QTextStream::AlignLeft);
for (const auto &od : options) {
- s << ' ';
if (!od.first.startsWith(QLatin1Char('-')))
s << "--";
- s.setFieldWidth(38);
- s << od.first << od.second;
- s.setFieldWidth(0);
- s << endl;
+ s << od.first;
+ if (od.second.isEmpty()) {
+ s << ", ";
+ } else {
+ s << endl;
+ const auto lines = od.second.splitRef(QLatin1Char('\n'));
+ for (const auto &line : lines)
+ s << " " << line << endl;
+ s << endl;
+ }
}
}
@@ -348,7 +353,8 @@ void printUsage()
<< qMakePair(QLatin1String("documentation-only"),
QLatin1String("Do not generates any code, just the documentation"))
<< qMakePair(QLatin1String("drop-type-entries=\"<TypeEntry0>[;TypeEntry1;...]\""),
- QLatin1String("Semicolon separated list of type system entries (classes, namespaces, global functions and enums) to be dropped from generation."))
+ QLatin1String("Semicolon separated list of type system entries (classes, namespaces,\n"
+ "global functions and enums) to be dropped from generation."))
<< qMakePair(QLatin1String("-F") + pathSyntax, QString())
<< qMakePair(QLatin1String("framework-include-paths=") + pathSyntax,
QLatin1String("Framework include paths used by the C++ parser"))
@@ -367,7 +373,8 @@ void printUsage()
<< qMakePair(QLatin1String("output-directory=<path>"),
QLatin1String("The directory where the generated files will be written"))
<< qMakePair(QLatin1String("project-file=<file>"),
- QLatin1String("text file containing a description of the binding project. Replaces and overrides command line arguments"))
+ QLatin1String("text file containing a description of the binding project.\n"
+ "Replaces and overrides command line arguments"))
<< qMakePair(QLatin1String("silent"),
QLatin1String("Avoid printing any message"))
<< qMakePair(QLatin1String("-T") + pathSyntax, QString())
@@ -381,7 +388,7 @@ void printUsage()
for (const GeneratorPtr &generator : generators) {
const OptionDescriptions options = generator->options();
if (!options.isEmpty()) {
- s << endl << generator->name() << " options:\n";
+ s << endl << generator->name() << " options:\n\n";
printOptions(s, generator->options());
}
}
diff --git a/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp b/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp
index 842c68b90..114ba401d 100644
--- a/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp
+++ b/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp
@@ -772,14 +772,25 @@ void QtXmlToSphinx::handleRowTag(QXmlStreamReader& reader)
}
}
+enum ListType { BulletList, OrderedList, EnumeratedList };
+
+static inline ListType webXmlListType(const QStringRef &t)
+{
+ if (t == QLatin1String("enum"))
+ return EnumeratedList;
+ if (t == QLatin1String("ordered"))
+ return OrderedList;
+ return BulletList;
+}
+
void QtXmlToSphinx::handleListTag(QXmlStreamReader& reader)
{
// BUG We do not support a list inside a table cell
- static QString listType;
+ static ListType listType = BulletList;
QXmlStreamReader::TokenType token = reader.tokenType();
if (token == QXmlStreamReader::StartElement) {
- listType = reader.attributes().value(QLatin1String("type")).toString();
- if (listType == QLatin1String("enum")) {
+ listType = webXmlListType(reader.attributes().value(QLatin1String("type")));
+ if (listType == EnumeratedList) {
m_currentTable << (TableRow() << "Constant" << "Description");
m_tableHasHeader = true;
}
@@ -787,19 +798,26 @@ void QtXmlToSphinx::handleListTag(QXmlStreamReader& reader)
} else if (token == QXmlStreamReader::EndElement) {
INDENT.indent++;
if (!m_currentTable.isEmpty()) {
- if (listType == QLatin1String("bullet")) {
+ switch (listType) {
+ case BulletList:
+ case OrderedList: {
m_output << endl;
+ const char *separator = listType == BulletList ? "* " : "#. ";
+ const char *indent = listType == BulletList ? " " : " ";
for (const TableCell &cell : m_currentTable.constFirst()) {
const QVector<QStringRef> itemLines = cell.data.splitRef(QLatin1Char('\n'));
- m_output << INDENT << "* " << itemLines.constFirst() << endl;
+ m_output << INDENT << separator << itemLines.constFirst() << endl;
for (int i = 1, max = itemLines.count(); i < max; ++i)
- m_output << INDENT << " " << itemLines[i] << endl;
+ m_output << INDENT << indent << itemLines[i] << endl;
}
m_output << endl;
- } else if (listType == QLatin1String("enum")) {
+ }
+ break;
+ case EnumeratedList:
m_currentTable.enableHeader(m_tableHasHeader);
m_currentTable.normalize();
m_output << ensureEndl << m_currentTable;
+ break;
}
}
m_currentTable.clear();
@@ -1289,6 +1307,12 @@ QString QtDocGenerator::fileNameSuffix() const
return QLatin1String(".rst");
}
+bool QtDocGenerator::shouldGenerate(const AbstractMetaClass *cls) const
+{
+ return Generator::shouldGenerate(cls)
+ && cls->typeEntry()->type() != TypeEntry::SmartPointerType;
+}
+
QString QtDocGenerator::fileNameForContext(GeneratorContext &context) const
{
const AbstractMetaClass *metaClass = context.metaClass();
@@ -1996,11 +2020,12 @@ Generator::OptionDescriptions QtDocGenerator::options() const
{
return OptionDescriptions()
<< qMakePair(QLatin1String("doc-parser"),
- QLatin1String("The documentation parser used to interpret the documentation input files (qdoc3|doxygen)"))
+ QLatin1String("The documentation parser used to interpret the documentation\n"
+ "input files (qdoc|doxygen)"))
<< qMakePair(QLatin1String("documentation-code-snippets-dir"),
QLatin1String("Directory used to search code snippets used by the documentation"))
<< qMakePair(QLatin1String("documentation-data-dir"),
- QLatin1String("Directory with XML files generated by documentation tool (qdoc3 or Doxygen)"))
+ QLatin1String("Directory with XML files generated by documentation tool"))
<< qMakePair(QLatin1String("documentation-extra-sections-dir"),
QLatin1String("Directory used to search for extra documentation sections"))
<< qMakePair(QLatin1String("library-source-dir"),
diff --git a/sources/shiboken2/generator/qtdoc/qtdocgenerator.h b/sources/shiboken2/generator/qtdoc/qtdocgenerator.h
index 9f08a4e8d..c8318b862 100644
--- a/sources/shiboken2/generator/qtdoc/qtdocgenerator.h
+++ b/sources/shiboken2/generator/qtdoc/qtdocgenerator.h
@@ -224,6 +224,8 @@ public:
return m_codeSnippetDirs;
}
+ bool shouldGenerate(const AbstractMetaClass *) const override;
+
protected:
QString fileNameSuffix() const override;
QString fileNameForContext(GeneratorContext &context) const override;
diff --git a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
index 18670eae6..8d4c146c1 100644
--- a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
@@ -4529,11 +4529,11 @@ void CppGenerator::writeEnumInitialization(QTextStream& s, const AbstractMetaEnu
enumValueText += cppEnum->name() + QLatin1String("::");
enumValueText += enumValue->name();
} else {
- enumValueText += QString::number(enumValue->value());
+ enumValueText += enumValue->value().toString();
}
- switch (enumTypeEntry->enumKind()) {
- case EnumTypeEntry::AnonymousEnum:
+ switch (cppEnum->enumKind()) {
+ case AnonymousEnum:
if (enclosingClass || hasUpperEnclosingClass) {
s << INDENT << '{' << endl;
{
@@ -4557,7 +4557,7 @@ void CppGenerator::writeEnumInitialization(QTextStream& s, const AbstractMetaEnu
}
}
break;
- case EnumTypeEntry::CEnum: {
+ case CEnum: {
s << INDENT << "if (!Shiboken::Enum::";
s << ((enclosingClass || hasUpperEnclosingClass) ? "createScopedEnumItem" : "createGlobalEnumItem");
s << '(' << enumVarTypeObj << ',' << endl;
@@ -4567,7 +4567,7 @@ void CppGenerator::writeEnumInitialization(QTextStream& s, const AbstractMetaEnu
s << INDENT << "return " << m_currentErrorCode << ';' << endl;
}
break;
- case EnumTypeEntry::EnumClass: {
+ case EnumClass: {
s << INDENT << "if (!Shiboken::Enum::createScopedEnumItem("
<< enumVarTypeObj << ',' << endl;
Indentation indent(INDENT);
diff --git a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
index d64719bb8..c3bb4cbc8 100644
--- a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
@@ -2240,7 +2240,13 @@ AbstractMetaClassList ShibokenGenerator::getBaseClasses(const AbstractMetaClass*
{
AbstractMetaClassList baseClasses;
if (metaClass) {
- const QStringList &baseClassNames = metaClass->baseClassNames();
+ QStringList baseClassNames(metaClass->baseClassNames());
+ const QString defaultSuperclass = metaClass->typeEntry()->defaultSuperclass();
+ if (!defaultSuperclass.isEmpty()) {
+ int index = baseClassNames.indexOf(defaultSuperclass);
+ if (index >= 0)
+ baseClassNames.move(index, 0);
+ }
for (const QString &parent : baseClassNames) {
AbstractMetaClass *clazz = AbstractMetaClass::findClass(classes(), parent);
if (clazz)
@@ -2513,15 +2519,19 @@ Generator::OptionDescriptions ShibokenGenerator::options() const
<< qMakePair(QLatin1String(AVOID_PROTECTED_HACK),
QLatin1String("Avoid the use of the '#define protected public' hack."))
<< qMakePair(QLatin1String(DISABLE_VERBOSE_ERROR_MESSAGES),
- QLatin1String("Disable verbose error messages. Turn the python code hard to debug but safe few kB on the generated bindings."))
+ QLatin1String("Disable verbose error messages. Turn the python code hard to debug\n"
+ "but safe few kB on the generated bindings."))
<< qMakePair(QLatin1String(PARENT_CTOR_HEURISTIC),
QLatin1String("Enable heuristics to detect parent relationship on constructors."))
<< qMakePair(QLatin1String(ENABLE_PYSIDE_EXTENSIONS),
- QLatin1String("Enable PySide extensions, such as support for signal/slots, use this if you are creating a binding for a Qt-based library."))
+ QLatin1String("Enable PySide extensions, such as support for signal/slots,\n"
+ "use this if you are creating a binding for a Qt-based library."))
<< qMakePair(QLatin1String(RETURN_VALUE_HEURISTIC),
- QLatin1String("Enable heuristics to detect parent relationship on return values (USE WITH CAUTION!)"))
+ QLatin1String("Enable heuristics to detect parent relationship on return values\n"
+ "(USE WITH CAUTION!)"))
<< qMakePair(QLatin1String(USE_ISNULL_AS_NB_NONZERO),
- QLatin1String("If a class have an isNull()const method, it will be used to compute the value of boolean casts"));
+ QLatin1String("If a class have an isNull() const method, it will be used to compute\n"
+ "the value of boolean casts"));
}
static void getCode(QStringList& code, const CodeSnipList& codeSnips)
diff --git a/sources/shiboken2/libshiboken/qapp_macro.cpp b/sources/shiboken2/libshiboken/qapp_macro.cpp
index 9b940aaaa..e3f23de4f 100644
--- a/sources/shiboken2/libshiboken/qapp_macro.cpp
+++ b/sources/shiboken2/libshiboken/qapp_macro.cpp
@@ -105,7 +105,14 @@ reset_qApp_var()
return 0;
}
-
+/*
+ * Note:
+ * The PYSIDE-585 problem was that shutdown is called one more often
+ * than Q*Application is created. We could special-case that last
+ * shutdown or add a refcount, initially, but actually it was easier
+ * and more intuitive in that context to make the refcount of
+ * qApp_content equal to the refcount of Py_None.
+ */
PyObject *
MakeSingletonQAppWrapper(PyTypeObject *type)
{
@@ -132,15 +139,16 @@ MakeSingletonQAppWrapper(PyTypeObject *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
// to do a full shutdown, using QtCore.__moduleShutdown().
+ // restore the "None-state"
PyObject *__moduleShutdown = PyDict_GetItemString(qApp_moduledicts[1],
"__moduleShutdown");
- if (__moduleShutdown != NULL) {
- Py_DECREF(PyObject_CallFunction(__moduleShutdown, (char *)"()"));
- }
- // restore the "None-state"
+ // PYSIDE-585: It was crucial to update the refcounts *before*
+ // calling the shutdown.
Py_TYPE(qApp_content) = Py_NONE_TYPE;
Py_REFCNT(qApp_var) = qApp_var_ref;
- Py_REFCNT(qApp_content) = qApp_content_ref;
+ Py_REFCNT(qApp_content) = Py_REFCNT(Py_None);
+ if (__moduleShutdown != NULL)
+ Py_DECREF(PyObject_CallFunction(__moduleShutdown, (char *)"()"));
}
else
(void)PyObject_INIT(qApp_content, type);
@@ -160,7 +168,7 @@ setup_qApp_var(PyObject *module)
return -1;
// This is a borrowed reference
qApp_moduledicts[0] = PyEval_GetBuiltins();
- Py_INCREF(qApp_content);
+ Py_INCREF(qApp_moduledicts[0]);
init_done = 1;
}
@@ -170,7 +178,7 @@ setup_qApp_var(PyObject *module)
if (module_index) {
// This line gets a borrowed reference
qApp_moduledicts[module_index] = PyModule_GetDict(module);
- Py_INCREF(qApp_content);
+ Py_INCREF(qApp_moduledicts[module_index]);
if (reset_qApp_var() < 0)
return -1;
}
diff --git a/sources/shiboken2/libshiboken/sbkconverter.cpp b/sources/shiboken2/libshiboken/sbkconverter.cpp
index 0e154da39..c81a1612b 100644
--- a/sources/shiboken2/libshiboken/sbkconverter.cpp
+++ b/sources/shiboken2/libshiboken/sbkconverter.cpp
@@ -523,7 +523,10 @@ PyTypeObject* getPythonTypeObject(const char* typeName)
bool pythonTypeIsValueType(const SbkConverter *converter)
{
- assert(converter);
+ // Unlikely to happen but for multi-inheritance SbkObjs
+ // the converter is not defined, hence we need a default return.
+ if (!converter)
+ return false;
return converter->pointerToPython && converter->copyToPython;
}
diff --git a/sources/shiboken2/tests/samplebinding/typesystem_sample.xml b/sources/shiboken2/tests/samplebinding/typesystem_sample.xml
index 5a12eeccd..3cc80860d 100644
--- a/sources/shiboken2/tests/samplebinding/typesystem_sample.xml
+++ b/sources/shiboken2/tests/samplebinding/typesystem_sample.xml
@@ -798,7 +798,7 @@
<value-type name="Event">
<enum-type name="EventType"/>
- <enum-type name="EventTypeClass" class="yes"/>
+ <enum-type name="EventTypeClass"/>
</value-type>
<value-type name="BlackBox">
diff --git a/utils.py b/utils.py
index d1bf2d6b9..da4061fac 100644
--- a/utils.py
+++ b/utils.py
@@ -71,7 +71,7 @@ except NameError:
def has_option(name):
try:
- sys.argv.remove('--%s' % name)
+ sys.argv.remove("--{}".format(name))
return True
except ValueError:
pass
@@ -82,8 +82,8 @@ def option_value(name):
for index, option in enumerate(sys.argv):
if option == '--' + name:
if index+1 >= len(sys.argv):
- raise DistutilsOptionError(
- 'The option %s requires a value' % option)
+ raise DistutilsOptionError("The option {} requires a "
+ "value".format(option))
value = sys.argv[index+1]
sys.argv[index:index+2] = []
return value
@@ -108,7 +108,7 @@ def update_env_path(newpaths):
paths = os.environ['PATH'].lower().split(os.pathsep)
for path in newpaths:
if not path.lower() in paths:
- log.info("Inserting path \"%s\" to environment" % path)
+ log.info("Inserting path '{}' to environment".format(path))
paths.insert(0, path)
os.environ['PATH'] = path + os.pathsep + os.environ['PATH']
@@ -127,7 +127,8 @@ def winsdk_setenv(platform_arch, build_type):
"v7.1": 10.0
}
- log.info("Searching Windows SDK with MSVC compiler version %s" % MSVC_VERSION)
+ log.info("Searching Windows SDK with MSVC compiler version {}".format(
+ MSVC_VERSION))
setenv_paths = []
for base in HKEYS:
sdk_versions = Reg.read_keys(base, WINSDK_BASE)
@@ -148,14 +149,14 @@ def winsdk_setenv(platform_arch, build_type):
setenv_paths.append(setenv_path)
if len(setenv_paths) == 0:
raise DistutilsSetupError(
- "Failed to find the Windows SDK with MSVC compiler version %s"
- % MSVC_VERSION)
+ "Failed to find the Windows SDK with MSVC compiler "
+ "version {}".format(MSVC_VERSION))
for setenv_path in setenv_paths:
- log.info("Found %s" % setenv_path)
+ log.info("Found {}".format(setenv_path))
# Get SDK env (use latest SDK version installed on system)
setenv_path = setenv_paths[-1]
- log.info("Using %s " % setenv_path)
+ log.info("Using {} ".format(setenv_path))
build_arch = "/x86" if platform_arch.startswith("32") else "/x64"
build_type = "/Debug" if build_type.lower() == "debug" else "/Release"
setenv_cmd = [setenv_path, build_arch, build_type]
@@ -168,22 +169,22 @@ def winsdk_setenv(platform_arch, build_type):
update_env_path(setenv_env_paths)
for k in sorted(setenv_env_without_paths):
v = setenv_env_without_paths[k]
- log.info("Inserting \"%s = %s\" to environment" % (k, v))
+ log.info("Inserting '{} = {}' to environment".format(k, v))
os.environ[k] = v
log.info("Done initializing Windows SDK env")
def find_vcdir(version):
"""
- This is the customized version of distutils.msvc9compiler.find_vcvarsall method
+ This is the customized version of
+ distutils.msvc9compiler.find_vcvarsall method
"""
from distutils.msvc9compiler import VS_BASE
from distutils.msvc9compiler import Reg
from distutils import log
vsbase = VS_BASE % version
try:
- productdir = Reg.get_value(r"%s\Setup\VC" % vsbase,
- "productdir")
+ productdir = Reg.get_value(r"{}\Setup\VC".format(vsbase), "productdir")
except KeyError:
productdir = None
@@ -196,7 +197,7 @@ def find_vcdir(version):
else:
vsbase = VSEXPRESS_BASE % version
try:
- productdir = Reg.get_value(r"%s\Setup\VC" % vsbase,
+ productdir = Reg.get_value(r"{}\Setup\VC".format(vsbase),
"productdir")
except KeyError:
productdir = None
@@ -210,10 +211,10 @@ def find_vcdir(version):
productdir = os.path.join(toolsdir, os.pardir, os.pardir, "VC")
productdir = os.path.abspath(productdir)
if not os.path.isdir(productdir):
- log.debug("%s is not a valid directory" % productdir)
+ log.debug("{} is not a valid directory".format(productdir))
return None
else:
- log.debug("Env var %s is not set or invalid" % toolskey)
+ log.debug("Env var {} is not set or invalid".format(toolskey))
if not productdir:
log.debug("No productdir found")
return None
@@ -223,37 +224,41 @@ def find_vcdir(version):
def init_msvc_env(platform_arch, build_type):
from distutils.msvc9compiler import VERSION as MSVC_VERSION
- log.info("Searching MSVC compiler version %s" % MSVC_VERSION)
+ log.info("Searching MSVC compiler version {}".format(MSVC_VERSION))
vcdir_path = find_vcdir(MSVC_VERSION)
if not vcdir_path:
raise DistutilsSetupError(
- "Failed to find the MSVC compiler version %s on your system." % MSVC_VERSION)
+ "Failed to find the MSVC compiler version {} on your "
+ "system.".formar(MSVC_VERSION))
else:
- log.info("Found %s" % vcdir_path)
+ log.info("Found {}".format(vcdir_path))
- log.info("Searching MSVC compiler %s environment init script" % MSVC_VERSION)
+ log.info("Searching MSVC compiler {} environment init script".format(
+ MSVC_VERSION))
if platform_arch.startswith("32"):
vcvars_path = os.path.join(vcdir_path, "bin", "vcvars32.bat")
else:
vcvars_path = os.path.join(vcdir_path, "bin", "vcvars64.bat")
if not os.path.exists(vcvars_path):
- vcvars_path = os.path.join(vcdir_path, "bin", "amd64", "vcvars64.bat")
+ vcvars_path = os.path.join(vcdir_path, "bin", "amd64",
+ "vcvars64.bat")
if not os.path.exists(vcvars_path):
- vcvars_path = os.path.join(vcdir_path, "bin", "amd64", "vcvarsamd64.bat")
+ vcvars_path = os.path.join(vcdir_path, "bin", "amd64",
+ "vcvarsamd64.bat")
if not os.path.exists(vcvars_path):
# MSVC init script not found, try to find and init Windows SDK env
- log.error(
- "Failed to find the MSVC compiler environment init script (vcvars.bat) on your system.")
+ log.error("Failed to find the MSVC compiler environment init script "
+ "(vcvars.bat) on your system.")
winsdk_setenv(platform_arch, build_type)
return
else:
- log.info("Found %s" % vcvars_path)
+ log.info("Found {}".format(vcvars_path))
# Get MSVC env
- log.info("Using MSVC %s in %s" % (MSVC_VERSION, vcvars_path))
+ log.info("Using MSVC {} in {}".format(MSVC_VERSION, vcvars_path))
msvc_arch = "x86" if platform_arch.startswith("32") else "amd64"
- log.info("Getting MSVC env for %s architecture" % msvc_arch)
+ log.info("Getting MSVC env for {} architecture".format(msvc_arch))
vcvars_cmd = [vcvars_path, msvc_arch]
msvc_env = get_environment_from_batch_command(vcvars_cmd)
msvc_env_paths = os.pathsep.join([msvc_env[k] for k in msvc_env if k.upper() == 'PATH']).split(os.pathsep)
@@ -264,7 +269,7 @@ def init_msvc_env(platform_arch, build_type):
update_env_path(msvc_env_paths)
for k in sorted(msvc_env_without_paths):
v = msvc_env_without_paths[k]
- log.info("Inserting \"%s = %s\" to environment" % (k, v))
+ log.info("Inserting '{} = {}' to environment".format(k, v))
os.environ[k] = v
log.info("Done initializing MSVC env")
@@ -275,11 +280,12 @@ def copyfile(src, dst, force=True, vars=None, force_copy_symlink=False):
dst = dst.format(**vars)
if not os.path.exists(src) and not force:
- log.info("**Skiping copy file %s to %s. Source does not exists." % (src, dst))
+ log.info("**Skiping copy file {} to {}. "
+ "Source does not exists.".format(src, dst))
return
if not os.path.islink(src) or force_copy_symlink:
- log.info("Copying file %s to %s." % (src, dst))
+ log.info("Copying file {} to {}.".format(src, dst))
shutil.copy2(src, dst)
else:
linkTargetPath = os.path.realpath(src)
@@ -292,14 +298,17 @@ def copyfile(src, dst, force=True, vars=None, force_copy_symlink=False):
os.chdir(targetDir)
if os.path.exists(linkName):
os.remove(linkName)
- log.info("Symlinking %s -> %s in %s." % (linkName, linkTarget, targetDir))
+ log.info("Symlinking {} -> {} in {}.".format(linkName,
+ linkTarget, targetDir))
os.symlink(linkTarget, linkName)
except OSError:
- log.error("%s -> %s: Error creating symlink" % (linkName, linkTarget))
+ log.error("{} -> {}: Error creating symlink".format(linkName,
+ linkTarget))
finally:
os.chdir(currentDirectory)
else:
- log.error("%s -> %s: Can only create symlinks within the same directory" % (src, linkTargetPath))
+ log.error("{} -> {}: Can only create symlinks within the same "
+ "directory".format(src, linkTargetPath))
return dst
@@ -310,7 +319,7 @@ def makefile(dst, content=None, vars=None):
content = content.format(**vars)
dst = dst.format(**vars)
- log.info("Making file %s." % (dst))
+ log.info("Making file {}.".format(dst))
dstdir = os.path.dirname(dst)
if not os.path.exists(dstdir):
@@ -322,8 +331,9 @@ def makefile(dst, content=None, vars=None):
f.close()
-def copydir(src, dst, filter=None, ignore=None, force=True, recursive=True, vars=None,
- dir_filter_function=None, file_filter_function=None, force_copy_symlinks=False):
+def copydir(src, dst, filter=None, ignore=None, force=True, recursive=True,
+ vars=None, dir_filter_function=None, file_filter_function=None,
+ force_copy_symlinks=False):
if vars is not None:
src = src.format(**vars)
@@ -336,12 +346,12 @@ def copydir(src, dst, filter=None, ignore=None, force=True, recursive=True, vars
ignore[i] = ignore[i].format(**vars)
if not os.path.exists(src) and not force:
- log.info("**Skiping copy tree %s to %s. Source does not exists. filter=%s. ignore=%s." % \
- (src, dst, filter, ignore))
+ log.info("**Skiping copy tree {} to {}. Source does not exists. "
+ "filter={}. ignore={}.".format(src, dst, filter, ignore))
return []
- log.info("Copying tree %s to %s. filter=%s. ignore=%s." % \
- (src, dst, filter, ignore))
+ log.info("Copying tree {} to {}. filter={}. ignore={}.".format(src, dst,
+ filter, ignore))
names = os.listdir(src)
@@ -352,21 +362,25 @@ def copydir(src, dst, filter=None, ignore=None, force=True, recursive=True, vars
dstname = os.path.join(dst, name)
try:
if os.path.isdir(srcname):
- if dir_filter_function and not dir_filter_function(name, src, srcname):
+ if (dir_filter_function and
+ not dir_filter_function(name, src, srcname)):
continue
if recursive:
results.extend(
- copydir(srcname, dstname, filter, ignore, force, recursive,
- vars, dir_filter_function, file_filter_function,
- force_copy_symlinks))
+ copydir(srcname, dstname, filter, ignore, force,
+ recursive, vars, dir_filter_function,
+ file_filter_function, force_copy_symlinks))
else:
- if (file_filter_function is not None and not file_filter_function(name, srcname)) \
- or (filter is not None and not filter_match(name, filter)) \
- or (ignore is not None and filter_match(name, ignore)):
+ if ((file_filter_function is not None and
+ not file_filter_function(name, srcname)) or
+ (filter is not None and
+ not filter_match(name, filter)) or
+ (ignore is not None and filter_match(name, ignore))):
continue
if not os.path.exists(dst):
os.makedirs(dst)
- results.append(copyfile(srcname, dstname, True, vars, force_copy_symlinks))
+ results.append(copyfile(srcname, dstname, True, vars,
+ force_copy_symlinks))
# catch the Error from the recursive copytree so that we can
# continue with other files
except shutil.Error as err:
@@ -423,7 +437,8 @@ def run_process(args, initial_env=None):
for line in lines:
log.info(line.rstrip('\r'))
return buffer
- _log("Running process in {0}: {1}".format(os.getcwd(), " ".join([(" " in x and '"{0}"'.format(x) or x) for x in args])))
+ _log("Running process in {0}: {1}".format(os.getcwd(),
+ " ".join([(" " in x and '"{0}"'.format(x) or x) for x in args])))
if sys.platform != "win32":
try:
@@ -471,7 +486,7 @@ def get_environment_from_batch_command(env_cmd, initial=None):
def validate_pair(ob):
try:
if not (len(ob) == 2):
- print("Unexpected result: %s" % ob)
+ print("Unexpected result: {}".format(ob))
raise ValueError
except:
return False
@@ -490,7 +505,8 @@ def get_environment_from_batch_command(env_cmd, initial=None):
# create a tag so we can tell in the output when the proc is done
tag = 'Done running command'
# construct a cmd.exe command to do accomplish this
- cmd = 'cmd.exe /E:ON /V:ON /s /c "{env_cmd} && echo "{tag}" && set"'.format(**vars())
+ cmd = 'cmd.exe /E:ON /V:ON /s /c "{} && echo "{}" && set"'.format(env_cmd,
+ tag)
# launch the process
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, env=initial)
# parse the output sent to stdout
@@ -527,15 +543,17 @@ def regenerate_qt_resources(src, pyside_rcc_path, pyside_rcc_options):
srcname_split = srcname.rsplit('.qrc', 1)
dstname = '_rc.py'.join(srcname_split)
if os.path.exists(dstname):
- log.info('Regenerating %s from %s' % \
- (dstname, os.path.basename(srcname)))
+ log.info('Regenerating {} from {}'.format(dstname,
+ os.path.basename(srcname)))
run_process([pyside_rcc_path,
pyside_rcc_options,
srcname, '-o', dstname])
def back_tick(cmd, ret_err=False):
- """ Run command `cmd`, return stdout, or stdout, stderr, return_code if `ret_err` is True.
+ """
+ Run command `cmd`, return stdout, or stdout, stderr,
+ return_code if `ret_err` is True.
Roughly equivalent to ``check_output`` in Python 2.7
@@ -544,22 +562,25 @@ def back_tick(cmd, ret_err=False):
cmd : str
command to execute
ret_err : bool, optional
- If True, return stderr and return_code in addition to stdout. If False, just return
- stdout
+ If True, return stderr and return_code in addition to stdout.
+ If False, just return stdout
Returns
-------
out : str or tuple
If `ret_err` is False, return stripped string containing stdout from
- `cmd`. If `ret_err` is True, return tuple of (stdout, stderr, return_code) where
- ``stdout`` is the stripped stdout, and ``stderr`` is the stripped
+ `cmd`.
+ If `ret_err` is True, return tuple of (stdout, stderr, return_code)
+ where ``stdout`` is the stripped stdout, and ``stderr`` is the stripped
stderr, and ``return_code`` is the process exit code.
Raises
------
- Raises RuntimeError if command returns non-zero exit code when ret_err isn't set.
+ Raises RuntimeError if command returns non-zero exit code when ret_err
+ isn't set.
"""
- proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
+ proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE, shell=True)
out, err = proc.communicate()
if not isinstance(out, str):
# python 3
@@ -570,19 +591,20 @@ def back_tick(cmd, ret_err=False):
proc.terminate()
raise RuntimeError(cmd + ' process did not terminate')
if retcode != 0 and not ret_err:
- raise RuntimeError(cmd + ' process returned code %d\n*** %s' %
- (retcode, err))
+ raise RuntimeError("{} process returned code {}\n*** {}".format(
+ (cmd, retcode, err)))
out = out.strip()
if not ret_err:
return out
return out, err.strip(), retcode
-OSX_OUTNAME_RE = re.compile(r'\(compatibility version [\d.]+, current version '
+MACOS_OUTNAME_RE = re.compile(r'\(compatibility version [\d.]+, current version '
'[\d.]+\)')
-def osx_get_install_names(libpath):
- """ Get OSX library install names from library `libpath` using ``otool``
+def macos_get_install_names(libpath):
+ """
+ Get macOS library install names from library `libpath` using ``otool``
Parameters
----------
@@ -596,12 +618,12 @@ def osx_get_install_names(libpath):
"""
out = back_tick('otool -L ' + libpath)
libs = [line for line in out.split('\n')][1:]
- return [OSX_OUTNAME_RE.sub('', lib).strip() for lib in libs]
+ return [MACOS_OUTNAME_RE.sub('', lib).strip() for lib in libs]
-OSX_RPATH_RE = re.compile(r"path (.+) \(offset \d+\)")
+MACOS_RPATH_RE = re.compile(r"path (.+) \(offset \d+\)")
-def osx_get_rpaths(libpath):
+def macos_get_rpaths(libpath):
""" Get rpath load commands from library `libpath` using ``otool``
Parameters
@@ -628,7 +650,7 @@ def osx_get_rpaths(libpath):
continue
assert lines[ctr + 1].strip().startswith('cmdsize')
rpath_line = lines[ctr + 2].strip()
- match = OSX_RPATH_RE.match(rpath_line)
+ match = MACOS_RPATH_RE.match(rpath_line)
if match is None:
raise RuntimeError('Unexpected path line: ' + rpath_line)
rpaths.append(match.groups()[0])
@@ -636,15 +658,16 @@ def osx_get_rpaths(libpath):
return rpaths
-def osx_fix_rpaths_for_library(library_path, qt_lib_dir):
+def macos_fix_rpaths_for_library(library_path, qt_lib_dir):
""" Adds required rpath load commands to given library.
- This is a necessary post-installation step, to allow loading PySide modules without setting
- DYLD_LIBRARY_PATH or DYLD_FRAMEWORK_PATH.
- The CMake rpath commands which are added at build time are used only for testing (make check),
- and they are stripped once the equivalent of make install is executed (except for shiboken,
- which currently uses CMAKE_INSTALL_RPATH_USE_LINK_PATH, which might be necessary to remove in
- the future).
+ This is a necessary post-installation step, to allow loading PySide
+ modules without setting DYLD_LIBRARY_PATH or DYLD_FRAMEWORK_PATH.
+ The CMake rpath commands which are added at build time are used only
+ for testing (make check), and they are stripped once the equivalent
+ of make install is executed (except for shiboken, which currently
+ uses CMAKE_INSTALL_RPATH_USE_LINK_PATH, which might be necessary to
+ remove in the future).
Parameters
----------
@@ -654,8 +677,8 @@ def osx_fix_rpaths_for_library(library_path, qt_lib_dir):
rpath to installed Qt lib directory.
"""
- install_names = osx_get_install_names(library_path)
- existing_rpath_commands = osx_get_rpaths(library_path)
+ install_names = macos_get_install_names(library_path)
+ existing_rpath_commands = macos_get_rpaths(library_path)
needs_loader_path = False
for install_name in install_names:
@@ -663,9 +686,10 @@ def osx_fix_rpaths_for_library(library_path, qt_lib_dir):
if install_name[0] == '/':
continue
- # If there are dynamic library install names that contain @rpath tokens, we will
- # provide an rpath load command with the value of "@loader_path". This will allow loading
- # dependent libraries from within the same directory as 'library_path'.
+ # If there are dynamic library install names that contain
+ # @rpath tokens, we will provide an rpath load command with the
+ # value of "@loader_path". This will allow loading dependent
+ # libraries from within the same directory as 'library_path'.
if install_name[0] == '@':
needs_loader_path = True
break
@@ -674,19 +698,22 @@ def osx_fix_rpaths_for_library(library_path, qt_lib_dir):
back_tick('install_name_tool -add_rpath {rpath} {library_path}'.format(
rpath="@loader_path", library_path=library_path))
- # If the library depends on a Qt library, add an rpath load comment pointing to the Qt lib
- # directory.
- osx_add_qt_rpath(library_path, qt_lib_dir, existing_rpath_commands, install_names)
+ # If the library depends on a Qt library, add an rpath load comment
+ # pointing to the Qt lib directory.
+ macos_add_qt_rpath(library_path, qt_lib_dir, existing_rpath_commands,
+ install_names)
-def osx_add_qt_rpath(library_path, qt_lib_dir,
+def macos_add_qt_rpath(library_path, qt_lib_dir,
existing_rpath_commands = [], library_dependencies = []):
- """ Adds an rpath load command to the Qt lib directory if necessary
+ """
+ Adds an rpath load command to the Qt lib directory if necessary
- Checks if library pointed to by 'library_path' has Qt dependencies, and adds an rpath load
- command that points to the Qt lib directory (qt_lib_dir).
+ Checks if library pointed to by 'library_path' has Qt dependencies,
+ and adds an rpath load command that points to the Qt lib directory
+ (qt_lib_dir).
"""
if not existing_rpath_commands:
- existing_rpath_commands = osx_get_rpaths(library_path)
+ existing_rpath_commands = macos_get_rpaths(library_path)
# Return early if qt rpath is already present.
if qt_lib_dir in existing_rpath_commands:
@@ -694,7 +721,7 @@ def osx_add_qt_rpath(library_path, qt_lib_dir,
# Check if any library dependencies are Qt libraries (hacky).
if not library_dependencies:
- library_dependencies = osx_get_install_names(library_path)
+ library_dependencies = macos_get_install_names(library_path)
needs_qt_rpath = False
for library in library_dependencies:
@@ -748,9 +775,10 @@ def detectClang():
if not clangDir:
source = findLlvmConfig()
try:
- output = run_process_output([source, '--prefix'])
- if output:
- clangDir = output[0]
+ if source is not None:
+ output = run_process_output([source, '--prefix'])
+ if output:
+ clangDir = output[0]
except OSError:
pass
if clangDir:
@@ -760,27 +788,29 @@ def detectClang():
def download_and_extract_7z(fileurl, target):
""" Downloads 7z file from fileurl and extract to target """
- print("Downloading fileUrl %s " % fileurl)
+ print("Downloading fileUrl {} ".format(fileurl))
info = ""
try:
localfile, info = urllib.urlretrieve(fileurl)
except:
- print("Error downloading %r : %r" % (fileurl, info))
- raise RuntimeError(' Error downloading ' + fileurl)
+ print("Error downloading {} : {}".format(fileurl, info))
+ raise RuntimeError(' Error downloading {}'.format(fileurl))
try:
outputDir = "-o" + target
- print("calling 7z x %s %s" % (localfile, outputDir))
+ print("calling 7z x {} {}".format(localfile, outputDir))
subprocess.call(["7z", "x", "-y", localfile, outputDir])
except:
- raise RuntimeError(' Error extracting ' + localfile)
+ raise RuntimeError(' Error extracting {}'.format(localfile))
def split_and_strip(input):
lines = [s.strip() for s in input.splitlines()]
return lines
def ldd_get_dependencies(executable_path):
- """ Returns a dictionary of dependencies that `executable_path` depends on.
+ """
+ Returns a dictionary of dependencies that `executable_path`
+ depends on.
The keys are library names and the values are the library paths.
@@ -795,16 +825,20 @@ def ldd_get_dependencies(executable_path):
dependencies[match.group(1)] = match.group(2)
return dependencies
-def ldd_get_paths_for_dependencies(dependencies_regex, executable_path = None, dependencies = None):
- """ Returns file paths to shared library dependencies that match given `dependencies_regex`
- against given `executable_path`.
+def ldd_get_paths_for_dependencies(dependencies_regex, executable_path = None,
+ dependencies = None):
+ """
+ Returns file paths to shared library dependencies that match given
+ `dependencies_regex` against given `executable_path`.
- The function retrieves the list of shared library dependencies using ld.so for the given
- `executable_path` in order to search for libraries that match the `dependencies_regex`, and
- then returns a list of absolute paths of the matching libraries.
+ The function retrieves the list of shared library dependencies using
+ ld.so for the given `executable_path` in order to search for
+ libraries that match the `dependencies_regex`, and then returns a
+ list of absolute paths of the matching libraries.
- If no matching library is found in the list of dependencies, an empty list is returned.
- """
+ If no matching library is found in the list of dependencies,
+ an empty list is returned.
+ """
if not dependencies and not executable_path:
return None
@@ -823,14 +857,19 @@ def ldd_get_paths_for_dependencies(dependencies_regex, executable_path = None, d
return paths
def ldd(executable_path):
- """ Returns ld.so output of shared library dependencies for given `executable_path`.
-
- This is a partial port of /usr/bin/ldd from bash to Python. The dependency list is retrieved
- by setting the LD_TRACE_LOADED_OBJECTS=1 environment variable, and executing the given path
- via the dynamic loader ld.so.
-
- Only works on Linux. The port is required to make this work on systems that might not have ldd.
- This is because ldd (on Ubuntu) is shipped in the libc-bin package that, which might have a
+ """
+ Returns ld.so output of shared library dependencies for given
+ `executable_path`.
+
+ This is a partial port of /usr/bin/ldd from bash to Python.
+ The dependency list is retrieved by setting the
+ LD_TRACE_LOADED_OBJECTS=1 environment variable, and executing the
+ given path via the dynamic loader ld.so.
+
+ Only works on Linux. The port is required to make this work on
+ systems that might not have ldd.
+ This is because ldd (on Ubuntu) is shipped in the libc-bin package
+ that, which might have a
minuscule percentage of not being installed.
Parameters
@@ -845,24 +884,29 @@ def ldd(executable_path):
"""
chosen_rtld = None
- # List of ld's considered by ldd on Ubuntu (here's hoping it's the same on all distros).
- rtld_list = ["/lib/ld-linux.so.2", "/lib64/ld-linux-x86-64.so.2", "/libx32/ld-linux-x32.so.2"]
+ # List of ld's considered by ldd on Ubuntu (here's hoping it's the
+ # same on all distros).
+ rtld_list = ["/lib/ld-linux.so.2", "/lib64/ld-linux-x86-64.so.2",
+ "/libx32/ld-linux-x32.so.2"]
# Choose appropriate runtime dynamic linker.
for rtld in rtld_list:
if os.path.isfile(rtld) and os.access(rtld, os.X_OK):
(_, _, code) = back_tick(rtld, True)
- # Code 127 is returned by ld.so when called without any arguments (some kind of sanity
- # check I guess).
+ # Code 127 is returned by ld.so when called without any
+ # arguments (some kind of sanity check I guess).
if code == 127:
- (_, _, code) = back_tick("{} --verify {}".format(rtld, executable_path), True)
- # Codes 0 and 2 mean given executable_path can be understood by ld.so.
+ (_, _, code) = back_tick("{} --verify {}".format(rtld,
+ executable_path), True)
+ # Codes 0 and 2 mean given executable_path can be
+ # understood by ld.so.
if code in [0, 2]:
chosen_rtld = rtld
break
if not chosen_rtld:
- raise RuntimeError('Could not find appropriate ld.so to query for dependencies.')
+ raise RuntimeError("Could not find appropriate ld.so to query "
+ "for dependencies.")
# Query for shared library dependencies.
rtld_env = "LD_TRACE_LOADED_OBJECTS=1"
@@ -871,8 +915,8 @@ def ldd(executable_path):
if return_code == 0:
return out
else:
- raise RuntimeError('ld.so failed to query for dependent shared libraries '
- 'of {} '.format(executable_path))
+ raise RuntimeError("ld.so failed to query for dependent shared "
+ "libraries of {} ".format(executable_path))
def find_files_using_glob(path, pattern):
""" Returns list of files that matched glob `pattern` in `path`. """
@@ -887,17 +931,21 @@ def find_qt_core_library_glob(lib_dir):
return maybe_file[0]
return None
-# @TODO: Possibly fix ICU library copying on macOS and Windows. This would require
-# to implement the equivalent of the custom written ldd for the specified platforms.
-# This has less priority because ICU libs are not used in the default Qt configuration build.
-
+# @TODO: Possibly fix ICU library copying on macOS and Windows.
+# This would require to implement the equivalent of the custom written
+# ldd for the specified platforms.
+# This has less priority because ICU libs are not used in the default
+# Qt configuration build.
def copy_icu_libs(destination_lib_dir):
- """ Copy ICU libraries that QtCore depends on, to given `destination_lib_dir`. """
+ """
+ Copy ICU libraries that QtCore depends on,
+ to given `destination_lib_dir`.
+ """
qt_core_library_path = find_qt_core_library_glob(destination_lib_dir)
if not qt_core_library_path or not os.path.exists(qt_core_library_path):
raise RuntimeError('QtCore library does not exist at path: {}. '
- 'Failed to copy ICU libraries.'.format(qt_core_library_path))
+ 'Failed to copy ICU libraries.'.format(qt_core_library_path))
dependencies = ldd_get_dependencies(qt_core_library_path)
@@ -911,9 +959,11 @@ def copy_icu_libs(destination_lib_dir):
break
if icu_required:
- paths = ldd_get_paths_for_dependencies(icu_regex, dependencies=dependencies)
+ paths = ldd_get_paths_for_dependencies(icu_regex,
+ dependencies=dependencies)
if not paths:
- raise RuntimeError('Failed to find the necessary ICU libraries required by QtCore.')
+ raise RuntimeError("Failed to find the necessary ICU libraries "
+ "required by QtCore.")
log.info('Copying the detected ICU libraries required by QtCore.')
if not os.path.exists(destination_lib_dir):
@@ -923,12 +973,14 @@ def copy_icu_libs(destination_lib_dir):
basename = os.path.basename(path)
destination = os.path.join(destination_lib_dir, basename)
copyfile(path, destination, force_copy_symlink=True)
- # Patch the ICU libraries to contain the $ORIGIN rpath value, so that only the local
- # package libraries are used.
+ # Patch the ICU libraries to contain the $ORIGIN rpath
+ # value, so that only the local package libraries are used.
linuxSetRPaths(destination, '$ORIGIN')
- # Patch the QtCore library to find the copied over ICU libraries (if necessary).
- log.info('Checking if QtCore library needs a new rpath to make it work with ICU libs.')
+ # Patch the QtCore library to find the copied over ICU libraries
+ # (if necessary).
+ log.info("Checking if QtCore library needs a new rpath to make it "
+ "work with ICU libs.")
rpaths = linuxGetRPaths(qt_core_library_path)
if not rpaths or not rpathsHasOrigin(rpaths):
log.info('Patching QtCore library to contain $ORIGIN rpath.')
@@ -944,19 +996,24 @@ def linuxSetRPaths(executable_path, rpath_string):
patchelf_path = os.path.join(script_dir, "patchelf")
setattr(linuxSetRPaths, "patchelf_path", patchelf_path)
- cmd = [linuxSetRPaths.patchelf_path, '--set-rpath', rpath_string, executable_path]
+ cmd = [linuxSetRPaths.patchelf_path, '--set-rpath',
+ rpath_string, executable_path]
if run_process(cmd) != 0:
- raise RuntimeError("Error patching rpath in {}".format(executable_path))
+ raise RuntimeError("Error patching rpath in {}".format(
+ executable_path))
def linuxGetRPaths(executable_path):
- """ Returns a list of run path values embedded in the executable or just an empty list. """
+ """
+ Returns a list of run path values embedded in the executable or just
+ an empty list.
+ """
cmd = "readelf -d {}".format(executable_path)
(out, err, code) = back_tick(cmd, True)
if code != 0:
- raise RuntimeError('Running `readelf -d {}` failed with '
- 'error output:\n {}. '.format(executable_path, err))
+ raise RuntimeError("Running `readelf -d {}` failed with error "
+ "output:\n {}. ".format(executable_path, err))
lines = split_and_strip(out)
pattern = re.compile(r"^.+?\(RUNPATH\).+?\[(.+?)\]$")
@@ -975,7 +1032,10 @@ def linuxGetRPaths(executable_path):
return rpaths
def rpathsHasOrigin(rpaths):
- """ Return True if the specified list of rpaths has an "$ORIGIN" value (aka current dir). """
+ """
+ Return True if the specified list of rpaths has an "$ORIGIN" value
+ (aka current dir).
+ """
if not rpaths:
return False
@@ -987,8 +1047,10 @@ def rpathsHasOrigin(rpaths):
return False
def memoize(function):
- """ Decorator to wrap a function with a memoizing callable.
- It returns cached values when the wrapped function is called with the same arguments.
+ """
+ Decorator to wrap a function with a memoizing callable.
+ It returns cached values when the wrapped function is called with
+ the same arguments.
"""
memo = {}
def wrapper(*args):
@@ -1008,5 +1070,6 @@ def get_python_dict(python_script_path):
exec(code, {}, python_dict)
return python_dict
except IOError as e:
- print("get_python_dict: Couldn't get dict from python file: {}.".format(python_script_path))
+ print("get_python_dict: Couldn't get dict from python "
+ "file: {}.".format(python_script_path))
raise