mirror of
https://github.com/Skycoder42/QHotkey.git
synced 2026-11-19 12:49:58 +03:00
thread test mac -> works :D
This commit is contained in:
@@ -184,22 +184,20 @@ void HotTestWidget::on_groupBox_toggled(bool checked)
|
||||
hotkey->setRegistered(checked);
|
||||
}
|
||||
|
||||
void HotTestWidget::on_threadEnableCheckBox_clicked(bool checked)
|
||||
void HotTestWidget::on_threadEnableCheckBox_clicked()
|
||||
{
|
||||
this->ui->threadEnableCheckBox->setEnabled(false);
|
||||
this->ui->hotkeyCheckbox_1->setChecked(false);
|
||||
this->ui->hotkeyCheckbox_2->setChecked(false);
|
||||
this->ui->hotkeyCheckbox_3->setChecked(false);
|
||||
this->ui->hotkeyCheckbox_4->setChecked(false);
|
||||
this->ui->hotkeyCheckbox_5->setChecked(false);
|
||||
|
||||
QApplication::processEvents();
|
||||
|
||||
Q_ASSERT(!this->hotkey_4->isRegistered());
|
||||
Q_ASSERT(!this->hotkey_5->isRegistered());
|
||||
|
||||
if(checked) {
|
||||
this->hotkey_4->moveToThread(this->thread4);
|
||||
this->hotkey_5->moveToThread(this->thread5);
|
||||
} else {
|
||||
this->hotkey_4->moveToThread(this->thread());
|
||||
this->hotkey_5->moveToThread(this->thread());
|
||||
}
|
||||
this->hotkey_4->moveToThread(this->thread4);
|
||||
this->hotkey_5->moveToThread(this->thread5);
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ private slots:
|
||||
|
||||
void on_groupBox_toggled(bool checked);
|
||||
|
||||
void on_threadEnableCheckBox_clicked(bool checked);
|
||||
void on_threadEnableCheckBox_clicked();
|
||||
|
||||
private:
|
||||
Ui::HotTestWidget *ui;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="playTab">
|
||||
<attribute name="title">
|
||||
@@ -953,7 +953,13 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><span style=" font-weight:600;">Results so far:</span></p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" text-decoration: underline;">Windows:</span> Registering on multiple threads is possible, but: The thread that registered must unregister too and events will be send to the thread registered from, not the main thread</li></ul></body></html></string>
|
||||
<string><html><head/><body><p>
|
||||
<b>Results so far:</b></br>
|
||||
<ul>
|
||||
<li><u>Windows:</u> Registering on multiple threads is possible, but: The thread that registered must unregister too and events will be send to the thread registered from, not the main thread.</li>
|
||||
<li><u>Mac:</u> Works fine.</li>
|
||||
</ul>
|
||||
</p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
|
||||
Reference in New Issue
Block a user