Skip to content

fix noexcept parsing#305

Merged
mappu merged 4 commits intomappu:masterfrom
arnetheduck:miqt-noexcept
Jan 21, 2026
Merged

fix noexcept parsing#305
mappu merged 4 commits intomappu:masterfrom
arnetheduck:miqt-noexcept

Conversation

@arnetheduck
Copy link
Contributor

noexcept optionally comes with a condition, which is sometimes
filled in - a prominent example being the QDateTime constructor.

backported from seaqt

`noexcept` optionally comes with a condition, which is sometimes
filled in - a prominent example being the QDateTime constructor.
@mappu
Copy link
Owner

mappu commented Jan 21, 2026

Wow, interesting find. How did you run into this?

Thanks for updating the unit tests too,

Looking over the diff, the end-user changes that resulted here are

  • QCommandLineParser, QWebEnginePage/QWebEngineView: more methods
  • QStyleOptionXxx: add many new operatorAssign() methods
  • QItemSelection, QVersionNumber: new ctor (no churn)
  • Qt 5 QDateTime: new ctor (churn)

Since the library now has real users, I wonder if it's worth hacking another sort order override in transformctors.go to force the new 0-argument ctor to the end of the list...? Or probably not worth bothering since it's only Qt 5...

EDIT: I've done the sort change just to avoid having any breaking change, but i'm still second-guessing it - now the ctor order has to differ between Qt 5/6,

@arnetheduck
Copy link
Contributor Author

How did you run into this?

By coming across code that wanted to create a datetime ;) afair are more cases than the ones listed but miqt is not able to parse them for other reasons, this is just a stepping stone.

if it's worth hacking

I've since moved on to mangle names in a different way, avoiding this problem space entirely. Ostensibly one could generate both styles, though that's probably not of interest for seaqt at least.

Notably, every time you fix a "ErrTooComplex" to parse a new C++ construct, this problem will likely repeat.

now the ctor order has to differ

I ran across a case like this for QVariant which was pretty hard to track down, because it ended up actually compiling and calling the wrong constructor (qvariant constructors change quite a bit between 5 & 6) - part of the reason for the name mangling switch.

@mappu
Copy link
Owner

mappu commented Jan 21, 2026

I'd be more than happy to adopt that style of C mangling, it definitely would be more stable - it's just the Go representation that's the real problem, since Go doesn't have overloading.

Go can only fake it by boxing everything in ...any and figuring it out at runtime, but that seems awful

@mappu mappu merged commit 55240da into mappu:master Jan 21, 2026
10 checks passed
@arnetheduck
Copy link
Contributor Author

arnetheduck commented Jan 21, 2026 via email

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