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

Question: experimenting with Qt - can argc be non-const? #899

Closed
tomFlowee opened this issue Dec 20, 2023 · 1 comment
Closed

Question: experimenting with Qt - can argc be non-const? #899

tomFlowee opened this issue Dec 20, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@tomFlowee
Copy link

This is a followup of sorts to bug #592, but now for a differnent issue that likely is a regression for the exact same usecase as that bug.

The simple code of:

main: (args) -> int = {
  app: QCoreApplication = (args.argc, args.argv);

today fails due to the QCoreApplication having the constructor:
QCoreApplication::QCoreApplication(int &argc, char **argv)

notice the ampersant there.

I would argue the same as the person that reported bug 592 that the argc and argv are there for backwards compatibility and it would be nice if they follow the (granted ugly) unsafe behavior we inherited from the time when we were still walking in bearskins.

Which is to say, would you consider removing the const on args.argc in order to make this library class's constructor work.

@tomFlowee tomFlowee added the bug Something isn't working label Dec 20, 2023
@hsutter
Copy link
Owner

hsutter commented Dec 20, 2023

it would be nice if they follow the (granted ugly) unsafe behavior we inherited from the time when we were still walking in bearskins

😆 How can I say no to that picturesque description, when we've been reading Auel lately? mutable it shall be...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants