-
-
Notifications
You must be signed in to change notification settings - Fork 219
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
argc QApplication #1
Comments
|
I don't think so because I had segfault with the way you wrote, and after having added the From the doc "The data referred to by argc and argv must stay valid for the entire lifetime of the QApplication object". IMHO, the actual |
So you propose that this: SingleApplication::SingleApplication(int, char *[]); Is changed to this: SingleApplication::SingleApplication(int&, char *[]); |
Yes it is (as in QtSingleApplication). |
QApplication uses a reference of argc so it could modify it's value when it substitutes known arguments for example. Thanks to @Chocobozzz for reporting the issue. #1
Thanks to you to propose an elegant alternative to QtSingleApplication for Qt5 :) |
And Thank You for the fix! |
QApplication takes the argc adress
&argc
whereas you send theargc
value to QApplication.The text was updated successfully, but these errors were encountered: