thread test mac -> works :D

This commit is contained in:
Skycoder42
2016-02-06 17:47:53 +01:00
parent 2f31a06430
commit fc66c9229f
3 changed files with 15 additions and 11 deletions
+6 -8
View File
@@ -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);
}
+1 -1
View File
@@ -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;
+8 -2
View File
@@ -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>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Results so far:&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;&quot;&gt;&lt;li style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; text-decoration: underline;&quot;&gt;Windows:&lt;/span&gt; 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&lt;/li&gt;&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;
&lt;b&gt;Results so far:&lt;/b&gt;&lt;/br&gt;
&lt;ul&gt;
&lt;li&gt;&lt;u&gt;Windows:&lt;/u&gt; 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.&lt;/li&gt;
&lt;li&gt;&lt;u&gt;Mac:&lt;/u&gt; Works fine.&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>