| 159 | } |
| 160 | |
| 161 | void |
| 162 | BackgroundTasksDialog::onLayoutChanged(void) |
| 163 | { |
| 164 | int rows = this->model->rowCount(QModelIndex()); |
| 165 | |
| 166 | if (rows > this->prevRows) |
| 167 | this->ui->tableView->resizeColumnsToContents(); |
| 168 | else if (rows == this->prevRows) |
| 169 | this->ui->tableView->resizeColumnToContents(2); |
| 170 | |
| 171 | this->prevRows = rows; |
| 172 | |
| 173 | this->ui->tableView->setColumnWidth(3, 120); |
| 174 | this->ui->cancelAllButton->setEnabled(rows > 0); |
| 175 | } |
| 176 | |
| 177 | void |
| 178 | BackgroundTasksDialog::onCancelClicked(QModelIndex index) |
nothing calls this directly
no test coverage detected