Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pyotherside for openSUSE:Factory checked in at 2024-01-07 21:41:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pyotherside (Old) and /work/SRC/openSUSE:Factory/.python-pyotherside.new.28375 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pyotherside" Sun Jan 7 21:41:04 2024 rev:6 rq:1137428 version:1.6.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pyotherside/python-pyotherside.changes 2020-03-10 10:39:17.093559718 +0100 +++ /work/SRC/openSUSE:Factory/.python-pyotherside.new.28375/python-pyotherside.changes 2024-01-07 21:41:21.102309451 +0100 @@ -1,0 +2,9 @@ +Sun Jan 7 19:46:27 UTC 2024 - Dirk Müller <[email protected]> + +- update to 1.6.0: + * PyOtherSide now supports Qt 6 while retaining source + compatibility with Qt 5. + * PyGLArea is currently broken with Qt 6, use PyFBO + instead. + +------------------------------------------------------------------- Old: ---- 1.5.9.tar.gz New: ---- 1.6.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pyotherside.spec ++++++ --- /var/tmp/diff_new_pack.LEdslw/_old 2024-01-07 21:41:21.546325602 +0100 +++ /var/tmp/diff_new_pack.LEdslw/_new 2024-01-07 21:41:21.550325748 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-pyotherside # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %define srcname pyotherside %bcond_without test Name: python-pyotherside -Version: 1.5.9 +Version: 1.6.0 Release: 0 Summary: Asynchronous Python 3 Bindings for Qt 5 License: ISC @@ -64,7 +64,7 @@ %endif %files -%doc README +%doc README.md %license LICENSE %dir %{_libqt5_archdatadir}/qml/io/ %dir %{_libqt5_archdatadir}/qml/io/thp/ ++++++ 1.5.9.tar.gz -> 1.6.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/.github/FUNDING.yml new/pyotherside-1.6.0/.github/FUNDING.yml --- old/pyotherside-1.5.9/.github/FUNDING.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/pyotherside-1.6.0/.github/FUNDING.yml 2022-08-05 13:48:31.000000000 +0200 @@ -0,0 +1,5 @@ +# These are supported funding model platforms + +github: thp +ko_fi: thpx86 +custom: https://www.amazon.de/gp/registry/wishlist/2PD2MYGHE6857 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/.github/workflows/build.yaml new/pyotherside-1.6.0/.github/workflows/build.yaml --- old/pyotherside-1.5.9/.github/workflows/build.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/pyotherside-1.6.0/.github/workflows/build.yaml 2022-08-05 13:48:31.000000000 +0200 @@ -0,0 +1,35 @@ +name: Build and test + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Install dependencies (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt install -y \ + python3-dev \ + qt5-qmake qtbase5-dev qtdeclarative5-dev libqt5svg5-dev + - name: Install dependencies (macOS) + if: matrix.os == 'macos-latest' + run: | + brew install qt@5 [email protected] + echo PATH=/usr/local/opt/qt@5/bin:$PATH >> ${GITHUB_ENV} + - run: qmake + - run: make + - run: env QT_QPA_PLATFORM=offscreen tests/tests diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/.github/workflows/docs.yaml new/pyotherside-1.6.0/.github/workflows/docs.yaml --- old/pyotherside-1.5.9/.github/workflows/docs.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/pyotherside-1.6.0/.github/workflows/docs.yaml 2022-08-05 13:48:31.000000000 +0200 @@ -0,0 +1,17 @@ +name: Documentation + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: sudo apt install -y python3-sphinx + - run: make -C docs html diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/.gitignore new/pyotherside-1.6.0/.gitignore --- old/pyotherside-1.5.9/.gitignore 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/.gitignore 2022-08-05 13:48:31.000000000 +0200 @@ -14,3 +14,5 @@ /qtquicktests/Makefile /qtquicktests/qtquicktests /qtquicktests/target_wrapper.sh +/examples/__pycache__ +/docs/_build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/LICENSE new/pyotherside-1.6.0/LICENSE --- old/pyotherside-1.5.9/LICENSE 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/LICENSE 2022-08-05 13:48:31.000000000 +0200 @@ -1,8 +1,8 @@ -PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 +PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 ISC License -Copyright (c) 2011, 2013-2020, Thomas Perl <[email protected]> +Copyright (c) 2011, 2013-2022, Thomas Perl <[email protected]> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/README new/pyotherside-1.6.0/README --- old/pyotherside-1.5.9/README 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/README 1970-01-01 01:00:00.000000000 +0100 @@ -1,52 +0,0 @@ -PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 -==================================================== - -A Qt 5 QML Plugin that provides access to a Python 3 interpreter from QML. - - -Requirements: - - Qt >= 5.1.0 - Python >= 3.3.0 - - -To build and install the QML plugin: - - qmake - make - make install - - -To build against a specific Python version, use: - - qmake PYTHON_CONFIG=python3.3-config - make - make install - - -To manually update the qmltypes file on x64 Linux (TODO: make this automated): - - qmake - make - make INSTALL_ROOT=$(pwd)/tmp/ - QML2_IMPORT_PATH=$(pwd)/tmp/usr/lib/x86_64-linux-gnu/qt5/qml \ - make -C src qmltypes - - -To run the included unit tests after building, use: - - ./tests/tests - - -If you want to link PyOtherSide statically against Python 3, you can include -the Python Standard Library in PyOtherSide as Qt Resource and have it extracted -automatically on load, for this, zip up the Standard Library and place the .zip -file as "pythonlib.zip" into src/ before running qmake. - - -More information: - - Project page: https://thp.io/2011/pyotherside/ - Git repo: http://github.com/thp/pyotherside/ - Bug tracker: https://github.com/thp/pyotherside/issues - Documentation: http://pyotherside.readthedocs.org/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/README.md new/pyotherside-1.6.0/README.md --- old/pyotherside-1.5.9/README.md 1970-01-01 01:00:00.000000000 +0100 +++ new/pyotherside-1.6.0/README.md 2022-08-05 13:48:31.000000000 +0200 @@ -0,0 +1,70 @@ +PyOtherSide: Python 3 QML Plugin for Qt 5 and Qt 6 +================================================== + +[](https://github.com/thp/pyotherside/actions/workflows/build.yaml) + +A Qt plugin providing access to a Python 3 interpreter from QML +for creating asynchronous mobile and Desktop UIs with Python. + + +Requirements +------------ + +* Qt 5.1.0 or newer (Qt 6.x also supported) +* Python 3.3.0 or newer + + +Building +-------- + +To build and install the QML plugin: + +``` +qmake # use "qmake6" for Qt 6 +make +make install +``` + +To build against a specific Python version, use: + +``` +qmake PYTHON_CONFIG=python3.3-config # use "qmake6" for Qt 6 +make +make install +``` + +To manually update the qmltypes file on x64 Linux (TODO: make this automated): + +``` +qmake # use "qmake6" for Qt 6 +make +make INSTALL_ROOT=$(pwd)/tmp/ +QML2_IMPORT_PATH=$(pwd)/tmp/usr/lib/x86_64-linux-gnu/qt5/qml \ + make -C src qmltypes +``` + +Unit Testing +------------ + +To run the included unit tests after building, use: + +``` +./tests/tests +``` + +Static Linking +-------------- + +If you want to link PyOtherSide statically against Python 3, you can include +the Python Standard Library in PyOtherSide as Qt Resource and have it extracted +automatically on load, for this, zip up the Standard Library and place the .zip +file as "pythonlib.zip" into src/ before running qmake. + + +More information +---------------- + +- Project page: https://thp.io/2011/pyotherside/ +- Git repo: http://github.com/thp/pyotherside/ +- Bug tracker: https://github.com/thp/pyotherside/issues +- Documentation: http://pyotherside.readthedocs.org/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/docs/conf.py new/pyotherside-1.6.0/docs/conf.py --- old/pyotherside-1.5.9/docs/conf.py 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/docs/conf.py 2022-08-05 13:48:31.000000000 +0200 @@ -41,16 +41,16 @@ # General information about the project. project = u'PyOtherSide' -copyright = u'2014-2020 Thomas Perl' +copyright = u'2014-2022 Thomas Perl' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = '1.5' +version = '1.6' # The full version, including alpha/beta/rc tags. -release = '1.5.9' +release = '1.6.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/docs/index.rst new/pyotherside-1.6.0/docs/index.rst --- old/pyotherside-1.5.9/docs/index.rst 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/docs/index.rst 2022-08-05 13:48:31.000000000 +0200 @@ -1,7 +1,7 @@ PyOtherSide Developer Guide =========================== -*PyOtherSide* is a Qt 5 QML Plugin that provides access to a Python 3 +*PyOtherSide* is a QML Plugin for Qt 5 and Qt 6 that provides access to a Python 3 interpreter from QML. It was designed with mobile devices in mind, where high-framerate touch interfaces are common, and where the user usually interfaces only with one application at a time via a touchscreen. As such, it @@ -13,11 +13,17 @@ objects to Python objects and vice versa, with focus on asynchronous events and continuation-passing style function calls. -While legacy versions of PyOtherSide worked with Qt 4.x and Python 2.x, its -focus now lies on Python 3.x and Qt 5. Python 3 has been out for several years, -and offers some nice language features and clean-ups, while Qt 5 supports most -mobile platforms well, and has an improved QML engine and a faster renderer (Qt -Scene Graph) compared to Qt 4. + +Qt 6 Support +============ + +.. versionadded:: 1.6.0 + +PyOtherSide now supports Qt 6 while retaining source compatibility with Qt 5. + +The following restrictions currently apply when using Qt 6: + +* ``PyGLArea`` is currently broken with Qt 6, use ``PyFBO`` instead. QML API @@ -1162,15 +1168,15 @@ The following build requirements have to be satisfied to build PyOtherSide: -* Qt 5.1.0 or newer -* Python 3.2.0 or newer +* Qt 5.1.0 or newer (Qt 6.x also supported) +* Python 3.3.0 or newer If you have the required build-dependencies installed, building and installing the PyOtherSide plugin should be as simple as: .. code-block:: sh - qmake + qmake # for Qt 6, use "qmake6" make make install @@ -1179,194 +1185,26 @@ .. code-block:: sh - qmake PYTHON_CONFIG=python3.3-config + qmake PYTHON_CONFIG=python3.3-config # For Qt 6, use "qmake6" make make install Alternatively, you can edit ``python.pri`` manually and specify the compiler flags for compiling and linking against Python on your system. -As of version 1.3.0, PyOtherSide does not build against Python 2.x anymore. - -Building for Android --------------------- - -Unlike Blackberry there is no Python or Qt present by default and both need to be shipped with the application. - -The current solution can be summarized like this: - -1. Statically cross-compile Python 3 for Android using the Android NDK -2. Statically compile PyOtherSide against the Android Python build and bundle the Python standard library inside the PyOtherSide binary -3. Use the Qt 5 SDK to make a QtQuick application - the SDK will handle bundling of your application file and of the PyOtherSide binary automatically - -A more detailed guide follows. It describes how to get from the source code of the relevant components to being able to run an Android application -with a Qt Quick 2.0 GUI running on an Android device. The `gPodder` podcast aggregator serves as (full featured & fully functional!) example of such an application. - -Performed in this environment: - - * Fedora 20 - * Qt 5.3.1 Android SDK - * latest Android SDK with API level 14 installed - * OpenJDK 1.7 - * a few GB of harddrive space - * an Android 4.0+ device connected to the computer that is accessible over ``adb`` (eq. the debugging mode is enabled) - -*This is just one example environment where these build instructions have been tested to work. Reasonably similar environments should work just as well.* - -The build is going to be done in a folder called ``build`` in the users home directory, -lets say that the use is named ``user`` (replace accordingly for your environment). - -We start in the home directory: - -.. code-block:: sh - - mkdir build - cd build - -Now clone the needed projects, load submodules and switch to correct branches. - -.. code-block:: sh - - git clone --branch fixes https://github.com/thp/python3-android - git clone https://github.com/thp/pyotherside - git clone --recursive https://github.com/gpodder/gpodder-android - -Next we will build Python 3 for Android. This will first download the Android NDK, then Python 3 source code, followed by crosscompiling the Python 3 code for Android on ARM. -*NOTE that this step alone can require multiple GB of harddisk space.* - -.. code-block:: sh - - cd python3-android - make all - -As the next step we modify the ``python.pri.android`` file to point to our Python build. If should look like this as a result (remember to modify it for your environment): - -.. code-block:: qmake - - QMAKE_LIBS += -L/home/user/build/python3-android/build/9d-14-arm-linux-androideabi-4.8/lib -lpython3.3m -ldl -lm -lc -lssl -lcrypto - QMAKE_CXXFLAGS += -I/home/user/build/python3-android/build/9d-14-arm-linux-androideabi-4.8/include/python3.3m/ - -Then copy the file over the python.pri file in the PyOtherSide project directory: - -.. code-block:: sh - - cd .. - cp python3-android/python.pri.android pyotherside/python.pri - -PyOtherSide can also help us ship & load the Python standard library if we can provide it a suitable zip bundle, which can be created like this: - -.. code-block:: sh - - cd python3-android/build/9d-14-arm-linux-androideabi-4.8/lib/python3.3/ - zip -r pythonlib.zip * - cd ../../../../.. - -For PyOtherSide to include the packed Python standard library it needs to be placed in its src subfolder: - -.. code-block:: sh - - mv python3-android/build/9d-14-arm-linux-androideabi-4.8/lib/python3.3/pythonlib.zip pyotherside/src/ - -PyOtherSide will then use the qrc mechanism to compile the compressed standard library during inside it's own binary. This removes the need for us to handle its shipping & loading ourself. - -Next you need to build PyOtherSide with QtCreator from the Qt 5.3 Android SDK, so make sure that the Qt 5.3 Android kit is using the exact same NDK that has been used to build Python 3 for Android. To do that go to *settings*, find the *kits* section, select the Android kit and make sure that the NDK path points to: - -``/home/user/build/python3-android/sdk/android-ndk-r9d`` - -Next open the pyotherside/pyotherside.pro project file on QtCreator, select the Android kit and once the project loads go to the *project view* and make sure that under *run* the API level is set to 14 (this corresponds to Android 4.0 and later). The Android Python 3 build has been built for API level 14 and our PyOtherSide build should do the same to be compatible. - -Also make sure that shadow build is disabled, just in case. - -Once done with the configuration got to the *build* menu and select the *built pyotherside* option - this should build PyOtherSide for Android and statically compile in our Python build and also include the Python standard library zip file with qrc. - -As the next step we need to move the PyOtherSide binary to the QML plugin folder for the Qt Android SDK, so that it can be fetched by the SDK when building gPodder. - -Let's say we have the SDK installed in the ``/opt`` directory (default for the Qt SDK installer on Linux), giving us this path to the plugin folder: - -``/opt/Qt5.3/5.3/android_armv7/qml`` - -First create the folder structure for the pyotherside plugin: - -.. code-block:: sh - - mkdir -p /opt/Qt5.3/5.3/android_armv7/qml/io/thp/pyotherside - -Then copy the pyotherside binary and *qmldir* file to the folder: - -.. code-block:: sh - - cp pyotherside/src/libpyothersideplugin.so /opt/Qt5.3/5.3/android_armv7/qml/io/thp/pyotherside/ - cp pyotherside/src/qmldir /opt/Qt5.3/5.3/android_armv7/qml/io/thp/pyotherside/ - -Next open the gPodder project in QtCreator (gpodder-android/gpodder-android.pro) and again make sure the Android kit is selected, that the API level 14 is used and that *shadow build* is disabled. Then just press the *Run* button and the SDK should build an Android APK that includes the libpyotherside binary (it fetched automatically from the plugins directory because is referenced in the gPodder QML source code) and deploy it to the device where gPodder should be started. - -.. _gPodder: http://gpodder.org/ - -Building for Windows --------------------- - -On Windows (tested versions: Windows 7), you need to download: - -1. Qt 5 (VS 2010) from `qt-project.org downloads`_ (tested: 5.2.1) -2. `Visual C++ 2010 Express`_ with `SP1`_ -3. Python 3 from `python.org Windows downloads`_ (tested: 3.3.4) - -We use VS 2010 instead of MinGW, because the MinGW version of Qt depends on -working OpenGL driver, whereas the non-OpenGL version uses Direct3D via ANGLE. -Also, Python is built with Visual C++ 2010 Express (see `Compiling Python on -Windows`_), so using the same toolchain when linking all three components (Qt, -Python and PyOtherSide) together makes sense. - -The necessary customizations for building PyOtherSide successfully on Windows -have been integrated recently, and are available since PyOtherSide 1.3.0. - -.. _qt-project.org downloads: http://qt-project.org/downloads -.. _Visual C++ 2010 Express: http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs#DownloadFamilies_4 -.. _SP1: https://www.microsoft.com/en-US/download/details.aspx?id=23691 -.. _python.org Windows downloads: http://python.org/downloads/windows/ -.. _Compiling Python on Windows: http://docs.python.org/devguide/setup.html#windows-compiling - -Once these pre-requisites are installed, you need to make some customizations -to the build setup: - -1. In ``src/qmldir``: Change ``plugin pyothersideplugin`` to ``plugin - pyothersideplugin1``. This is needed, because on Windows, the library - version gets encoded into the library name. - -2. In ``python.pri``: Modify it so that the Python 3 ``libs/`` folder is - added to the linker path, and link against ``-lpython33``. Also, modify - it so that the Python 3 ``include/`` folder is added to the compiler flags. - -Example ``python.pri`` file for a standard Python 3.3 installation on Windows: - -.. code-block:: qmake - - QMAKE_LIBS += -LC:\Python33\libs -lpython33 - QMAKE_CXXFLAGS += -IC:\Python33\include\ - -With the updated ``qmldir`` and ``python.pri`` files in place, simply open -the ``pyotherside.pro`` project file in Qt Creator, and build the project. -Configure a **Release Build**, and *disable* **Shadow Builds**. - -To install PyOtherSide into your Qt installation, so that the QML import works -from other projects: - -1. Make sure the PyOtherSide project is opened in Qt Creator -2. In the left column, select **Projects** -3. Make sure the **Run** tab (Run Settings) of your project is selected -4. In **Deployment**, click **Add Deploy Step** and select **Make** -5. In the **Make arguments:** field, type ``install`` -6. Hit **Run** to install PyOtherSide in your local Qt folder -7. Dismiss the "Custom Executable" dialog that pops up - -Known Problems: - -* **Qt Resource System** importing might not fully work on Windows - ChangeLog ========= +Version 1.6.0 (2022-08-05) +------------------------------- + +* Support for **Qt 6** (Qt 5 is still supported for now) +* Use ``PyUnicode_AsUTF8`` from Python 3.3 when converting strings; strings returned + from the converter are now valid as long as the ``PyObject`` is alive (previously + they were valid until the next string conversion or until converter was destroyed) +* Fixed ``image_loader`` and ``imageprovider_svg_data`` examples +* Removed outdated build instructions for Android and Windows Version 1.5.9 (2020-01-17) -------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/examples/image_loader.py new/pyotherside-1.6.0/examples/image_loader.py --- old/pyotherside-1.5.9/examples/image_loader.py 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/examples/image_loader.py 2022-08-05 13:48:31.000000000 +0200 @@ -1,5 +1,5 @@ # -# PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 +# PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 # Copyright (c) 2011, 2013, Thomas Perl <[email protected]> # # Permission to use, copy, modify, and/or distribute this software for any @@ -45,6 +45,6 @@ b, g, r, a = img.split() img = Image.merge("RGBA", (r, g, b, a)) - return bytearray(img.tostring()), img.size, pyotherside.format_argb32 + return bytearray(img.tobytes()), img.size, pyotherside.format_argb32 pyotherside.set_image_provider(render) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/examples/image_loader.qml new/pyotherside-1.6.0/examples/image_loader.qml --- old/pyotherside-1.5.9/examples/image_loader.qml 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/examples/image_loader.qml 2022-08-05 13:48:31.000000000 +0200 @@ -1,6 +1,6 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 * Copyright (c) 2011, 2013, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/examples/imageprovider_data.py new/pyotherside-1.6.0/examples/imageprovider_data.py --- old/pyotherside-1.5.9/examples/imageprovider_data.py 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/examples/imageprovider_data.py 2022-08-05 13:48:31.000000000 +0200 @@ -1,5 +1,5 @@ # -# PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 +# PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 # Copyright (c) 2011, 2013, Thomas Perl <[email protected]> # # Permission to use, copy, modify, and/or distribute this software for any diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/examples/imageprovider_data.qml new/pyotherside-1.6.0/examples/imageprovider_data.qml --- old/pyotherside-1.5.9/examples/imageprovider_data.qml 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/examples/imageprovider_data.qml 2022-08-05 13:48:31.000000000 +0200 @@ -1,6 +1,6 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 * Copyright (c) 2011, 2013, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/examples/imageprovider_example.py new/pyotherside-1.6.0/examples/imageprovider_example.py --- old/pyotherside-1.5.9/examples/imageprovider_example.py 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/examples/imageprovider_example.py 2022-08-05 13:48:31.000000000 +0200 @@ -1,5 +1,5 @@ # -# PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 +# PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 # Copyright (c) 2011, 2013, Thomas Perl <[email protected]> # # Permission to use, copy, modify, and/or distribute this software for any diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/examples/imageprovider_example.qml new/pyotherside-1.6.0/examples/imageprovider_example.qml --- old/pyotherside-1.5.9/examples/imageprovider_example.qml 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/examples/imageprovider_example.qml 2022-08-05 13:48:31.000000000 +0200 @@ -1,6 +1,6 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 * Copyright (c) 2011, 2013, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/examples/imageprovider_svg_data.py new/pyotherside-1.6.0/examples/imageprovider_svg_data.py --- old/pyotherside-1.5.9/examples/imageprovider_svg_data.py 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/examples/imageprovider_svg_data.py 2022-08-05 13:48:31.000000000 +0200 @@ -1,5 +1,5 @@ # -# PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 +# PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 # Copyright (c) 2011, 2013, Thomas Perl <[email protected]> # # Permission to use, copy, modify, and/or distribute this software for any @@ -19,12 +19,14 @@ import os +HERE = os.path.dirname(__file__) or '.' + def load_data(image_id, requested_size): # If you return data in the format "pyotherside.format_svg_data" requested_size # is is used as the target size when rendering the SVG image # We use the image id to get name of the SVG file to render - with open(image_id, 'rb') as f: + with open(os.path.join(HERE, image_id), 'rb') as f: svg_image_data = f.read() return bytearray(svg_image_data), requested_size, pyotherside.format_svg_data diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/examples/imageprovider_svg_data.qml new/pyotherside-1.6.0/examples/imageprovider_svg_data.qml --- old/pyotherside-1.5.9/examples/imageprovider_svg_data.qml 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/examples/imageprovider_svg_data.qml 2022-08-05 13:48:31.000000000 +0200 @@ -1,6 +1,6 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 * Copyright (c) 2011, 2013, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/examples/mandelbrot.py new/pyotherside-1.6.0/examples/mandelbrot.py --- old/pyotherside-1.5.9/examples/mandelbrot.py 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/examples/mandelbrot.py 2022-08-05 13:48:31.000000000 +0200 @@ -1,5 +1,5 @@ # -# PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 +# PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 # Copyright (c) 2011, 2013, Thomas Perl <[email protected]> # # Permission to use, copy, modify, and/or distribute this software for any diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/examples/mandelbrot.qml new/pyotherside-1.6.0/examples/mandelbrot.qml --- old/pyotherside-1.5.9/examples/mandelbrot.qml 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/examples/mandelbrot.qml 2022-08-05 13:48:31.000000000 +0200 @@ -1,6 +1,6 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 * Copyright (c) 2011, 2013, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/examples/plotorama.py new/pyotherside-1.6.0/examples/plotorama.py --- old/pyotherside-1.5.9/examples/plotorama.py 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/examples/plotorama.py 2022-08-05 13:48:31.000000000 +0200 @@ -1,5 +1,5 @@ # -# PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 +# PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 # Copyright (c) 2011, 2013, Thomas Perl <[email protected]> # # Permission to use, copy, modify, and/or distribute this software for any diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/examples/plotorama.qml new/pyotherside-1.6.0/examples/plotorama.qml --- old/pyotherside-1.5.9/examples/plotorama.qml 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/examples/plotorama.qml 2022-08-05 13:48:31.000000000 +0200 @@ -1,6 +1,6 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 * Copyright (c) 2011, 2013, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/pyotherside.pri new/pyotherside-1.6.0/pyotherside.pri --- old/pyotherside-1.5.9/pyotherside.pri 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/pyotherside.pri 2022-08-05 13:48:31.000000000 +0200 @@ -1,2 +1,2 @@ PROJECTNAME = pyotherside -VERSION = 1.5.9 +VERSION = 1.6.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/converter.h new/pyotherside-1.6.0/src/converter.h --- old/pyotherside-1.5.9/src/converter.h 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/converter.h 2022-08-05 13:48:31.000000000 +0200 @@ -1,7 +1,7 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 - * Copyright (c) 2011, 2013-2020, Thomas Perl <[email protected]> + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 + * Copyright (c) 2011, 2013-2022, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/ensure_gil_state.h new/pyotherside-1.6.0/src/ensure_gil_state.h --- old/pyotherside-1.5.9/src/ensure_gil_state.h 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/ensure_gil_state.h 2022-08-05 13:48:31.000000000 +0200 @@ -1,6 +1,6 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 * Copyright (c) 2014, Felix Krull <[email protected]> * Copyright (c) 2014, Thomas Perl <[email protected]> * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/global_libpython_loader.cpp new/pyotherside-1.6.0/src/global_libpython_loader.cpp --- old/pyotherside-1.5.9/src/global_libpython_loader.cpp 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/global_libpython_loader.cpp 2022-08-05 13:48:31.000000000 +0200 @@ -1,6 +1,6 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 * Copyright (c) 2013, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/global_libpython_loader.h new/pyotherside-1.6.0/src/global_libpython_loader.h --- old/pyotherside-1.5.9/src/global_libpython_loader.h 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/global_libpython_loader.h 2022-08-05 13:48:31.000000000 +0200 @@ -1,6 +1,6 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 * Copyright (c) 2013, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/pyfbo.cpp new/pyotherside-1.6.0/src/pyfbo.cpp --- old/pyotherside-1.5.9/src/pyfbo.cpp 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/pyfbo.cpp 2022-08-05 13:48:31.000000000 +0200 @@ -1,6 +1,6 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 * Copyright (c) 2014, Dennis Tomas <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any @@ -18,7 +18,7 @@ #include "pyfbo.h" -#include <QtGui/QOpenGLFramebufferObject> +#include <QOpenGLFramebufferObject> #include <QSize> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/pyfbo.h new/pyotherside-1.6.0/src/pyfbo.h --- old/pyotherside-1.5.9/src/pyfbo.h 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/pyfbo.h 2022-08-05 13:48:31.000000000 +0200 @@ -1,6 +1,6 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 * Copyright (c) 2014, Dennis Tomas <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/pyglarea.cpp new/pyotherside-1.6.0/src/pyglarea.cpp --- old/pyotherside-1.5.9/src/pyglarea.cpp 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/pyglarea.cpp 2022-08-05 13:48:31.000000000 +0200 @@ -1,6 +1,6 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 * Copyright (c) 2014, Dennis Tomas <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any @@ -22,9 +22,12 @@ #include <QVariant> #include <QPointF> #include <QtQuick/qquickwindow.h> -#include <QtGui/QOpenGLShaderProgram> -#include <QtGui/QOpenGLContext> +#include <QOpenGLShaderProgram> +#include <QOpenGLContext> +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +# include <QQuickOpenGLUtils> +#endif PyGLArea::PyGLArea() : m_before(true) @@ -84,12 +87,24 @@ disconnect(window(), SIGNAL(beforeRendering()), this, SLOT(render())); disconnect(window(), SIGNAL(afterRendering()), this, SLOT(render())); if (m_before) { +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // If we allow QML to do the clearing, they would clear what we paint // and nothing would show. + window()->setClearBeforeRendering(false); connect(window(), SIGNAL(beforeRendering()), this, SLOT(render()), Qt::DirectConnection); +#else + // For Qt 6, we don't support rendering as underlay; see also: + // https://doc.qt.io/qt-6/qquickwindow.html#integration-with-accelerated-3d-graphics-apis + // See also (search for "setClearBeforeRendering" on that page): + // https://doc.qt.io/qt-6/quick-changes-qt6.html + qWarning() << "PyGLArea doesn't work properly in Qt 6 yet, please use PyFBO instead."; + connect(window(), SIGNAL(beforeRendering()), this, SLOT(render()), Qt::DirectConnection); +#endif } else { +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) window()->setClearBeforeRendering(true); +#endif connect(window(), SIGNAL(afterRendering()), this, SLOT(render()), Qt::DirectConnection); } m_beforeChanged = false; @@ -104,7 +119,11 @@ if (!m_pyRenderer.isNull()) { m_renderer = new PyGLRenderer(m_pyRenderer); m_renderer->init(); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) window()->resetOpenGLState(); +#else + QQuickOpenGLUtils::resetOpenGLState(); +#endif } m_rendererChanged = false; } @@ -122,7 +141,11 @@ ) ); m_renderer->render(); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) window()->resetOpenGLState(); +#else + QQuickOpenGLUtils::resetOpenGLState(); +#endif } void PyGLArea::cleanup() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/pyglarea.h new/pyotherside-1.6.0/src/pyglarea.h --- old/pyotherside-1.5.9/src/pyglarea.h 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/pyglarea.h 2022-08-05 13:48:31.000000000 +0200 @@ -1,6 +1,6 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 * Copyright (c) 2014, Dennis Tomas <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/pyglrenderer.cpp new/pyotherside-1.6.0/src/pyglrenderer.cpp --- old/pyotherside-1.5.9/src/pyglrenderer.cpp 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/pyglrenderer.cpp 2022-08-05 13:48:31.000000000 +0200 @@ -1,6 +1,6 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 * Copyright (c) 2014, Dennis Tomas <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/pyglrenderer.h new/pyotherside-1.6.0/src/pyglrenderer.h --- old/pyotherside-1.5.9/src/pyglrenderer.h 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/pyglrenderer.h 2022-08-05 13:48:31.000000000 +0200 @@ -1,6 +1,6 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 * Copyright (c) 2014, Dennis Tomas <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/pyobject_converter.h new/pyotherside-1.6.0/src/pyobject_converter.h --- old/pyotherside-1.5.9/src/pyobject_converter.h 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/pyobject_converter.h 2022-08-05 13:48:31.000000000 +0200 @@ -1,7 +1,7 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 - * Copyright (c) 2011, 2013-2020, Thomas Perl <[email protected]> + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 + * Copyright (c) 2011, 2013-2022, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -125,16 +125,13 @@ class PyObjectConverter : public Converter<PyObject *> { public: - PyObjectConverter() : stringcontainer(NULL) { + PyObjectConverter() { if (!PyDateTimeAPI) { PyDateTime_IMPORT; } } virtual ~PyObjectConverter() { - if (stringcontainer != NULL) { - Py_DECREF(stringcontainer); - } } virtual enum Type type(PyObject * const & o) { @@ -176,14 +173,7 @@ virtual long long integer(PyObject *&o) { return PyLong_AsLongLong(o); } virtual double floating(PyObject *&o) { return PyFloat_AsDouble(o); } virtual bool boolean(PyObject *&o) { return (o == Py_True); } - virtual const char *string(PyObject *&o) { - // XXX: In Python 3.3, we can use PyUnicode_UTF8() - if (stringcontainer != NULL) { - Py_DECREF(stringcontainer); - } - stringcontainer = PyUnicode_AsUTF8String(o); - return PyBytes_AsString(stringcontainer); - } + virtual const char *string(PyObject *&o) { return PyUnicode_AsUTF8(o); } virtual QByteArray bytes(PyObject *&o) { return QByteArray(PyBytes_AsString(o), PyBytes_Size(o)); } @@ -238,9 +228,6 @@ virtual ListBuilder<PyObject *> *newList() { return new PyObjectListBuilder(); } virtual DictBuilder<PyObject *> *newDict() { return new PyObjectDictBuilder(); } virtual PyObject * none() { Py_RETURN_NONE; } - - private: - PyObject *stringcontainer; }; #endif /* PYOTHERSIDE_PYOBJECT_CONVERTER_H */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/pyobject_ref.cpp new/pyotherside-1.6.0/src/pyobject_ref.cpp --- old/pyotherside-1.5.9/src/pyobject_ref.cpp 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/pyobject_ref.cpp 2022-08-05 13:48:31.000000000 +0200 @@ -1,6 +1,6 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 * Copyright (c) 2014, Felix Krull <[email protected]> * Copyright (c) 2014, Thomas Perl <[email protected]> * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/pyobject_ref.h new/pyotherside-1.6.0/src/pyobject_ref.h --- old/pyotherside-1.5.9/src/pyobject_ref.h 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/pyobject_ref.h 2022-08-05 13:48:31.000000000 +0200 @@ -1,6 +1,6 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 * Copyright (c) 2014, Felix Krull <[email protected]> * Copyright (c) 2014, Thomas Perl <[email protected]> * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/pyotherside_plugin.cpp new/pyotherside-1.6.0/src/pyotherside_plugin.cpp --- old/pyotherside-1.5.9/src/pyotherside_plugin.cpp 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/pyotherside_plugin.cpp 2022-08-05 13:48:31.000000000 +0200 @@ -1,7 +1,7 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 - * Copyright (c) 2011, 2013-2020, Thomas Perl <[email protected]> + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 + * Copyright (c) 2011, 2013-2022, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/pyotherside_plugin.h new/pyotherside-1.6.0/src/pyotherside_plugin.h --- old/pyotherside-1.5.9/src/pyotherside_plugin.h 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/pyotherside_plugin.h 2022-08-05 13:48:31.000000000 +0200 @@ -1,7 +1,7 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 - * Copyright (c) 2011, 2013-2020, Thomas Perl <[email protected]> + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 + * Copyright (c) 2011, 2013-2022, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/pyqobject.h new/pyotherside-1.6.0/src/pyqobject.h --- old/pyotherside-1.5.9/src/pyqobject.h 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/pyqobject.h 2022-08-05 13:48:31.000000000 +0200 @@ -1,6 +1,6 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 * Copyright (c) 2014, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/pythonlib_loader.cpp new/pyotherside-1.6.0/src/pythonlib_loader.cpp --- old/pyotherside-1.5.9/src/pythonlib_loader.cpp 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/pythonlib_loader.cpp 2022-08-05 13:48:31.000000000 +0200 @@ -1,6 +1,6 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 * Copyright (c) 2014, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any @@ -66,7 +66,6 @@ } QString fname = QString::fromUtf8(info.dli_fname); - qDebug() << "Got library name: " << fname; // On Android, dladdr() returns only the basename of the file, so we go // hunt for the full path in /proc/self/maps, where the shared library is // mapped (TODO: We could parse the address range and compare that, too) @@ -77,7 +76,13 @@ QTextStream maps(&mapsf); QString line; while (!(line = maps.readLine()).isNull()) { +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) + // Qt::SkipEmptyParts was introduced in Qt 5.14 according to: + // https://doc.qt.io/qt-5/qt.html#SplitBehaviorFlags-enum QString filename = line.split(' ', QString::SkipEmptyParts).last(); +#else + QString filename = line.split(' ', Qt::SkipEmptyParts).last(); +#endif if (filename.endsWith("/" + fname)) { fname = filename; qDebug() << "Resolved full path:" << fname; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/pythonlib_loader.h new/pyotherside-1.6.0/src/pythonlib_loader.h --- old/pyotherside-1.5.9/src/pythonlib_loader.h 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/pythonlib_loader.h 2022-08-05 13:48:31.000000000 +0200 @@ -1,6 +1,6 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 * Copyright (c) 2014, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/qml_python_bridge.h new/pyotherside-1.6.0/src/qml_python_bridge.h --- old/pyotherside-1.5.9/src/qml_python_bridge.h 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/qml_python_bridge.h 2022-08-05 13:48:31.000000000 +0200 @@ -1,7 +1,7 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 - * Copyright (c) 2011, 2013-2020, Thomas Perl <[email protected]> + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 + * Copyright (c) 2011, 2013-2022, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/qobject_ref.cpp new/pyotherside-1.6.0/src/qobject_ref.cpp --- old/pyotherside-1.5.9/src/qobject_ref.cpp 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/qobject_ref.cpp 2022-08-05 13:48:31.000000000 +0200 @@ -1,6 +1,6 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 * Copyright (c) 2014, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/qobject_ref.h new/pyotherside-1.6.0/src/qobject_ref.h --- old/pyotherside-1.5.9/src/qobject_ref.h 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/qobject_ref.h 2022-08-05 13:48:31.000000000 +0200 @@ -1,6 +1,6 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 * Copyright (c) 2014, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/qpython.cpp new/pyotherside-1.6.0/src/qpython.cpp --- old/pyotherside-1.5.9/src/qpython.cpp 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/qpython.cpp 2022-08-05 13:48:31.000000000 +0200 @@ -1,7 +1,7 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 - * Copyright (c) 2011, 2013-2020, Thomas Perl <[email protected]> + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 + * Copyright (c) 2011, 2013-2022, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -33,6 +33,11 @@ #define SINCE_API_VERSION(smaj, smin) \ ((api_version_major > smaj) || (api_version_major == smaj && api_version_minor >= smin)) +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) +# define GET_JS_ENGINE(obj) ((obj).engine()) +#else +# define GET_JS_ENGINE(obj) (qjsEngine(this)) +#endif QPythonPriv * QPython::priv = NULL; @@ -253,7 +258,7 @@ QJSValue callback = handlers[event]; QJSValueList args; for (int i=1; i<list.size(); i++) { - args << callback.engine()->toScriptValue(list[i]); + args << GET_JS_ENGINE(callback)->toScriptValue(list[i]); } QJSValue result = callback.call(args); if (result.isError()) { @@ -414,7 +419,7 @@ QPython::finished(QVariant result, QJSValue *callback) { QJSValueList args; - QJSValue v = callback->engine()->toScriptValue(result); + QJSValue v = GET_JS_ENGINE(*callback)->toScriptValue(result); args << v; QJSValue callbackResult = callback->call(args); if (SINCE_API_VERSION(1, 2)) { @@ -431,7 +436,7 @@ QPython::imported(bool result, QJSValue *callback) { QJSValueList args; - QJSValue v = callback->engine()->toScriptValue(QVariant(result)); + QJSValue v = GET_JS_ENGINE(*callback)->toScriptValue(QVariant(result)); args << v; QJSValue callbackResult = callback->call(args); if (SINCE_API_VERSION(1, 2)) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/qpython.h new/pyotherside-1.6.0/src/qpython.h --- old/pyotherside-1.5.9/src/qpython.h 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/qpython.h 2022-08-05 13:48:31.000000000 +0200 @@ -1,7 +1,7 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 - * Copyright (c) 2011, 2013-2020, Thomas Perl <[email protected]> + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 + * Copyright (c) 2011, 2013-2022, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/qpython_imageprovider.cpp new/pyotherside-1.6.0/src/qpython_imageprovider.cpp --- old/pyotherside-1.5.9/src/qpython_imageprovider.cpp 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/qpython_imageprovider.cpp 2022-08-05 13:48:31.000000000 +0200 @@ -1,7 +1,7 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 - * Copyright (c) 2011, 2013-2020, Thomas Perl <[email protected]> + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 + * Copyright (c) 2011, 2013-2022, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/qpython_imageprovider.h new/pyotherside-1.6.0/src/qpython_imageprovider.h --- old/pyotherside-1.5.9/src/qpython_imageprovider.h 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/qpython_imageprovider.h 2022-08-05 13:48:31.000000000 +0200 @@ -1,7 +1,7 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 - * Copyright (c) 2011, 2013-2020, Thomas Perl <[email protected]> + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 + * Copyright (c) 2011, 2013-2022, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/qpython_priv.cpp new/pyotherside-1.6.0/src/qpython_priv.cpp --- old/pyotherside-1.5.9/src/qpython_priv.cpp 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/qpython_priv.cpp 2022-08-05 13:48:31.000000000 +0200 @@ -1,7 +1,7 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 - * Copyright (c) 2011, 2013-2020, Thomas Perl <[email protected]> + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 + * Copyright (c) 2011, 2013-2022, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/qpython_priv.h new/pyotherside-1.6.0/src/qpython_priv.h --- old/pyotherside-1.5.9/src/qpython_priv.h 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/qpython_priv.h 2022-08-05 13:48:31.000000000 +0200 @@ -1,7 +1,7 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 - * Copyright (c) 2011, 2013-2020, Thomas Perl <[email protected]> + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 + * Copyright (c) 2011, 2013-2022, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/qpython_worker.cpp new/pyotherside-1.6.0/src/qpython_worker.cpp --- old/pyotherside-1.5.9/src/qpython_worker.cpp 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/qpython_worker.cpp 2022-08-05 13:48:31.000000000 +0200 @@ -1,7 +1,7 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 - * Copyright (c) 2011, 2013-2020, Thomas Perl <[email protected]> + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 + * Copyright (c) 2011, 2013-2022, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/qpython_worker.h new/pyotherside-1.6.0/src/qpython_worker.h --- old/pyotherside-1.5.9/src/qpython_worker.h 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/qpython_worker.h 2022-08-05 13:48:31.000000000 +0200 @@ -1,7 +1,7 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 - * Copyright (c) 2011, 2013-2020, Thomas Perl <[email protected]> + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 + * Copyright (c) 2011, 2013-2022, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/qrc_importer.py new/pyotherside-1.6.0/src/qrc_importer.py --- old/pyotherside-1.5.9/src/qrc_importer.py 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/qrc_importer.py 2022-08-05 13:48:31.000000000 +0200 @@ -1,5 +1,5 @@ # -# PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 +# PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 # Copyright (c) 2014, Thomas Perl <[email protected]> # # Permission to use, copy, modify, and/or distribute this software for any diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/qvariant_converter.h new/pyotherside-1.6.0/src/qvariant_converter.h --- old/pyotherside-1.5.9/src/qvariant_converter.h 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/qvariant_converter.h 2022-08-05 13:48:31.000000000 +0200 @@ -1,7 +1,7 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 - * Copyright (c) 2011, 2013-2020, Thomas Perl <[email protected]> + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 + * Copyright (c) 2011, 2013-2022, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/src/src.pro new/pyotherside-1.6.0/src/src.pro --- old/pyotherside-1.5.9/src/src.pro 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/src/src.pro 2022-08-05 13:48:31.000000000 +0200 @@ -8,7 +8,7 @@ TEMPLATE = lib CONFIG += qt plugin -QT += qml quick svg +QT += qml quick svg opengl target.path = $$[QT_INSTALL_QML]/$$PLUGIN_IMPORT_PATH INSTALLS += target diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/tests/tests.cpp new/pyotherside-1.6.0/tests/tests.cpp --- old/pyotherside-1.5.9/tests/tests.cpp 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/tests/tests.cpp 2022-08-05 13:48:31.000000000 +0200 @@ -1,7 +1,7 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 - * Copyright (c) 2011, 2013-2020, Thomas Perl <[email protected]> + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 + * Copyright (c) 2011, 2013-2022, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyotherside-1.5.9/tests/tests.h new/pyotherside-1.6.0/tests/tests.h --- old/pyotherside-1.5.9/tests/tests.h 2020-01-17 13:37:31.000000000 +0100 +++ new/pyotherside-1.6.0/tests/tests.h 2022-08-05 13:48:31.000000000 +0200 @@ -1,7 +1,7 @@ /** - * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 - * Copyright (c) 2011, 2013-2020, Thomas Perl <[email protected]> + * PyOtherSide: Asynchronous Python 3 Bindings for Qt 5 and Qt 6 + * Copyright (c) 2011, 2013-2022, Thomas Perl <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above
