History

Initialize QCoreApplication before calling showHelp

Dale Glass committed 4 years ago

Commit 545ee081 parent 42040563 files · +3 −0Browse files

Showing the changes to assignment-client/src/AssignmentClientApp.cpp (1 of 3 files). Show all

Unified · Split

assignment-client/src/AssignmentClientApp.cpp+1−0
@@ -130,6 +130,7 @@ AssignmentClientApp::AssignmentClientApp(int argc, char* argv[]) : · 129 unmodified lines
130130 auto &logHandler = LogHandler::getInstance();
131131 if (parser.isSet(logOption)) {
132132 if (!logHandler.parseOptions(parser.value(logOption).toUtf8())) {
133+ QCoreApplication mockApp(argc, const_cast<char**>(argv)); // required for call to showHelp()
133134 parser.showHelp();
134135 Q_UNREACHABLE();
135136 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t