Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
5.3.1
-
None
Description
On Windows, QCoreApplication::arguments() calls ::GetCommandLine(), parses it into QStringList and compares the result size with argc passed to QCoreApplication constructor via Q_ASSERT.
However, there are valid cases when these values differ. One of them is ActiveQt-based server, which WinMain implementation strips argc/argv of ActiveX-related parameters, or doesn't even compose argc/argv at all when called with some parameters, using fake empties.
It's pretty annoying to run a Debug build of such an application that uses the command line for its own purposes (e.g. when it is run normally, not as an ActiveX server or tool).
Another case is a QtWinMigrate-based application, which exhibits the same behavior.
Attachments
Issue Links
- is replaced by
-
QTBUG-30330 Windows: assertion if you pass QApplication arguments that are not exactly those retrieved by GetCommandLine()
- Closed