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

Generator fixes for Qt 6.7 (#224) #225

Merged
merged 17 commits into from
Jun 28, 2024
Merged

Generator fixes for Qt 6.7 (#224) #225

merged 17 commits into from
Jun 28, 2024

Conversation

usiems
Copy link
Contributor

@usiems usiems commented Jun 27, 2024

There was a bunch of problems, so looking at the commits separately is recommended.

Also not all commits solve real problems, I also tried to reduce parser errors somewhat.

usiems added 14 commits June 27, 2024 15:07
…nition

This was especially problematic if the line ended with the comment,
since then the next line would be added, too, even though the current
one didn't end with a '\'
This prevented QT6_DECL_NEW_OVERLOAD_TAIL from being expanded correctly
they don't have an implementation.

Often the friend definitions are the only definition there is, and we
translate these definitions (currently always operators) to wrapper
members then.
that might use the "spaceship" operator for C++20 and onwards.

The generator had trouble to parse these. Simply replace the definitions
with something that works for the generator.
…alue)

to differentiate new methods with a different return value from the old,
deprecated ones.
(this fixes some parser errors)
Add an entry "aliases" to a type entry in the type database, these types
will automatically be changed to the main type in the generated code.

This fixes the problem that in Qt 6.7 QAudio enums are used under the
QtAudio alias. These enum names are now automatically mapped to the
QAudio name with the right alias entries in the type database.

This doesn't make QAudio available as QtAudio in Python, though.
Comment on lines +304 to +305
// also set the access policy to public, just in case
fun->setAccessPolicy(CodeModel::Public);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just in what case? Is this really needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I simply copied this part from Binder::visitFunctionDefinition, where the same thing was done.

generator/parser/parser.cpp Outdated Show resolved Hide resolved
@usiems usiems force-pushed the generator_fixes_for_Qt67 branch 2 times, most recently from c2075c9 to d0655ea Compare June 28, 2024 08:57
Print the place in the code where the (ambiguous) parser error was
emitted (currently only for GCC and MSVC)
(should fix compare methods generated twice for Qt 5.12/5.15)
@usiems usiems merged commit c779454 into master Jun 28, 2024
18 checks passed
@usiems usiems deleted the generator_fixes_for_Qt67 branch June 28, 2024 12:23
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