| 77 | } |
| 78 | |
| 79 | void 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 | } |
nothing calls this directly
no test coverage detected