diff --git a/src/main.cpp b/src/main.cpp index 3a540c9..319368e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -8,15 +8,16 @@ int main(int argc, char **argv) { QApplication app(argc, argv); QCommandLineParser parser; - QCommandLineOption mtl_filepath_opt({"m", "material"}, "Material file path", "path"); - QCommandLineOption obj_filepath_opt({"o", "object"}, "Object file path", "path"); + QCommandLineOption mtl_filepath_opt({"m", "material"}, "Material file path, required", "path"); + QCommandLineOption obj_filepath_opt({"o", "object"}, "Object file path, required", "path"); + parser.addHelpOption(); parser.addOption(mtl_filepath_opt); parser.addOption(obj_filepath_opt); parser.process(app); QString mtl_filepath = parser.value(mtl_filepath_opt); QString obj_filepath = parser.value(obj_filepath_opt); if (mtl_filepath.isEmpty() || obj_filepath.isEmpty()) { - return -1; + return 1; } QMainWindow w; Ui::MainWindow ui;