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
10 changed files with 20 additions and 18 deletions

View File

@@ -43,7 +43,6 @@
#include "base/net/downloadhandler.h"
#include "base/net/downloadmanager.h"
#include "base/utils/fs.h"
#include "base/utils/misc.h"
#include "autoexpandabledialog.h"
#include "guiiconprovider.h"
#include "pluginsourcedialog.h"
@@ -337,7 +336,7 @@ void PluginSelectDialog::askForPluginUrl()
bool ok = false;
QString clipTxt = qApp->clipboard()->text();
QString defaultUrl = "http://";
if (Utils::Misc::isUrl(clipTxt) && clipTxt.endsWith(".py"))
if (Net::DownloadManager::hasSupportedScheme(clipTxt) && clipTxt.endsWith(".py"))
defaultUrl = clipTxt;
QString url = AutoExpandableDialog::getText(
this, tr("New search engine plugin URL"),