Sort labels in RSS Downloader dialog, closes #3140.

This commit is contained in:
Chocobo1
2015-06-16 01:23:33 +08:00
parent 1da29a450c
commit 176dd0bee8
3 changed files with 99 additions and 6 deletions

View File

@@ -43,6 +43,7 @@
#include "iconprovider.h"
#include "autoexpandabledialog.h"
#include "fs_utils.h"
#include "misc.h"
AutomatedRssDownloader::AutomatedRssDownloader(const QWeakPointer<RssManager>& manager, QWidget *parent) :
QDialog(parent),
@@ -308,10 +309,10 @@ RssDownloadRulePtr AutomatedRssDownloader::getCurrentRule() const
void AutomatedRssDownloader::initLabelCombobox()
{
// Load custom labels
const QStringList customLabels = Preferences::instance()->getTorrentLabels();
foreach (const QString& label, customLabels) {
ui->comboLabel->addItem(label);
}
QStringList customLabels = Preferences::instance()->getTorrentLabels();
std::sort(customLabels.begin(), customLabels.end(), misc::NaturalCompare());
foreach (const QString& l, customLabels)
ui->comboLabel->addItem(l);
}
void AutomatedRssDownloader::saveEditedRule()