Browse Source

Update RSS Classes

adaptive-webui-19844
Nick Tiskov 11 years ago
parent
commit
ae8356aae5
  1. 4
      src/rss/automatedrssdownloader.cpp
  2. 2
      src/rss/rssdownloadrule.cpp
  3. 1
      src/rss/rssmanager.cpp
  4. 2
      src/rss/rssparser.cpp

4
src/rss/automatedrssdownloader.cpp

@ -225,7 +225,7 @@ void AutomatedRssDownloader::updateRuleDefinitionBox()
ui->lineContains->setText(rule->mustContain()); ui->lineContains->setText(rule->mustContain());
ui->lineNotContains->setText(rule->mustNotContain()); ui->lineNotContains->setText(rule->mustNotContain());
ui->saveDiffDir_check->setChecked(!rule->savePath().isEmpty()); ui->saveDiffDir_check->setChecked(!rule->savePath().isEmpty());
ui->lineSavePath->setText(rule->savePath()); ui->lineSavePath->setText(fsutils::toNativePath(rule->savePath()));
ui->checkRegex->setChecked(rule->useRegex()); ui->checkRegex->setChecked(rule->useRegex());
if (rule->label().isEmpty()) { if (rule->label().isEmpty()) {
ui->comboLabel->setCurrentIndex(-1); ui->comboLabel->setCurrentIndex(-1);
@ -362,7 +362,7 @@ void AutomatedRssDownloader::on_browseSP_clicked()
{ {
QString save_path = QFileDialog::getExistingDirectory(this, tr("Destination directory"), QDir::homePath()); QString save_path = QFileDialog::getExistingDirectory(this, tr("Destination directory"), QDir::homePath());
if (!save_path.isEmpty()) if (!save_path.isEmpty())
ui->lineSavePath->setText(save_path); ui->lineSavePath->setText(fsutils::toNativePath(save_path));
} }
void AutomatedRssDownloader::on_exportBtn_clicked() void AutomatedRssDownloader::on_exportBtn_clicked()

2
src/rss/rssdownloadrule.cpp

@ -113,7 +113,7 @@ bool RssDownloadRule::operator==(const RssDownloadRule &other) const {
void RssDownloadRule::setSavePath(const QString &save_path) void RssDownloadRule::setSavePath(const QString &save_path)
{ {
if (!save_path.isEmpty() && QDir(save_path) != QDir(Preferences().getSavePath())) if (!save_path.isEmpty() && QDir(save_path) != QDir(Preferences().getSavePath()))
m_savePath = save_path; m_savePath = fsutils::fromNativePath(save_path);
else else
m_savePath = QString(); m_savePath = QString();
} }

1
src/rss/rssmanager.cpp

@ -147,6 +147,7 @@ void RssManager::saveStreamList() const
QStringList aliases; QStringList aliases;
RssFeedList streams = getAllFeeds(); RssFeedList streams = getAllFeeds();
foreach (const RssFeedPtr& stream, streams) { foreach (const RssFeedPtr& stream, streams) {
// This backslash has nothing to do with path handling
QString stream_path = stream->pathHierarchy().join("\\"); QString stream_path = stream->pathHierarchy().join("\\");
if (stream_path.isNull()) if (stream_path.isNull())
stream_path = ""; stream_path = "";

2
src/rss/rssparser.cpp

@ -214,7 +214,7 @@ void RssParser::parseRssFile(const QString& feedUrl, const QString& filePath)
{ {
qDebug() << Q_FUNC_INFO << feedUrl << filePath; qDebug() << Q_FUNC_INFO << feedUrl << filePath;
m_mutex.lock(); m_mutex.lock();
ParsingJob job = {feedUrl, filePath}; ParsingJob job = { feedUrl, fsutils::fromNativePath(filePath) };
m_queue.enqueue(job); m_queue.enqueue(job);
// Wake up thread. // Wake up thread.
if (m_queue.count() == 1) { if (m_queue.count() == 1) {

Loading…
Cancel
Save