Move Utils::Misc::isUrl() function

All usage of this function gets to call Net::DownloadManager eventually.
This commit is contained in:
Chocobo1 2018-12-29 20:38:51 +08:00
parent 6759446639
commit 2b903fc3d1
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
10 changed files with 20 additions and 18 deletions

View file

@ -414,14 +414,6 @@ QList<bool> Utils::Misc::boolListfromStringList(const QStringList &l)
return ret;
}
bool Utils::Misc::isUrl(const QString &s)
{
static const QRegularExpression reURLScheme(
"http[s]?|ftp", QRegularExpression::CaseInsensitiveOption);
return reURLScheme.match(QUrl(s).scheme()).hasMatch();
}
QString Utils::Misc::parseHtmlLinks(const QString &rawText)
{
QString result = rawText;