MCPcopy Create free account
hub / github.com/apitrace/apitrace / arrayFromEditor

Method arrayFromEditor

gui/argumentseditor.cpp:399–416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397}
398
399QVariant ArgumentsEditor::arrayFromEditor(const ApiArray &origArray,
400 bool *changed) const
401{
402 QVector<QVariant> vals;
403 QVector<QVariant> origValues = origArray.values();
404
405 Q_ASSERT(isVariantStringArray(QVariant::fromValue(origArray)));
406 *changed = false;
407 //shaders
408 for (int i = 0; i < m_ui.selectStringCB->count(); ++i) {
409 QVariant val = m_ui.selectStringCB->itemData(i);
410 QVariant origValue = origValues[i];
411 if (origValue != val)
412 *changed = true;
413 vals.append(val);
414 }
415 return QVariant::fromValue(ApiArray(vals));
416}
417
418void ArgumentsEditor::revert()
419{

Callers

nothing calls this directly

Calls 3

isVariantStringArrayFunction · 0.85
ApiArrayClass · 0.85
valuesMethod · 0.80

Tested by

no test coverage detected