CollectionSettingsPage: Remove settings for IO and thread priority and workers
This commit is contained in:
parent
c1465a890f
commit
9bb051b4eb
|
@ -23,7 +23,6 @@
|
|||
|
||||
#include <limits>
|
||||
|
||||
#include <QThread>
|
||||
#include <QStandardPaths>
|
||||
#include <QAbstractItemModel>
|
||||
#include <QItemSelectionModel>
|
||||
|
@ -84,16 +83,6 @@ CollectionSettingsPage::CollectionSettingsPage(SettingsDialog *dialog, QWidget *
|
|||
ui_->combobox_disk_cache_size->addItem("MB", static_cast<int>(CacheSizeUnit::MB));
|
||||
ui_->combobox_disk_cache_size->addItem("GB", static_cast<int>(CacheSizeUnit::GB));
|
||||
|
||||
ui_->combobox_iopriority->addItem("Auto", static_cast<int>(Utilities::IoPriority::IOPRIO_CLASS_NONE));
|
||||
ui_->combobox_iopriority->addItem("Realtime", static_cast<int>(Utilities::IoPriority::IOPRIO_CLASS_RT));
|
||||
ui_->combobox_iopriority->addItem("Best effort", static_cast<int>(Utilities::IoPriority::IOPRIO_CLASS_BE));
|
||||
ui_->combobox_iopriority->addItem("Idle", static_cast<int>(Utilities::IoPriority::IOPRIO_CLASS_IDLE));
|
||||
|
||||
ui_->combobox_threadpriority->addItem("Idle", QThread::Priority::IdlePriority);
|
||||
ui_->combobox_threadpriority->addItem("Lowest", QThread::Priority::LowestPriority);
|
||||
ui_->combobox_threadpriority->addItem("Low", QThread::Priority::LowPriority);
|
||||
ui_->combobox_threadpriority->addItem("Normal", QThread::Priority::NormalPriority);
|
||||
|
||||
QObject::connect(ui_->add, &QPushButton::clicked, this, &CollectionSettingsPage::Add);
|
||||
QObject::connect(ui_->remove, &QPushButton::clicked, this, &CollectionSettingsPage::Remove);
|
||||
|
||||
|
@ -251,18 +240,6 @@ void CollectionSettingsPage::Load() {
|
|||
ui_->checkbox_delete_files->hide();
|
||||
#endif
|
||||
|
||||
#ifndef Q_OS_WIN32
|
||||
ui_->combobox_iopriority->setCurrentIndex(ui_->combobox_iopriority->findData(s.value("io_priority", static_cast<int>(Utilities::IoPriority::IOPRIO_CLASS_IDLE)).toInt()));
|
||||
#endif
|
||||
|
||||
ui_->combobox_threadpriority->setCurrentIndex(ui_->combobox_threadpriority->findData(s.value("thread_priority", QThread::Priority::IdlePriority).toInt()));
|
||||
|
||||
int workers = s.value("tagreader_workers", qBound(1, QThread::idealThreadCount() / 2, 4)).toInt();
|
||||
if (workers <= 0 || workers > 4) {
|
||||
workers = 4;
|
||||
}
|
||||
ui_->spinbox_tagreaderworkers->setValue(workers);
|
||||
|
||||
s.endGroup();
|
||||
|
||||
DiskCacheEnable(ui_->checkbox_disk_cache->checkState());
|
||||
|
@ -327,13 +304,6 @@ void CollectionSettingsPage::Save() {
|
|||
|
||||
s.setValue("delete_files", ui_->checkbox_delete_files->isChecked());
|
||||
|
||||
#ifndef Q_OS_WIN32
|
||||
s.setValue("io_priority", ui_->combobox_iopriority->currentData().toInt());
|
||||
#endif
|
||||
|
||||
s.setValue("thread_priority", ui_->combobox_threadpriority->currentData().toInt());
|
||||
s.setValue("tagreader_workers", ui_->spinbox_tagreaderworkers->value());
|
||||
|
||||
s.endGroup();
|
||||
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>516</width>
|
||||
<height>1513</height>
|
||||
<width>519</width>
|
||||
<height>1546</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -608,86 +608,6 @@ If there are no matches then it will use the largest image in the directory.</st
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupbox_advanced">
|
||||
<property name="title">
|
||||
<string>Advanced</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<layout class="QFormLayout" name="layout_advanced">
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="combobox_threadpriority">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="combobox_iopriority">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QSpinBox" name="spinbox_tagreaderworkers">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>4</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_tagreaderworkers">
|
||||
<property name="text">
|
||||
<string>Tagreader workers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_threadpriority">
|
||||
<property name="text">
|
||||
<string>Thread priority</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_iopriority">
|
||||
<property name="text">
|
||||
<string>I/O priority</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_advanced">
|
||||
<property name="text">
|
||||
<string>Advanced settings require restart.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
|
|
Loading…
Reference in New Issue