aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken6')
-rw-r--r--sources/shiboken6/ApiExtractor/abstractmetatype.cpp2
-rw-r--r--sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp2
-rw-r--r--sources/shiboken6/ApiExtractor/typesystemparser.cpp2
-rw-r--r--sources/shiboken6/data/Shiboken6Config-spec.cmake.in2
-rw-r--r--sources/shiboken6/doc/considerations.rst4
-rw-r--r--sources/shiboken6/doc/examples/samplebinding.rst2
-rw-r--r--sources/shiboken6/doc/gettingstarted.rst4
-rw-r--r--sources/shiboken6/doc/index.rst2
-rw-r--r--sources/shiboken6/doc/typesystem.rst4
-rw-r--r--sources/shiboken6/doc/typesystem_manipulating_objects.rst8
-rw-r--r--sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp2
-rw-r--r--sources/shiboken6/generator/shiboken/cppgenerator.cpp4
-rw-r--r--sources/shiboken6/libshiboken/embed/embedding_generator.py2
-rw-r--r--sources/shiboken6/libshiboken/embed/signature_bootstrap.py2
-rw-r--r--sources/shiboken6/libshiboken/signature/signature.cpp2
-rw-r--r--sources/shiboken6/libshiboken/signature/signature_doc.rst20
-rw-r--r--sources/shiboken6/libshiboken/signature/signature_extend.cpp2
-rw-r--r--sources/shiboken6/libshiboken/signature/signature_helper.cpp4
-rw-r--r--sources/shiboken6/shibokenmodule/files.dir/shibokensupport/__feature__.py10
-rw-r--r--sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/importhandler.py8
-rw-r--r--sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py2
-rw-r--r--sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/loader.py44
-rw-r--r--sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py110
-rw-r--r--sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/parser.py8
24 files changed, 126 insertions, 126 deletions
diff --git a/sources/shiboken6/ApiExtractor/abstractmetatype.cpp b/sources/shiboken6/ApiExtractor/abstractmetatype.cpp
index 5d4375f23..9e515d4b4 100644
--- a/sources/shiboken6/ApiExtractor/abstractmetatype.cpp
+++ b/sources/shiboken6/ApiExtractor/abstractmetatype.cpp
@@ -580,7 +580,7 @@ QString AbstractMetaTypeData::formatPythonSignature() const
for (Indirection i : m_indirections)
result += TypeInfo::indirectionKeyword(i);
// If it is a flags type, we replace it with the full name:
- // "PySide2.QtCore.Qt.ItemFlags" instead of "PySide2.QtCore.QFlags<Qt.ItemFlag>"
+ // "PySide6.QtCore.Qt.ItemFlags" instead of "PySide6.QtCore.QFlags<Qt.ItemFlag>"
if (m_typeEntry->isFlags())
result = m_typeEntry->qualifiedTargetLangName();
result.replace(QLatin1String("::"), QLatin1String("."));
diff --git a/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp b/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
index a90adca17..512bda9e9 100644
--- a/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
+++ b/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
@@ -1185,7 +1185,7 @@ BaseVisitor::StartTokenResult Builder::startToken(const CXCursor &cursor)
d->m_currentFunction->setOverride(true);
break;
case CXCursor_StaticAssert:
- // Check for Q_PROPERTY() (see PySide2/global.h.in for an explanation
+ // Check for Q_PROPERTY() (see PySide6/global.h.in for an explanation
// how it is defined, and qdoc).
if (clang_isDeclaration(cursor.kind) && !d->m_currentClass.isNull()) {
auto snippet = getCodeSnippet(cursor);
diff --git a/sources/shiboken6/ApiExtractor/typesystemparser.cpp b/sources/shiboken6/ApiExtractor/typesystemparser.cpp
index 369d41a44..19f968d87 100644
--- a/sources/shiboken6/ApiExtractor/typesystemparser.cpp
+++ b/sources/shiboken6/ApiExtractor/typesystemparser.cpp
@@ -467,7 +467,7 @@ QString TypeSystemEntityResolver::readFile(const QString &entityName, QString *e
if (!fileName.contains(QLatin1Char('.')))
fileName += QLatin1String(".xml");
QString path = TypeDatabase::instance()->modifiedTypesystemFilepath(fileName, m_currentPath);
- if (!QFileInfo::exists(path)) // PySide2-specific hack
+ if (!QFileInfo::exists(path)) // PySide6-specific hack
fileName.prepend(QLatin1String("typesystem_"));
path = TypeDatabase::instance()->modifiedTypesystemFilepath(fileName, m_currentPath);
if (!QFileInfo::exists(path)) {
diff --git a/sources/shiboken6/data/Shiboken6Config-spec.cmake.in b/sources/shiboken6/data/Shiboken6Config-spec.cmake.in
index 172ea479e..06518d253 100644
--- a/sources/shiboken6/data/Shiboken6Config-spec.cmake.in
+++ b/sources/shiboken6/data/Shiboken6Config-spec.cmake.in
@@ -4,7 +4,7 @@
@PACKAGE_INIT@
# This is the version of Python against which Shiboken was built. Not necessarily the version
-# against which a downstream project is built (e.g. PySide2).
+# against which a downstream project is built (e.g. PySide6).
set(SHIBOKEN_PYTHON_VERSION_MAJOR "@PYTHON_VERSION_MAJOR@")
set(SHIBOKEN_PYTHON_VERSION_MINOR "@PYTHON_VERSION_MINOR@")
set(SHIBOKEN_PYTHON_VERSION_PATCH "@PYTHON_VERSION_PATCH@")
diff --git a/sources/shiboken6/doc/considerations.rst b/sources/shiboken6/doc/considerations.rst
index 3488c3407..6539f06d3 100644
--- a/sources/shiboken6/doc/considerations.rst
+++ b/sources/shiboken6/doc/considerations.rst
@@ -84,7 +84,7 @@ Example with old style class:
.. code-block:: python
- from PySide2 import QtCore
+ from PySide6 import QtCore
class MyOldStyleObject:
pass
@@ -99,7 +99,7 @@ this you will need use the new style class:
.. code-block:: python
- from PySide2 import QtCore
+ from PySide6 import QtCore
class MyOldStyleObject(object):
pass
diff --git a/sources/shiboken6/doc/examples/samplebinding.rst b/sources/shiboken6/doc/examples/samplebinding.rst
index a53b32bac..17a5bd38f 100644
--- a/sources/shiboken6/doc/examples/samplebinding.rst
+++ b/sources/shiboken6/doc/examples/samplebinding.rst
@@ -237,7 +237,7 @@ Try running it to see if the ice creams are delivered.
.. note::
You can find the sources for this example under
- :file:`<PYTHON_ENV_ROOT>/site-packages/lib/PySide2/examples/samplebinding`.
+ :file:`<PYTHON_ENV_ROOT>/site-packages/lib/PySide6/examples/samplebinding`.
Refer to the following topics for detailed information about using Shiboken:
* :doc:`Type System Variables <../typesystem_variables>`
diff --git a/sources/shiboken6/doc/gettingstarted.rst b/sources/shiboken6/doc/gettingstarted.rst
index 758bc9763..def1ecca5 100644
--- a/sources/shiboken6/doc/gettingstarted.rst
+++ b/sources/shiboken6/doc/gettingstarted.rst
@@ -47,7 +47,7 @@ The same can be used for the module, changing the value of ``internal-build-type
Using the wheels
----------------
-Installing ``pyside2`` or ``shiboken6`` from pip **does not** install ``shiboken6_generator``,
+Installing ``pyside6`` or ``shiboken6`` from pip **does not** install ``shiboken6_generator``,
because the wheels are not on PyPi.
You can get the ``shiboken6_generator`` wheels from Qt servers, and you can still install it
@@ -56,7 +56,7 @@ via ``pip``::
pip install \
--index-url=http://download.qt.io/official_releases/QtForPython/ \
--trusted-host download.qt.io \
- shiboken6 pyside2 shiboken6_generator
+ shiboken6 pyside6 shiboken6_generator
The ``whl`` package cannot automatically discover in your system the location for:
diff --git a/sources/shiboken6/doc/index.rst b/sources/shiboken6/doc/index.rst
index ebde8d1ff..dcebdfe19 100644
--- a/sources/shiboken6/doc/index.rst
+++ b/sources/shiboken6/doc/index.rst
@@ -7,7 +7,7 @@ Shiboken
.. ifconfig:: output_format == 'qthelp'
- Shiboken is a fundamental piece on the `Qt for Python <../pyside2/index.html>`__ project that serves two purposes:
+ Shiboken is a fundamental piece on the `Qt for Python <../pyside6/index.html>`__ project that serves two purposes:
* Generator_: Extract information from C or C++ headers and generate CPython_ code that allow
diff --git a/sources/shiboken6/doc/typesystem.rst b/sources/shiboken6/doc/typesystem.rst
index 0d43cec2c..c9e81ec4f 100644
--- a/sources/shiboken6/doc/typesystem.rst
+++ b/sources/shiboken6/doc/typesystem.rst
@@ -12,8 +12,8 @@ It is even possible to use the typesystem specification to inject arbitrary
code into the source files, such as an extra member function.
Below there is a complete reference guide to the various nodes (XML tags) of the typesystem.
-For usage examples, take a look at the typesystem files used to generate PySide2. These files
-can be found in the PySide2/<QT_MODULE_NAME> directory of the PySide2 package.
+For usage examples, take a look at the typesystem files used to generate PySide6. These files
+can be found in the PySide6/<QT_MODULE_NAME> directory of the PySide6 package.
Define types
------------
diff --git a/sources/shiboken6/doc/typesystem_manipulating_objects.rst b/sources/shiboken6/doc/typesystem_manipulating_objects.rst
index 9f9bc2b33..453fa6752 100644
--- a/sources/shiboken6/doc/typesystem_manipulating_objects.rst
+++ b/sources/shiboken6/doc/typesystem_manipulating_objects.rst
@@ -279,10 +279,10 @@ property
It may appear as a child of a complex type such as ``object-type`` or
``value-type``.
- If the PySide2 extension is not present, code will be generated using the
+ If the PySide6 extension is not present, code will be generated using the
``PyGetSetDef`` struct, similar to what is generated for fields.
- If the PySide2 extension is present, those properties complement the
+ If the PySide6 extension is present, those properties complement the
properties obtained from the ``Q_PROPERTY`` macro in Qt-based code.
The properties will be handled in ``libpyside`` unless code generation
is forced.
@@ -298,7 +298,7 @@ property
The optional ``set`` attribute specifies name of the setter function.
The optional ``generate-getsetdef`` attribute specifies whether to generate
- code for if the PySide2 extension is present (indicating this property is not
+ code for if the PySide6 extension is present (indicating this property is not
handled by libpyside). It defaults to *no*.
The optional ``since`` attribute specifies the API version when this
@@ -328,7 +328,7 @@ property
test = Test()
test.value = 42
- For Qt classes (with the PySide2 extension present), additional setters
+ For Qt classes (with the PySide6 extension present), additional setters
and getters that do not appear as ``Q_PROPERTY``, can be specified to
be properties:
diff --git a/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp b/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp
index 53b403022..6d734e5e2 100644
--- a/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp
+++ b/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp
@@ -1074,7 +1074,7 @@ void QtXmlToSphinx::handleLinkEnd(LinkContext *linkContext)
}
// Copy images that are placed in a subdirectory "images" under the webxml files
-// by qdoc to a matching subdirectory under the "rst/PySide2/<module>" directory
+// by qdoc to a matching subdirectory under the "rst/PySide6/<module>" directory
static bool copyImage(const QString &href, const QString &docDataDir,
const QString &context, const QString &outputDir,
QString *errorMessage)
diff --git a/sources/shiboken6/generator/shiboken/cppgenerator.cpp b/sources/shiboken6/generator/shiboken/cppgenerator.cpp
index 1d7649b18..82292b953 100644
--- a/sources/shiboken6/generator/shiboken/cppgenerator.cpp
+++ b/sources/shiboken6/generator/shiboken/cppgenerator.cpp
@@ -4161,7 +4161,7 @@ void CppGenerator::writeClassDefinition(QTextStream &s,
// privacy the same way. This worked before the heap types were used,
// because inheritance is not really checked for static types.
// Instead, we check this at runtime, see SbkObjectTypeTpNew.
- if (metaClass->fullName().startsWith(QLatin1String("PySide2.Qt"))) {
+ if (metaClass->fullName().startsWith(QLatin1String("PySide6.Qt"))) {
// PYSIDE-595: No idea how to do non-inheritance correctly.
// Since that is only relevant in shiboken, I used a shortcut for
// PySide.
@@ -4900,7 +4900,7 @@ void CppGenerator::writeSignatureInfo(QTextStream &s, const AbstractMetaFunction
for (const AbstractMetaFunction *f : overloads) {
QStringList args;
// PYSIDE-1328: `self`-ness cannot be computed in Python because there are mixed cases.
- // Toplevel functions like `PySide2.QtCore.QEnum` are always self-less.
+ // Toplevel functions like `PySide6.QtCore.QEnum` are always self-less.
if (!(f->isStatic()) && f->ownerClass())
args << QLatin1String("self");
const AbstractMetaArgumentList &arguments = f->arguments();
diff --git a/sources/shiboken6/libshiboken/embed/embedding_generator.py b/sources/shiboken6/libshiboken/embed/embedding_generator.py
index 1dd17e755..39aab10e4 100644
--- a/sources/shiboken6/libshiboken/embed/embedding_generator.py
+++ b/sources/shiboken6/libshiboken/embed/embedding_generator.py
@@ -3,7 +3,7 @@
## Copyright (C) 2019 The Qt Company Ltd.
## Contact: https://www.qt.io/licensing/
##
-## This file is part of PySide2.
+## This file is part of PySide6.
##
## $QT_BEGIN_LICENSE:LGPL$
## Commercial License Usage
diff --git a/sources/shiboken6/libshiboken/embed/signature_bootstrap.py b/sources/shiboken6/libshiboken/embed/signature_bootstrap.py
index 08928e915..d56e16a4d 100644
--- a/sources/shiboken6/libshiboken/embed/signature_bootstrap.py
+++ b/sources/shiboken6/libshiboken/embed/signature_bootstrap.py
@@ -3,7 +3,7 @@
## Copyright (C) 2019 The Qt Company Ltd.
## Contact: https://www.qt.io/licensing/
##
-## This file is part of PySide2.
+## This file is part of PySide6.
##
## $QT_BEGIN_LICENSE:LGPL$
## Commercial License Usage
diff --git a/sources/shiboken6/libshiboken/signature/signature.cpp b/sources/shiboken6/libshiboken/signature/signature.cpp
index 05d3cad2d..5ebb83fbb 100644
--- a/sources/shiboken6/libshiboken/signature/signature.cpp
+++ b/sources/shiboken6/libshiboken/signature/signature.cpp
@@ -384,7 +384,7 @@ static int PySide_FinishSignatures(PyObject *module, const char *signatures[])
// was not yet run. But that is ok, because the first import is always for
// the shiboken module (or a test module).
if (pyside_globals->finish_import_func == nullptr) {
- assert(strncmp(name, "PySide2.", 8) != 0);
+ assert(strncmp(name, "PySide6.", 8) != 0);
return 0;
}
AutoDecRef ret(PyObject_CallFunction(
diff --git a/sources/shiboken6/libshiboken/signature/signature_doc.rst b/sources/shiboken6/libshiboken/signature/signature_doc.rst
index 95f0b8b08..872ed024a 100644
--- a/sources/shiboken6/libshiboken/signature/signature_doc.rst
+++ b/sources/shiboken6/libshiboken/signature/signature_doc.rst
@@ -81,7 +81,7 @@ The normal case are only a few accesses, and these are working pretty fast.
The key to make this signature module fast is to avoid computation as much as
possible. When no signature objects are used, then almost no time is lost in
initialization. Only the above mentioned strings and some support modules are
-additionally loaded on ``import PySide2``.
+additionally loaded on ``import PySide6``.
When it comes to signature usage, then late initialization is used and cached.
This technique is also known as *full laziness* in haskell.
@@ -98,7 +98,7 @@ There are actually two locations where late initialization occurs:
The initialization that is always done is just two dictionary writes
per class, and we have about 1000 classes.
To measure the additional overhead, we have simulated what happens
-when ``from PySide2 import *`` is performed.
+when ``from PySide6 import *`` is performed.
It turned out that the overhead is below 0.5 ms.
@@ -172,7 +172,7 @@ classes and functions. In order to centralize this enumeration, the process has
been factored out as a context manager. The user has only to supply functions
that do the actual formatting.
-See for example the .pyi generator ``pyside2/PySide2/support/generate_pyi.py``.
+See for example the .pyi generator ``pyside6/PySide6/support/generate_pyi.py``.
layout.py
@@ -221,7 +221,7 @@ future:
existence_test.py
-----------------
-The file ``pyside2/tests/registry/existence_test.py`` was written using the
+The file ``pyside6/tests/registry/existence_test.py`` was written using the
signatures from the signatures module. The idea is that there are some 15000
functions with a certain signature.
@@ -280,7 +280,7 @@ init_platform.py
~~~~~~~~~~~~~~~~
For generating the ``exists_{platf}_{version}`` modules, the module
-``pyside2/tests/registry/init_platform.py`` was written. It can be used
+``pyside6/tests/registry/init_platform.py`` was written. It can be used
standalone from the commandline, to check the compatibility of some
changes, directly.
@@ -289,7 +289,7 @@ scrape_testresults.py
---------------------
To simplify and automate the process of extracting the ``exists_{platf}_{version}_ci.py``
-files, the script ``pyside2/tests/registry/scrape_testresults.py`` has been written.
+files, the script ``pyside6/tests/registry/scrape_testresults.py`` has been written.
This script scans the whole testresults website for PySide, that is::
@@ -297,24 +297,24 @@ This script scans the whole testresults website for PySide, that is::
On the first scan, the script runs less than 30 minutes. After that, a cache
is generated and the scan works *much* faster. The test results are placed
-into the folder ``pyside2/tests/registry/testresults/embedded/`` with a
+into the folder ``pyside6/tests/registry/testresults/embedded/`` with a
unique name that allows for easy sorting. Example::
testresults/embedded/2018_09_10_10_40_34-test_1536891759-exists_linux_5_11_2_ci.py
These files are created only once. If they already exist, they are not touched, again.
-The file `pyside2/tests/registry/known_urls.json`` holds all scanned URLs after
+The file `pyside6/tests/registry/known_urls.json`` holds all scanned URLs after
a successful scan. The ``testresults/embedded`` folder can be kept for reference
or can be removed. Important is only the json file.
-The result of a scan is then directly placed into the ``pyside2/tests/registry/``
+The result of a scan is then directly placed into the ``pyside6/tests/registry/``
folder. It should be reviewed and then eventually checked in.
generate_pyi.py
---------------
-``pyside2/PySide2/support/generate_pyi.py`` is still under development.
+``pyside6/PySide6/support/generate_pyi.py`` is still under development.
This module generates so-called hinting stubs for integration of PySide
with diverse *Python IDEs*.
diff --git a/sources/shiboken6/libshiboken/signature/signature_extend.cpp b/sources/shiboken6/libshiboken/signature/signature_extend.cpp
index 1490a6003..6f9dbe265 100644
--- a/sources/shiboken6/libshiboken/signature/signature_extend.cpp
+++ b/sources/shiboken6/libshiboken/signature/signature_extend.cpp
@@ -162,7 +162,7 @@ static PyObject *handle_doc(PyObject *ob, PyObject *old_descr)
else
name = reinterpret_cast<PyTypeObject *>(ob_type_mod.object())->tp_name;
if (handle_doc_in_progress || name == nullptr
- || strncmp(name, "PySide2.", 8) != 0)
+ || strncmp(name, "PySide6.", 8) != 0)
return PyObject_CallMethodObjArgs(old_descr,
PyMagicName::get(),
ob, nullptr);
diff --git a/sources/shiboken6/libshiboken/signature/signature_helper.cpp b/sources/shiboken6/libshiboken/signature/signature_helper.cpp
index 2b360c786..f38740254 100644
--- a/sources/shiboken6/libshiboken/signature/signature_helper.cpp
+++ b/sources/shiboken6/libshiboken/signature/signature_helper.cpp
@@ -357,10 +357,10 @@ static int _build_func_to_type(PyObject *obtype)
* It is possible that a method is overwritten by another
* attribute with the same name. This case was obviously provoked
* explicitly in "testbinding.TestObject.staticMethodDouble",
- * where instead of the method a "PySide2.QtCore.Signal" object
+ * where instead of the method a "PySide6.QtCore.Signal" object
* was in the dict.
* This overlap is also found in regular PySide under
- * "PySide2.QtCore.QProcess.error" where again a signal object is
+ * "PySide6.QtCore.QProcess.error" where again a signal object is
* returned. These hidden methods will be opened for the
* signature module by adding them under the name
* "{name}.overload".
diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/__feature__.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/__feature__.py
index ece3d2edb..6cedcc1ec 100644
--- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/__feature__.py
+++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/__feature__.py
@@ -129,11 +129,11 @@ def _import(name, *args, **kwargs):
pyside_feature_dict["rlcompleter"] = flag
# Initialize feature (multiple times allowed) and clear cache.
- sys.modules["PySide2.QtCore"].__init_feature__()
+ sys.modules["PySide6.QtCore"].__init_feature__()
return sys.modules["__feature__"]
- if name.split(".")[0] == "PySide2":
- # This is a module that imports PySide2.
+ if name.split(".")[0] == "PySide6":
+ # This is a module that imports PySide6.
flag = existing if isinstance(existing, int) else 0
else:
# This is some other module. Ignore it in switching.
@@ -147,7 +147,7 @@ def __init__():
global _is_initialized
if not _is_initialized:
# use _one_ recursive import...
- import PySide2.QtCore
+ import PySide6.QtCore
# Initialize all prior imported modules
for name in sys.modules:
pyside_feature_dict.setdefault(name, -1)
@@ -165,7 +165,7 @@ def set_selection(select_id, mod_name=None):
if isinstance(select_id, int):
flag = select_id & 255
pyside_feature_dict[mod_name] = flag
- sys.modules["PySide2.QtCore"].__init_feature__()
+ sys.modules["PySide6.QtCore"].__init_feature__()
return _current_selection(flag)
diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/importhandler.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/importhandler.py
index 3dbc2e011..7b1d4927e 100644
--- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/importhandler.py
+++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/importhandler.py
@@ -51,11 +51,11 @@ because the implementation of deprecated functions should be visible
to the users (in the hope they don't use it any longer <wink>).
As a first approach, the function finish_import redirects to
-PySide2/support/deprecated.py . There can come other extensions as well.
+PySide6/support/deprecated.py . There can come other extensions as well.
"""
try:
- from PySide2.support import deprecated
+ from PySide6.support import deprecated
have_deprecated = True
except ImportError:
have_deprecated = False
@@ -63,7 +63,7 @@ except ImportError:
# called by loader.py from signature.cpp
def finish_import(module):
- if have_deprecated and module.__name__.startswith("PySide2."):
+ if have_deprecated and module.__name__.startswith("PySide6."):
try:
name = "fix_for_" + module.__name__.split(".")[1]
func = getattr(deprecated, name, None)
@@ -89,7 +89,7 @@ was much less appealing.
Reason:
If someone executes as the first PySide statement
- from PySide2 import QtGui
+ from PySide6 import QtGui
then this import is already running. We can see the other imports like the
diverse initializations and QtCore, because it is triggered by import of
diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py
index dcbdd657c..06144836b 100644
--- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py
+++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py
@@ -67,7 +67,7 @@ class ExactEnumerator(object):
global EnumType
try:
# Lazy import
- from PySide2.QtCore import Qt
+ from PySide6.QtCore import Qt
EnumType = type(Qt.Key)
except ImportError:
EnumType = None
diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/loader.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/loader.py
index 49c6439b7..766ff2437 100644
--- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/loader.py
+++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/loader.py
@@ -50,7 +50,7 @@ to make sure that the functions are available when needed.
This is meanwhile necessary to make the '__doc__' attribute work correctly.
It does not mean that everything is initialized in advance. Only the modules
-are loaded completely after 'import PySide2'.
+are loaded completely after 'import PySide6'.
This version uses both a normal directory, but has also an embedded ZIP file
as a fallback solution. The ZIP file is generated by 'embedding_generator.py'
@@ -173,23 +173,23 @@ put_into_package(shibokensupport.signature, inspect, "inspect")
def move_into_pyside_package():
- import PySide2
+ import PySide6
try:
- import PySide2.support
+ import PySide6.support
except ModuleNotFoundError:
- PySide2.support = types.ModuleType("PySide2.support")
- put_into_package(PySide2.support, __feature__)
- put_into_package(PySide2.support, signature)
- put_into_package(PySide2.support.signature, mapping)
- put_into_package(PySide2.support.signature, errorhandler)
- put_into_package(PySide2.support.signature, layout)
- put_into_package(PySide2.support.signature, lib)
- put_into_package(PySide2.support.signature, parser)
- put_into_package(PySide2.support.signature, importhandler)
- put_into_package(PySide2.support.signature.lib, enum_sig)
-
- put_into_package(None if orig_typing else PySide2.support.signature, typing)
- put_into_package(PySide2.support.signature, inspect)
+ PySide6.support = types.ModuleType("PySide6.support")
+ put_into_package(PySide6.support, __feature__)
+ put_into_package(PySide6.support, signature)
+ put_into_package(PySide6.support.signature, mapping)
+ put_into_package(PySide6.support.signature, errorhandler)
+ put_into_package(PySide6.support.signature, layout)
+ put_into_package(PySide6.support.signature, lib)
+ put_into_package(PySide6.support.signature, parser)
+ put_into_package(PySide6.support.signature, importhandler)
+ put_into_package(PySide6.support.signature.lib, enum_sig)
+
+ put_into_package(None if orig_typing else PySide6.support.signature, typing)
+ put_into_package(PySide6.support.signature, inspect)
from shibokensupport.signature import mapping
from shibokensupport.signature import errorhandler
@@ -199,16 +199,16 @@ from shibokensupport.signature import parser
from shibokensupport.signature import importhandler
from shibokensupport.signature.lib import enum_sig
-if "PySide2" in sys.modules:
- # We publish everything under "PySide2.support.signature", again.
+if "PySide6" in sys.modules:
+ # We publish everything under "PySide6.support.signature", again.
move_into_pyside_package()
# PYSIDE-1019: Modify `__import__` to be `__feature__` aware.
# __feature__ is already in sys.modules, so this is actually no import
try:
- import PySide2.support.__feature__
- sys.modules["__feature__"] = PySide2.support.__feature__
- PySide2.support.__feature__.original_import = __builtins__["__import__"]
- __builtins__["__import__"] = PySide2.support.__feature__._import
+ import PySide6.support.__feature__
+ sys.modules["__feature__"] = PySide6.support.__feature__
+ PySide6.support.__feature__.original_import = __builtins__["__import__"]
+ __builtins__["__import__"] = PySide6.support.__feature__._import
# Maybe we should optimize that and change `__import__` from C, instead?
except ModuleNotFoundError:
print("__feature__ could not be imported. "
diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
index 43be5b95f..46da17a47 100644
--- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
+++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
@@ -198,10 +198,10 @@ class Reloader(object):
candidates = list(mod_name for mod_name in sys.modules.copy()
if self.module_valid(sys.modules[mod_name]))
for mod_name in candidates:
- # 'top' is PySide2 when we do 'import PySide.QtCore'
+ # 'top' is PySide6 when we do 'import PySide.QtCore'
# or Shiboken if we do 'import Shiboken'.
# Convince yourself that these two lines below have the same
- # global effect as "import Shiboken" or "import PySide2.QtCore".
+ # global effect as "import Shiboken" or "import PySide6.QtCore".
top = __import__(mod_name)
g[top.__name__] = top
proc_name = "init_" + mod_name.replace(".", "_")
@@ -331,7 +331,7 @@ type_map.update({
type_map.update({
# Handling variables that are returned, eventually as Tuples:
- "PySide2.QtQml.atomic[bool]": ResultVariable(bool), # QmlIncubationController::incubateWhile()
+ "PySide6.QtQml.atomic[bool]": ResultVariable(bool), # QmlIncubationController::incubateWhile()
"bool*" : ResultVariable(bool),
"float*" : ResultVariable(float),
"int*" : ResultVariable(int),
@@ -432,13 +432,13 @@ def init_smart():
# The PySide Part
-def init_PySide2_QtCore():
- from PySide2.QtCore import Qt, QUrl, QDir
- from PySide2.QtCore import QRect, QSize, QPoint, QLocale, QByteArray
- from PySide2.QtCore import QMarginsF # 5.9
+def init_PySide6_QtCore():
+ from PySide6.QtCore import Qt, QUrl, QDir
+ from PySide6.QtCore import QRect, QSize, QPoint, QLocale, QByteArray
+ from PySide6.QtCore import QMarginsF # 5.9
try:
# seems to be not generated by 5.9 ATM.
- from PySide2.QtCore import Connection
+ from PySide6.QtCore import Connection
except ImportError:
pass
type_map.update({
@@ -447,19 +447,19 @@ def init_PySide2_QtCore():
"'g'": "g",
"4294967295UL": 4294967295, # 5.6, RHEL 6.6
"CheckIndexOption.NoOption": Instance(
- "PySide2.QtCore.QAbstractItemModel.CheckIndexOptions.NoOption"), # 5.11
+ "PySide6.QtCore.QAbstractItemModel.CheckIndexOptions.NoOption"), # 5.11
"DescriptorType(-1)": int, # Native handle of QSocketDescriptor
"false": False,
- "list of QAbstractAnimation": typing.List[PySide2.QtCore.QAbstractAnimation],
+ "list of QAbstractAnimation": typing.List[PySide6.QtCore.QAbstractAnimation],
"long long": int,
"size_t": int,
"NULL": None, # 5.6, MSVC
"nullptr": None, # 5.9
"PyByteArray": bytearray,
"PyBytes": bytes,
- "QDeadlineTimer(QDeadlineTimer.Forever)": Instance("PySide2.QtCore.QDeadlineTimer"),
- "PySide2.QtCore.QUrl.ComponentFormattingOptions":
- PySide2.QtCore.QUrl.ComponentFormattingOption, # mismatch option/enum, why???
+ "QDeadlineTimer(QDeadlineTimer.Forever)": Instance("PySide6.QtCore.QDeadlineTimer"),
+ "PySide6.QtCore.QUrl.ComponentFormattingOptions":
+ PySide6.QtCore.QUrl.ComponentFormattingOption, # mismatch option/enum, why???
"PyUnicode": typing.Text,
"Q_NULLPTR": None,
"QDir.Filters(AllEntries | NoDotAndDotDot)": Instance(
@@ -472,8 +472,8 @@ def init_PySide2_QtCore():
"QGenericArgument(NULL)": ellipsis, # 5.6, MSVC
"QGenericArgument(nullptr)": ellipsis, # 5.10
"QGenericArgument(Q_NULLPTR)": ellipsis,
- "QJsonObject": typing.Dict[str, PySide2.QtCore.QJsonValue],
- "QModelIndex()": Invalid("PySide2.QtCore.QModelIndex"), # repr is btw. very wrong, fix it?!
+ "QJsonObject": typing.Dict[str, PySide6.QtCore.QJsonValue],
+ "QModelIndex()": Invalid("PySide6.QtCore.QModelIndex"), # repr is btw. very wrong, fix it?!
"QModelIndexList": ModelIndexList,
"QModelIndexList": ModelIndexList,
"QString()": "",
@@ -490,7 +490,7 @@ def init_PySide2_QtCore():
})
try:
type_map.update({
- "PySide2.QtCore.QMetaObject.Connection": PySide2.QtCore.Connection, # wrong!
+ "PySide6.QtCore.QMetaObject.Connection": PySide6.QtCore.Connection, # wrong!
})
except AttributeError:
# this does not exist on 5.9 ATM.
@@ -498,25 +498,25 @@ def init_PySide2_QtCore():
return locals()
-def init_PySide2_QtConcurrent():
+def init_PySide6_QtConcurrent():
type_map.update({
- "PySide2.QtCore.QFuture[QString]":
- PySide2.QtConcurrent.QFutureQString,
- "PySide2.QtCore.QFuture[void]":
- PySide2.QtConcurrent.QFutureVoid,
+ "PySide6.QtCore.QFuture[QString]":
+ PySide6.QtConcurrent.QFutureQString,
+ "PySide6.QtCore.QFuture[void]":
+ PySide6.QtConcurrent.QFutureVoid,
})
return locals()
-def init_PySide2_QtGui():
- from PySide2.QtGui import QPageLayout, QPageSize # 5.12 macOS
+def init_PySide6_QtGui():
+ from PySide6.QtGui import QPageLayout, QPageSize # 5.12 macOS
type_map.update({
"0.0f": 0.0,
"1.0f": 1.0,
"GL_COLOR_BUFFER_BIT": GL_COLOR_BUFFER_BIT,
"GL_NEAREST": GL_NEAREST,
"int32_t": int,
- "QPixmap()": Default("PySide2.QtGui.QPixmap"), # can't create without qApp
+ "QPixmap()": Default("PySide6.QtGui.QPixmap"), # can't create without qApp
"QPlatformSurface*": int, # a handle
"QVector< QTextLayout.FormatRange >()": [], # do we need more structure?
"uint32_t": int,
@@ -526,9 +526,9 @@ def init_PySide2_QtGui():
return locals()
-def init_PySide2_QtWidgets():
- from PySide2.QtWidgets import QWidget, QMessageBox, QStyleOption, QStyleHintReturn, QStyleOptionComplex
- from PySide2.QtWidgets import QGraphicsItem, QStyleOptionGraphicsItem # 5.9
+def init_PySide6_QtWidgets():
+ from PySide6.QtWidgets import QWidget, QMessageBox, QStyleOption, QStyleHintReturn, QStyleOptionComplex
+ from PySide6.QtWidgets import QGraphicsItem, QStyleOptionGraphicsItem # 5.9
type_map.update({
"QMessageBox.StandardButtons(Yes | No)": Instance(
"QMessageBox.StandardButtons(QMessageBox.Yes | QMessageBox.No)"),
@@ -539,13 +539,13 @@ def init_PySide2_QtWidgets():
"SO_Default": QStyleOption.SO_Default,
"static_cast<Qt.MatchFlags>(Qt.MatchExactly|Qt.MatchCaseSensitive)": Instance(
"Qt.MatchFlags(Qt.MatchExactly | Qt.MatchCaseSensitive)"),
- "Type": PySide2.QtWidgets.QListWidgetItem.Type,
+ "Type": PySide6.QtWidgets.QListWidgetItem.Type,
})
return locals()
-def init_PySide2_QtSql():
- from PySide2.QtSql import QSqlDatabase
+def init_PySide6_QtSql():
+ from PySide6.QtSql import QSqlDatabase
type_map.update({
"QLatin1String(defaultConnection)": QSqlDatabase.defaultConnection,
"QVariant.Invalid": Invalid("Variant"), # not sure what I should create, here...
@@ -553,12 +553,12 @@ def init_PySide2_QtSql():
return locals()
-def init_PySide2_QtNetwork():
- from PySide2.QtNetwork import QNetworkRequest
+def init_PySide6_QtNetwork():
+ from PySide6.QtNetwork import QNetworkRequest
best_structure = typing.OrderedDict if getattr(typing, "OrderedDict", None) else typing.Dict
type_map.update({
- "QMultiMap[PySide2.QtNetwork.QSsl.AlternativeNameEntryType, QString]":
- best_structure[PySide2.QtNetwork.QSsl.AlternativeNameEntryType, typing.List[str]],
+ "QMultiMap[PySide6.QtNetwork.QSsl.AlternativeNameEntryType, QString]":
+ best_structure[PySide6.QtNetwork.QSsl.AlternativeNameEntryType, typing.List[str]],
"DefaultTransferTimeoutConstant":
QNetworkRequest.TransferTimeoutConstant,
"QNetworkRequest.DefaultTransferTimeoutConstant":
@@ -568,28 +568,28 @@ def init_PySide2_QtNetwork():
return locals()
-def init_PySide2_QtXmlPatterns():
- from PySide2.QtXmlPatterns import QXmlName
+def init_PySide6_QtXmlPatterns():
+ from PySide6.QtXmlPatterns import QXmlName
type_map.update({
- "QXmlName.NamespaceCode": Missing("PySide2.QtXmlPatterns.QXmlName.NamespaceCode"),
- "QXmlName.PrefixCode": Missing("PySide2.QtXmlPatterns.QXmlName.PrefixCode"),
+ "QXmlName.NamespaceCode": Missing("PySide6.QtXmlPatterns.QXmlName.NamespaceCode"),
+ "QXmlName.PrefixCode": Missing("PySide6.QtXmlPatterns.QXmlName.PrefixCode"),
})
return locals()
-def init_PySide2_QtMultimedia():
- import PySide2.QtMultimediaWidgets
+def init_PySide6_QtMultimedia():
+ import PySide6.QtMultimediaWidgets
# Check if foreign import is valid. See mapping.py in shiboken6.
- check_module(PySide2.QtMultimediaWidgets)
+ check_module(PySide6.QtMultimediaWidgets)
type_map.update({
- "QGraphicsVideoItem": PySide2.QtMultimediaWidgets.QGraphicsVideoItem,
+ "QGraphicsVideoItem": PySide6.QtMultimediaWidgets.QGraphicsVideoItem,
"qint64": int,
- "QVideoWidget": PySide2.QtMultimediaWidgets.QVideoWidget,
+ "QVideoWidget": PySide6.QtMultimediaWidgets.QVideoWidget,
})
return locals()
-def init_PySide2_QtOpenGL():
+def init_PySide6_QtOpenGL():
type_map.update({
"GLbitfield": int,
"GLenum": int,
@@ -600,7 +600,7 @@ def init_PySide2_QtOpenGL():
return locals()
-def init_PySide2_QtQml():
+def init_PySide6_QtQml():
type_map.update({
"QJSValueList()": [],
"QVariantHash()": typing.Dict[str, Variant], # from 5.9
@@ -608,39 +608,39 @@ def init_PySide2_QtQml():
return locals()
-def init_PySide2_QtQuick():
+def init_PySide6_QtQuick():
type_map.update({
- "PySide2.QtQuick.QSharedPointer[PySide2.QtQuick.QQuickItemGrabResult]":
- PySide2.QtQuick.QQuickItemGrabResult,
+ "PySide6.QtQuick.QSharedPointer[PySide6.QtQuick.QQuickItemGrabResult]":
+ PySide6.QtQuick.QQuickItemGrabResult,
"UnsignedShortType": int,
})
return locals()
-def init_PySide2_QtScript():
+def init_PySide6_QtScript():
type_map.update({
"QScriptValueList()": [],
})
return locals()
-def init_PySide2_QtTest():
+def init_PySide6_QtTest():
type_map.update({
- "PySide2.QtTest.QTest.PySideQTouchEventSequence": PySide2.QtTest.QTest.QTouchEventSequence,
- "PySide2.QtTest.QTouchEventSequence": PySide2.QtTest.QTest.QTouchEventSequence,
+ "PySide6.QtTest.QTest.PySideQTouchEventSequence": PySide6.QtTest.QTest.QTouchEventSequence,
+ "PySide6.QtTest.QTouchEventSequence": PySide6.QtTest.QTest.QTouchEventSequence,
})
return locals()
# from 5.6, MSVC
-def init_PySide2_QtWinExtras():
+def init_PySide6_QtWinExtras():
type_map.update({
"QList< QWinJumpListItem* >()": [],
})
return locals()
# from 5.12, macOS
-def init_PySide2_QtDataVisualization():
- from PySide2.QtDataVisualization import QtDataVisualization
+def init_PySide6_QtDataVisualization():
+ from PySide6.QtDataVisualization import QtDataVisualization
QtDataVisualization.QBarDataRow = typing.List[QtDataVisualization.QBarDataItem]
QtDataVisualization.QBarDataArray = typing.List[QtDataVisualization.QBarDataRow]
QtDataVisualization.QSurfaceDataRow = typing.List[QtDataVisualization.QSurfaceDataItem]
diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/parser.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/parser.py
index 6bf78cf95..c5261fc0b 100644
--- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/parser.py
+++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/parser.py
@@ -180,7 +180,7 @@ def get_name(thing):
def _resolve_value(thing, valtype, line):
if thing in ("0", "None") and valtype:
- if valtype.startswith("PySide2.") or valtype.startswith("typing."):
+ if valtype.startswith("PySide6.") or valtype.startswith("typing."):
return None
map = type_map[valtype]
# typing.Any: '_SpecialForm' object has no attribute '__name__'
@@ -230,12 +230,12 @@ def to_string(thing):
return str(thing)
-matrix_pattern = "PySide2.QtGui.QGenericMatrix"
+matrix_pattern = "PySide6.QtGui.QGenericMatrix"
def handle_matrix(arg):
n, m, typstr = tuple(map(lambda x:x.strip(), arg.split(",")))
assert typstr == "float"
- result = f"PySide2.QtGui.QMatrix{n}x{m}"
+ result = f"PySide6.QtGui.QMatrix{n}x{m}"
return eval(result, namespace)
@@ -251,7 +251,7 @@ def lno(level):
def _resolve_type(thing, line, level, var_handler):
# Capture total replacements, first. Happens in
- # "PySide2.QtCore.QCborStreamReader.StringResult[PySide2.QtCore.QByteArray]"
+ # "PySide6.QtCore.QCborStreamReader.StringResult[PySide6.QtCore.QByteArray]"
if thing in type_map:
return type_map[thing]
# Now the nested structures are handled.