Visitar URL original
error: virtual function ‘virtual QString PythonQtShell_QXmlStreamEntityResolver::resolveEntity(const QString&, const QString&)’ overriding final function · Issue #370 · MeVisLab/pythonqt · GitHub
Skip to content

error: virtual function ‘virtual QString PythonQtShell_QXmlStreamEntityResolver::resolveEntity(const QString&, const QString&)’ overriding final function #370

Open

Description

@FabioLolix

Hi, I'm getting the error below with both v4.2.0 and from latest git when building from Arch Linux with Qt 6.12

About a week ago builded fine against Qt 6.11.2

If you need more info let me know

 com_trolltech_qt_gui_init.o ../../generated_cpp/com_trolltech_qt_gui/com_trolltech_qt_gui_init.cpp
In file included from ../../generated_cpp/com_trolltech_qt_core/com_trolltech_qt_core_init.cpp:7:
../../generated_cpp/com_trolltech_qt_core/com_trolltech_qt_core4.h:106:10: error: virtual function ‘virtual QString PythonQtShell_QXmlStreamEntityResolver::resolveEntity(const QString&, const QString&)’ overriding final function
  106 | QString  resolveEntity(const QString&  publicId, const QString&  systemId) override;
      |          ^~~~~~~~~~~~~
In file included from ../../generated_cpp/com_trolltech_qt_core/com_trolltech_qt_core4.h:13:
/usr/include/qt6/QtCore/qxmlstream.h:236:21: note: overridden function is ‘virtual QString QXmlStreamEntityResolver::resolveEntity(const QString&, const QString&)’
  236 |     virtual QString resolveEntity(const QString& publicId, const QString& systemId) final;
      |                     ^~~~~~~~~~~~~
In file included from ../../generated_cpp/com_trolltech_qt_core/com_trolltech_qt_core4.cpp:1:
../../generated_cpp/com_trolltech_qt_core/com_trolltech_qt_core4.h:106:10: error: virtual function ‘virtual QString PythonQtShell_QXmlStreamEntityResolver::resolveEntity(const QString&, const QString&)’ overriding final function
  106 | QString  resolveEntity(const QString&  publicId, const QString&  systemId) override;
      |          ^~~~~~~~~~~~~
In file included from ../../generated_cpp/com_trolltech_qt_core/com_trolltech_qt_core4.h:13:
/usr/include/qt6/QtCore/qxmlstream.h:236:21: note: overridden function is ‘virtual QString QXmlStreamEntityResolver::resolveEntity(const QString&, const QString&)’
  236 |     virtual QString resolveEntity(const QString& publicId, const QString& systemId) final;
      |                     ^~~~~~~~~~~~~
make[2]: *** [Makefile:1973: com_trolltech_qt_core4.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:1994: com_trolltech_qt_core_init.o] Error 1
make[2]: Leaving directory '/home/fabio/Dev/Github/PKGBUILD-AUR_fix/p/pythonqt-git/src/pythonqt/extensions/PythonQt_QtAll'
make[1]: *** [Makefile:47: sub-PythonQt_QtAll-make_first] Error 2
make[1]: Leaving directory '/home/fabio/Dev/Github/PKGBUILD-AUR_fix/p/pythonqt-git/src/pythonqt/extensions'
make: *** [Makefile:101: sub-extensions-make_first] Error 2
==> ERROR: A failure occurred in build().

Activity

  1. usiems commented on Oct 27, 2026

    @usiems
    Contributor

    Sorry for the late answer, I lost sight of this issue.

    We didn't adapt the binding generator to Qt 6.12 yet. It seems the Qt API started to use the final keyword, and we need to teach the generator to not try to generate shell implementations for methods marked with final (shell implementations are needed to allow Python code to override virtual C++ methods). Since the method is marked final, it obviously isn't meant to be overridden again anyway.

    I can't give any promises about when we will get around to fix this.

  2. usiems commented on Oct 29, 2026

    @usiems
    Contributor

    As a quick fix you could try to add a rejection statement to the generator/typesystem_core.xml file. Something like
    <rejection class="QXmlStreamEntityResolver" function-name="resolveEntity" since-version="6.12"/>
    should prevent the method from being generated.

    But I suspect that this will not be the only problem with Qt 6.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions