disable debug code
This commit is contained in:
parent
c45a9db5ab
commit
a9b0b1ef95
|
@ -36,11 +36,11 @@ else {
|
|||
|
||||
$is_qt_6 = $qt_version.StartsWith("6")
|
||||
|
||||
$maria_version = "11.1.2"
|
||||
$maria_version = "11.2.2"
|
||||
$maria_link = "https://archive.mariadb.org/mariadb-$maria_version/winx64-packages/mariadb-$maria_version-winx64.zip"
|
||||
$maria_output = "maria.zip"
|
||||
|
||||
$cmake_version = "3.27.7"
|
||||
$cmake_version = "3.27.9"
|
||||
$cmake_link = "https://github.com/Kitware/CMake/releases/download/v$cmake_version/cmake-$cmake_version-windows-x86_64.zip"
|
||||
$cmake_output = "cmake.zip"
|
||||
|
||||
|
|
|
@ -275,7 +275,7 @@ QString WebFactory::limitSizeOfHtmlImages(const QString& html, int desired_width
|
|||
QString my_html = html;
|
||||
QElapsedTimer tmr;
|
||||
|
||||
IOFactory::writeFile("a.html", html.toUtf8());
|
||||
// IOFactory::writeFile("a.html", html.toUtf8());
|
||||
|
||||
tmr.start();
|
||||
|
||||
|
@ -359,7 +359,7 @@ QString WebFactory::limitSizeOfHtmlImages(const QString& html, int desired_width
|
|||
match_offset = exp_match.capturedStart() + img_reconstructed.size();
|
||||
}
|
||||
|
||||
IOFactory::writeFile("b.html", my_html.toUtf8());
|
||||
// IOFactory::writeFile("b.html", my_html.toUtf8());
|
||||
|
||||
qDebugNN << LOGSEC_GUI << "HTML image resizing took" << NONQUOTE_W_SPACE(tmr.elapsed()) << "miliseconds.";
|
||||
return my_html;
|
||||
|
|
|
@ -144,7 +144,7 @@ FormDiscoverFeeds::~FormDiscoverFeeds() {
|
|||
QList<StandardFeed*> FormDiscoverFeeds::discoverFeedsWithParser(const FeedParser* parser,
|
||||
const QString& url,
|
||||
bool greedy) {
|
||||
auto feeds = parser->discoverFeeds(m_serviceRoot, url, greedy);
|
||||
auto feeds = parser->discoverFeeds(m_serviceRoot, QUrl::fromUserInput(url), greedy);
|
||||
QPixmap icon;
|
||||
int timeout = qApp->settings()->value(GROUP(Feeds), SETTING(Feeds::UpdateTimeout)).toInt();
|
||||
|
||||
|
|
|
@ -26,7 +26,11 @@ AtomParser::AtomParser(const QString& data) : FeedParser(data) {
|
|||
AtomParser::~AtomParser() {}
|
||||
|
||||
QList<StandardFeed*> AtomParser::discoverFeeds(ServiceRoot* root, const QUrl& url, bool greedy) const {
|
||||
Q_UNUSED(greedy)
|
||||
auto base_result = FeedParser::discoverFeeds(root, url, greedy);
|
||||
|
||||
if (!base_result.isEmpty()) {
|
||||
return base_result;
|
||||
}
|
||||
|
||||
QString my_url = url.toString();
|
||||
QList<StandardFeed*> feeds;
|
||||
|
|
|
@ -43,9 +43,27 @@ FeedParser::~FeedParser() {}
|
|||
|
||||
QList<StandardFeed*> FeedParser::discoverFeeds(ServiceRoot* root, const QUrl& url, bool greedy) const {
|
||||
Q_UNUSED(root)
|
||||
Q_UNUSED(url)
|
||||
Q_UNUSED(greedy)
|
||||
|
||||
if (url.isLocalFile()) {
|
||||
QString file_path = url.toLocalFile();
|
||||
|
||||
if (QFile::exists(file_path)) {
|
||||
try {
|
||||
// 1.
|
||||
auto guessed_feed = guessFeed(IOFactory::readFile(file_path), {});
|
||||
|
||||
guessed_feed.first->setSourceType(StandardFeed::SourceType::LocalFile);
|
||||
guessed_feed.first->setSource(file_path);
|
||||
|
||||
return {guessed_feed.first};
|
||||
}
|
||||
catch (...) {
|
||||
qDebugNN << LOGSEC_CORE << QUOTE_W_SPACE(file_path) << "is not a local feed file.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,11 @@ JsonParser::JsonParser(const QString& data) : FeedParser(data, false) {}
|
|||
JsonParser::~JsonParser() {}
|
||||
|
||||
QList<StandardFeed*> JsonParser::discoverFeeds(ServiceRoot* root, const QUrl& url, bool greedy) const {
|
||||
Q_UNUSED(greedy)
|
||||
auto base_result = FeedParser::discoverFeeds(root, url, greedy);
|
||||
|
||||
if (!base_result.isEmpty()) {
|
||||
return base_result;
|
||||
}
|
||||
|
||||
QString my_url = url.toString();
|
||||
QList<StandardFeed*> feeds;
|
||||
|
|
|
@ -19,7 +19,11 @@ RdfParser::RdfParser(const QString& data)
|
|||
RdfParser::~RdfParser() {}
|
||||
|
||||
QList<StandardFeed*> RdfParser::discoverFeeds(ServiceRoot* root, const QUrl& url, bool greedy) const {
|
||||
Q_UNUSED(greedy)
|
||||
auto base_result = FeedParser::discoverFeeds(root, url, greedy);
|
||||
|
||||
if (!base_result.isEmpty()) {
|
||||
return base_result;
|
||||
}
|
||||
|
||||
QString my_url = url.toString();
|
||||
QList<StandardFeed*> feeds;
|
||||
|
|
|
@ -19,7 +19,11 @@ RssParser::RssParser(const QString& data) : FeedParser(data) {}
|
|||
RssParser::~RssParser() {}
|
||||
|
||||
QList<StandardFeed*> RssParser::discoverFeeds(ServiceRoot* root, const QUrl& url, bool greedy) const {
|
||||
Q_UNUSED(greedy)
|
||||
auto base_result = FeedParser::discoverFeeds(root, url, greedy);
|
||||
|
||||
if (!base_result.isEmpty()) {
|
||||
return base_result;
|
||||
}
|
||||
|
||||
QString my_url = url.toString();
|
||||
QList<StandardFeed*> feeds;
|
||||
|
|
|
@ -22,7 +22,20 @@ SitemapParser::SitemapParser(const QString& data) : FeedParser(data) {}
|
|||
SitemapParser::~SitemapParser() {}
|
||||
|
||||
QList<StandardFeed*> SitemapParser::discoverFeeds(ServiceRoot* root, const QUrl& url, bool greedy) const {
|
||||
auto base_result = FeedParser::discoverFeeds(root, url, greedy);
|
||||
QHash<QString, StandardFeed*> feeds;
|
||||
|
||||
if (!base_result.isEmpty()) {
|
||||
if (greedy) {
|
||||
for (StandardFeed* base_fd : base_result) {
|
||||
feeds.insert(base_fd->source(), base_fd);
|
||||
}
|
||||
}
|
||||
else {
|
||||
return base_result;
|
||||
}
|
||||
}
|
||||
|
||||
QStringList to_process_sitemaps;
|
||||
int sitemap_index_limit = 2;
|
||||
int timeout = qApp->settings()->value(GROUP(Feeds), SETTING(Feeds::UpdateTimeout)).toInt();
|
||||
|
|
Loading…
Reference in New Issue