Merge pull request #3230 from Chocobo1/rss_sort_v320

Sort labels in RSS Downloader dialog
This commit is contained in:
sledgehammer999
2015-10-04 03:18:22 -05:00
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),
@@ -310,10 +311,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()