| 200 | } |
| 201 | |
| 202 | void HotTestWidget::on_threadEnableCheckBox_clicked() |
| 203 | { |
| 204 | this->ui->threadEnableCheckBox->setEnabled(false); |
| 205 | this->ui->hotkeyCheckbox_1->setChecked(false); |
| 206 | this->ui->hotkeyCheckbox_2->setChecked(false); |
| 207 | this->ui->hotkeyCheckbox_3->setChecked(false); |
| 208 | this->ui->hotkeyCheckbox_4->setChecked(false); |
| 209 | this->ui->hotkeyCheckbox_5->setChecked(false); |
| 210 | |
| 211 | QApplication::processEvents(); |
| 212 | |
| 213 | Q_ASSERT(!this->hotkey_4->isRegistered()); |
| 214 | Q_ASSERT(!this->hotkey_5->isRegistered()); |
| 215 | |
| 216 | this->hotkey_4->moveToThread(this->thread4); |
| 217 | this->hotkey_5->moveToThread(this->thread5); |
| 218 | |
| 219 | QApplication::processEvents(); |
| 220 | Q_ASSERT(this->hotkey_4->thread() == this->thread4); |
| 221 | Q_ASSERT(this->hotkey_5->thread() == this->thread5); |
| 222 | |
| 223 | connect(this->thread4, &QThread::finished, this, [this](){ |
| 224 | this->hotkey_4->moveToThread(qApp->thread()); |
| 225 | }); |
| 226 | connect(this->thread5, &QThread::finished, this, [this](){ |
| 227 | this->hotkey_5->moveToThread(qApp->thread()); |
| 228 | }); |
| 229 | |
| 230 | this->ui->tabWidget->setCurrentIndex(0); |
| 231 | } |
| 232 | |
| 233 | void HotTestWidget::on_registeredCheckBox_toggled(bool checked) |
| 234 | { |
nothing calls this directly
no test coverage detected