Fix: Adding RSS rule with a new label doesn't add this label to UI.

This commit is contained in:
Nick Tiskov
2015-08-31 01:49:52 +03:00
committed by sledgehammer999
parent 87092e2716
commit c8b74215c0
6 changed files with 16 additions and 2 deletions

View File

@@ -1605,6 +1605,13 @@ void Preferences::setTorrentLabels(const QStringList& labels)
setValue("TransferListFilters/customLabels", labels);
}
void Preferences::addTorrentLabelExternal(const QString &label)
{
addTorrentLabel(label);
QString toEmit = label;
emit externalLabelAdded(toEmit);
}
void Preferences::addTorrentLabel(const QString& label)
{
QStringList labels = value("TransferListFilters/customLabels").toStringList();

View File

@@ -113,6 +113,7 @@ private:
signals:
void changed();
void externalLabelAdded(QString&);
public slots:
void save();
@@ -403,6 +404,7 @@ public:
#endif
QStringList getTorrentLabels() const;
void setTorrentLabels(const QStringList& labels);
void addTorrentLabelExternal(const QString &label);
void addTorrentLabel(const QString& label);
void removeTorrentLabel(const QString& label);
bool recursiveDownloadDisabled() const;