MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / ok

Method ok

gui/applicationdialog.cpp:79–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79void ApplicationDialog::ok()
80{
81 if (mUI->mName->text().isEmpty() || mUI->mPath->text().isEmpty()) {
82 QMessageBox msg(QMessageBox::Warning,
83 tr("Cppcheck"),
84 tr("You must specify a name, a path and optionally parameters for the application!"),
85 QMessageBox::Ok,
86 this);
87
88 msg.exec();
89
90 reject();
91 } else {
92 // Convert possible native (Windows) path to internal presentation format
93 mApplication.setName(mUI->mName->text());
94 mApplication.setPath(QDir::fromNativeSeparators(mUI->mPath->text()));
95 mApplication.setParameters(mUI->mParameters->text());
96
97 accept();
98 }
99}

Callers

nothing calls this directly

Calls 4

isEmptyMethod · 0.80
setNameMethod · 0.80
setParametersMethod · 0.80
setPathMethod · 0.45

Tested by

no test coverage detected