mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-13 01:57:07 -07:00
Simplify the code a bit now that QIniSettings uses qBittorrent / qBittorrent by default
This commit is contained in:
parent
6c753ac183
commit
da3406b811
18 changed files with 52 additions and 52 deletions
|
@ -185,7 +185,7 @@ inline QModelIndex TransferListWidget::mapFromSource(const QModelIndex &index) c
|
|||
|
||||
|
||||
QStringList TransferListWidget::getCustomLabels() const {
|
||||
QIniSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
|
||||
QIniSettings settings;
|
||||
return settings.value("TransferListFilters/customLabels", QStringList()).toStringList();
|
||||
}
|
||||
|
||||
|
@ -900,13 +900,13 @@ void TransferListWidget::applyStatusFilter(int f) {
|
|||
|
||||
void TransferListWidget::saveSettings()
|
||||
{
|
||||
QIniSettings settings("qBittorrent", "qBittorrent");
|
||||
QIniSettings settings;
|
||||
settings.setValue("TransferList/HeaderState", header()->saveState());
|
||||
}
|
||||
|
||||
bool TransferListWidget::loadSettings()
|
||||
{
|
||||
QIniSettings settings("qBittorrent", "qBittorrent");
|
||||
QIniSettings settings;
|
||||
bool ok = header()->restoreState(settings.value("TransferList/HeaderState").toByteArray());
|
||||
if (!ok) {
|
||||
header()->resizeSection(0, 200); // Default
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue