GUI: Show ideal thread count next to current thread count.
Ideal thread count is determined by Qt as number of available cores. Ticket: #2194 (Automatically match thread count to available cores)
This commit is contained in:
parent
e8b81f909d
commit
46c03973ee
|
@ -103,6 +103,20 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>Ideal count:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="mLblIdealThreads">
|
||||||
|
<property name="text">
|
||||||
|
<string>TextLabel</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer">
|
<spacer name="horizontalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#include <QTabWidget>
|
#include <QTabWidget>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
|
#include <QThread>
|
||||||
#include "settingsdialog.h"
|
#include "settingsdialog.h"
|
||||||
#include "applicationdialog.h"
|
#include "applicationdialog.h"
|
||||||
#include "applicationlist.h"
|
#include "applicationlist.h"
|
||||||
|
@ -70,6 +71,12 @@ SettingsDialog::SettingsDialog(QSettings *programSettings,
|
||||||
mUI.mListWidget->setSortingEnabled(false);
|
mUI.mListWidget->setSortingEnabled(false);
|
||||||
PopulateListWidget();
|
PopulateListWidget();
|
||||||
|
|
||||||
|
const int count = QThread::idealThreadCount();
|
||||||
|
if (count != -1)
|
||||||
|
mUI.mLblIdealThreads->setText(QString::number(count));
|
||||||
|
else
|
||||||
|
mUI.mLblIdealThreads->setText(tr("N/A"));
|
||||||
|
|
||||||
LoadSettings();
|
LoadSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue