Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Qt 6.7.3 #236

Merged
merged 2 commits into from
Oct 2, 2024
Merged

Fix Qt 6.7.3 #236

merged 2 commits into from
Oct 2, 2024

Conversation

usiems
Copy link
Contributor

@usiems usiems commented Oct 2, 2024

This fixes the problem introduced with Qt 6.7.3, that the wrapper for the "Qt" namespace suddenly got methods like
QKeyCombination static_Qt_operator+(Qt::KeyboardModifiers modifiers, Qt::Key key);
The problem is two-fold:

  1. No proper name-mangling was applied to these static methods ("operator+" should be replaced by "__add__").
  2. Static operators don't work in PythonQt anyway and shouldn't be generated (we also can't assign the operator to the first argument type, since that is only a enum type, which has no separate wrapper generated).

The trigger for these problems was that these static operators have been moved to the Qt namespace in version 6.7.3.

and instead remove these "rename" entries in the typesystem files, which
were not used because of this option (but triggered
the creation of unneeded wrapper methods in derived classes).
This was introduced by Qt 6.7.3, where the static operators + and | on
Qt::Key and Qt::KeyModifiers were moved into the Qt namespace.
generator/shellgenerator.cpp Show resolved Hide resolved
generator/typesystem_core.xml Show resolved Hide resolved
generator/typesystem_gui.xml Show resolved Hide resolved
generator/typesystem_gui.xml Show resolved Hide resolved
@usiems usiems merged commit cf8998b into master Oct 2, 2024
18 checks passed
@usiems usiems deleted the fix_Qt_6.7.3 branch October 2, 2024 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants