-
Notifications
You must be signed in to change notification settings - Fork 128
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 lost error message #1370
fix lost error message #1370
Conversation
This is another way to "fix" it, and a clue to what is wrong:
This results in a message |
LGTM The best thing about streaming operators is implicit conversions. Related thought. Now that we're c++20, we can rely on std::fmt, no? I'm not sure I want to go nuts replacing printf specifiers everywhere, (in fact, I'm pretty sure I don't...) I resisted it when it meant bringing in a thirdparty (even though that version IS the implementation in most platforms) library, but for debugging, in particular, it can be pretty nice. I'm not sure how well it plays with Qt types[1], but it can't be worse than printf...plus fmt has been pretty widely embraced through the industry so it seems likely that someone has Compile-time format argument matching testing is pretty nice if we can rely on it. I'd even give some consideration to exposing these formatting specifiers in our style definitions, but I'm nto really sure how many people are writing their own. [1] See https://bugreports.qt.io/browse/QTBUG-104651, though that seems mostly internal to Qt itself. Also https://wiki.qt.io/QtCS2024_std::format - notably QTBUG-104652 which dashes my hope above, but looks trivial to both patch in and to disable when our floor hits Qt 6.8 or whatever. |
This is related to our use of the undocumented operator overload from qversionnumber.h If the QVersionNumber was the last thing sent then the code doesn't even compile
|
Me either! |
Why this compiled and output nothing is a mystery to me.
You can test with:
gpsbabel -i kml -f reference/bounds-test.kml -o gpx,gpxver=0.9 -F /dev/null
which should produce a message
GPX: gpx version number "0.9" not valid.