Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit 5fb5ce7f authored by Tagore Chandan Reddy's avatar Tagore Chandan Reddy Committed by Nate Graham

[KdePlasma-Addons/POTD/NOAA] Fixed RegEx string of landing page

Summary: 'Image of the day' has a new landing page everyday. This patch fixes the RegEx string that fetches the web address of the landing page.

Test Plan: All plugins should work as usual.

Reviewers: davidedmundson, ngraham

Reviewed By: davidedmundson, ngraham

Subscribers: ngraham, plasma-devel

Tags: #plasma

Differential Revision:
parent ff26a139
......@@ -58,11 +58,11 @@ void NOAAProvider::firstPageRequestFinished(KJob* _job)
// to use heavy weight QtWebkit. So we use QRegularExpression to capture
// the wanted url here.
QString url;
QRegularExpression re(QStringLiteral("href=\"(.*)\"><img alt=\"Latest Image of the Day"), QRegularExpression::MultilineOption);
QRegularExpression re(QStringLiteral("href=\".*\\/content\\/(.*)\"><img alt=\"Latest Image of the Day"), QRegularExpression::MultilineOption);
auto result = re.match(data);
if (result.hasMatch())
url = result.captured(1);
url = QStringLiteral("") + result.captured(1);
if (url.isEmpty())
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment