|
|
@ -350,6 +350,10 @@ int MySettings::threadCount() const
|
|
|
|
QSettings setting;
|
|
|
|
QSettings setting;
|
|
|
|
setting.sync();
|
|
|
|
setting.sync();
|
|
|
|
int c = setting.value("threadCount", default_threadCount).toInt();
|
|
|
|
int c = setting.value("threadCount", default_threadCount).toInt();
|
|
|
|
|
|
|
|
// The old thread setting likely left many people with 0 in settings config file, which means
|
|
|
|
|
|
|
|
// we should reset it to the default going forward
|
|
|
|
|
|
|
|
if (c <= 0)
|
|
|
|
|
|
|
|
c = default_threadCount;
|
|
|
|
c = std::max(c, 1);
|
|
|
|
c = std::max(c, 1);
|
|
|
|
c = std::min(c, QThread::idealThreadCount());
|
|
|
|
c = std::min(c, QThread::idealThreadCount());
|
|
|
|
return c;
|
|
|
|
return c;
|
|
|
|