fixed only handling two fields of a check
This commit is contained in:
@@ -218,8 +218,10 @@ void MainWindow::on_add_new_check_button_clicked() {
|
||||
|
||||
unsigned int newRowIndex = checks.size();
|
||||
model->insertRows(newRowIndex, 1);
|
||||
model->setData(model->index(newRowIndex, 0), QVariant::fromValue(new_check->get_date()));
|
||||
model->setData(model->index(newRowIndex, 1), QVariant::fromValue(new_check->get_total()));
|
||||
|
||||
checks.at(newRowIndex) = *new_check;
|
||||
|
||||
emit model->dataChanged(model->index(newRowIndex, 0), model->index(newRowIndex, 1));
|
||||
|
||||
delete new_check;
|
||||
|
||||
@@ -260,6 +262,7 @@ Check *MainWindow::parse_new_check() {
|
||||
check->set_fd(ui->fd_line_edit->text().toStdString());
|
||||
check->set_fi(ui->fi_line_edit->text().toStdString());
|
||||
check->set_operation_type(OperationType(ui->operation_type_combo_box->currentIndex() + 1));
|
||||
|
||||
return check;
|
||||
} catch(OfdRequestException e) {
|
||||
if (!strcmp(e.what(), "Incorrect captcha")) {
|
||||
|
||||
Reference in New Issue
Block a user