From ae8356aae5d0387bed2d6ce1c039fa0468317398 Mon Sep 17 00:00:00 2001 From: Nick Tiskov Date: Sun, 10 Nov 2013 23:24:44 +0400 Subject: [PATCH] Update RSS Classes --- src/rss/automatedrssdownloader.cpp | 4 ++-- src/rss/rssdownloadrule.cpp | 2 +- src/rss/rssmanager.cpp | 1 + src/rss/rssparser.cpp | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/rss/automatedrssdownloader.cpp b/src/rss/automatedrssdownloader.cpp index 7a64cf319..4b30e75c5 100644 --- a/src/rss/automatedrssdownloader.cpp +++ b/src/rss/automatedrssdownloader.cpp @@ -225,7 +225,7 @@ void AutomatedRssDownloader::updateRuleDefinitionBox() ui->lineContains->setText(rule->mustContain()); ui->lineNotContains->setText(rule->mustNotContain()); ui->saveDiffDir_check->setChecked(!rule->savePath().isEmpty()); - ui->lineSavePath->setText(rule->savePath()); + ui->lineSavePath->setText(fsutils::toNativePath(rule->savePath())); ui->checkRegex->setChecked(rule->useRegex()); if (rule->label().isEmpty()) { ui->comboLabel->setCurrentIndex(-1); @@ -362,7 +362,7 @@ void AutomatedRssDownloader::on_browseSP_clicked() { QString save_path = QFileDialog::getExistingDirectory(this, tr("Destination directory"), QDir::homePath()); if (!save_path.isEmpty()) - ui->lineSavePath->setText(save_path); + ui->lineSavePath->setText(fsutils::toNativePath(save_path)); } void AutomatedRssDownloader::on_exportBtn_clicked() diff --git a/src/rss/rssdownloadrule.cpp b/src/rss/rssdownloadrule.cpp index 27f0bdb18..12ac47651 100644 --- a/src/rss/rssdownloadrule.cpp +++ b/src/rss/rssdownloadrule.cpp @@ -113,7 +113,7 @@ bool RssDownloadRule::operator==(const RssDownloadRule &other) const { void RssDownloadRule::setSavePath(const QString &save_path) { if (!save_path.isEmpty() && QDir(save_path) != QDir(Preferences().getSavePath())) - m_savePath = save_path; + m_savePath = fsutils::fromNativePath(save_path); else m_savePath = QString(); } diff --git a/src/rss/rssmanager.cpp b/src/rss/rssmanager.cpp index d6f580171..2f6f3e3a1 100644 --- a/src/rss/rssmanager.cpp +++ b/src/rss/rssmanager.cpp @@ -147,6 +147,7 @@ void RssManager::saveStreamList() const QStringList aliases; RssFeedList streams = getAllFeeds(); foreach (const RssFeedPtr& stream, streams) { + // This backslash has nothing to do with path handling QString stream_path = stream->pathHierarchy().join("\\"); if (stream_path.isNull()) stream_path = ""; diff --git a/src/rss/rssparser.cpp b/src/rss/rssparser.cpp index 9263e0d2e..50989cbbe 100644 --- a/src/rss/rssparser.cpp +++ b/src/rss/rssparser.cpp @@ -214,7 +214,7 @@ void RssParser::parseRssFile(const QString& feedUrl, const QString& filePath) { qDebug() << Q_FUNC_INFO << feedUrl << filePath; m_mutex.lock(); - ParsingJob job = {feedUrl, filePath}; + ParsingJob job = { feedUrl, fsutils::fromNativePath(filePath) }; m_queue.enqueue(job); // Wake up thread. if (m_queue.count() == 1) {