[Interest] QCoreApplication, argc parameter type
Bernhard Lindner
private at bernhard-lindner.de
Fri Jan 8 00:36:52 CET 2021
Hi!
Can someone tell me why QCoreApplication uses an 'int &argc' type parameter instead of a
plain 'int argc'? Does QCoreApplication expect the value to change? Does it change the
value by itself?
When deriving from QCoreApplication this can cause funny crashes if one forgets to use a
reference type in the derived class' constructor parameter. So I guess there must be a
very good reason why QCoreApplication uses a reference instead of copy-by-value.
--
Best Regards,
Bernhard Lindner
More information about the Interest
mailing list