| 320 | } |
| 321 | |
| 322 | void LibraryDialog::editArg() |
| 323 | { |
| 324 | CppcheckLibraryData::Function *function = currentFunction(); |
| 325 | if (!function) |
| 326 | return; |
| 327 | |
| 328 | if (mUi->arguments->selectedItems().count() != 1) |
| 329 | return; |
| 330 | CppcheckLibraryData::Function::Arg &arg = function->args[mUi->arguments->row(mUi->arguments->selectedItems().first())]; |
| 331 | |
| 332 | LibraryEditArgDialog d(nullptr, arg); |
| 333 | if (d.exec() == QDialog::Accepted) { |
| 334 | const unsigned number = arg.nr; |
| 335 | arg = d.getArg(); |
| 336 | arg.nr = number; |
| 337 | mUi->arguments->selectedItems().first()->setText(getArgText(arg)); |
| 338 | } |
| 339 | mUi->buttonSave->setEnabled(true); |
| 340 | } |
| 341 | |
| 342 | QString LibraryDialog::getArgText(const CppcheckLibraryData::Function::Arg &arg) |
| 343 | { |
nothing calls this directly
no test coverage detected