MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / configDone

Method configDone

src/plugins/codeporting/configwidget.cpp:78–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78void ConfigWidget::configDone()
79{
80 d->cfgParam.project = d->combProject->currentText();
81 d->cfgParam.srcCPU = d->combSrc->currentText();
82 d->cfgParam.targetCPU = d->combTarget->currentText();
83
84 // empty parameter check.
85 if (d->cfgParam.project.isEmpty()
86 || d->cfgParam.srcCPU.isEmpty()
87 || d->cfgParam.targetCPU.isEmpty()) {
88 d->lbWarning->setText(tr("Warning: parameter is empty!"));
89 return;
90 }
91
92 // repeat paramter check.
93 if (d->cfgParam.srcCPU == d->cfgParam.targetCPU) {
94 d->lbWarning->setText(tr("Warning: source cpu and target cpu should not be the same!"));
95 return;
96 }
97
98 saveCfg();
99
100 accept();
101
102 d->lbWarning->clear();
103
104 emit sigStartPorting(d->cfgParam.project, d->cfgParam.srcCPU, d->cfgParam.targetCPU);
105}
106
107void ConfigWidget::showEvent(QShowEvent *e)
108{

Callers

nothing calls this directly

Calls 3

isEmptyMethod · 0.45
setTextMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected