mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 23:07:59 +00:00
- Fix .qbittorrent folder not being created
This commit is contained in:
parent
b8a30be7bc
commit
a6207f70d5
@ -215,6 +215,11 @@ public:
|
||||
// return qBittorrent config path
|
||||
static QString qBittorrentPath() {
|
||||
QString qBtPath = QDir::homePath()+QDir::separator()+QString::fromUtf8(".qbittorrent") + QDir::separator();
|
||||
// Create dir if it does not exist
|
||||
if(!QFile::exists(qBtPath)){
|
||||
QDir dir(qBtPath);
|
||||
dir.mkpath(qBtPath);
|
||||
}
|
||||
return qBtPath;
|
||||
}
|
||||
|
||||
|
@ -199,6 +199,7 @@ public:
|
||||
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
|
||||
settings.beginGroup(QString::fromUtf8("TransferListFilters"));
|
||||
QStringList customLabels = settings.value("customLabels", QStringList()).toStringList();
|
||||
comboLabel->addItem("");
|
||||
foreach(const QString& label, customLabels) {
|
||||
comboLabel->addItem(label);
|
||||
}
|
||||
@ -327,6 +328,7 @@ public slots:
|
||||
}
|
||||
// Save savepath
|
||||
TorrentTempData::setSavePath(hash, savePath.path());
|
||||
qDebug("Torrent label is: %s", comboLabel->currentText().trimmed().toLocal8Bit().data());
|
||||
TorrentTempData::setLabel(hash, comboLabel->currentText().trimmed());
|
||||
// Save last dir to remember it
|
||||
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
|
||||
|
@ -354,6 +354,7 @@ protected slots:
|
||||
--nb_labeled;
|
||||
}
|
||||
--nb_torrents;
|
||||
qDebug("nb_torrents: %d, nb_labeled: %d", nb_torrents, nb_labeled);
|
||||
Q_ASSERT(nb_torrents >= 0);
|
||||
Q_ASSERT(nb_labeled >= 0);
|
||||
Q_ASSERT(nb_labeled <= nb_torrents);
|
||||
|
@ -145,6 +145,12 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
|
Loading…
Reference in New Issue
Block a user