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

Method editArg

gui/librarydialog.cpp:322–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320}
321
322void 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
342QString LibraryDialog::getArgText(const CppcheckLibraryData::Function::Arg &arg)
343{

Callers

nothing calls this directly

Calls 2

getArgMethod · 0.80
setEnabledMethod · 0.80

Tested by

no test coverage detected