diff --git a/src/misc.h b/src/misc.h index 80ecf3284..0cbc41630 100644 --- a/src/misc.h +++ b/src/misc.h @@ -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; } diff --git a/src/torrentadditiondlg.h b/src/torrentadditiondlg.h index 6fb1b4af3..801d1d05a 100644 --- a/src/torrentadditiondlg.h +++ b/src/torrentadditiondlg.h @@ -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")); diff --git a/src/transferlistfilterswidget.h b/src/transferlistfilterswidget.h index a7478d68e..a0745fbac 100644 --- a/src/transferlistfilterswidget.h +++ b/src/transferlistfilterswidget.h @@ -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); diff --git a/src/ui/torrentadditiondlg.ui b/src/ui/torrentadditiondlg.ui index 245ce30e4..f3a4ff3f5 100644 --- a/src/ui/torrentadditiondlg.ui +++ b/src/ui/torrentadditiondlg.ui @@ -145,6 +145,12 @@ + + + 180 + 0 + + 16777215