1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Update ignored schemes for saving history and icons

This commit is contained in:
David Rosca 2016-12-31 14:53:06 +01:00
parent 271d5f6555
commit 9b3fc5f404
3 changed files with 15 additions and 11 deletions

View File

@ -68,11 +68,15 @@ void History::addHistoryEntry(const QUrl &url, QString title)
if (!m_isSaving) {
return;
}
if (url.isEmpty() ||
url.scheme() == QLatin1String("qupzilla") ||
url.scheme() == QLatin1String("about") ||
url.scheme() == QLatin1String("data")
) {
const QStringList ignoredSchemes = {
QStringLiteral("qupzilla"),
QStringLiteral("view-source"),
QStringLiteral("data"),
QStringLiteral("about")
};
if (url.isEmpty() || ignoredSchemes.contains(url.scheme())) {
return;
}

View File

@ -235,7 +235,7 @@ QString LocationBar::convertUrlToText(const QUrl &url)
QString stringUrl = QzTools::urlEncodeQueryString(url);
if (stringUrl == QL1S("qupzilla:speeddial") || stringUrl.startsWith(QL1S("qupzilla:adblock")) || stringUrl == QL1S("about:blank")) {
if (stringUrl == QL1S("qupzilla:speeddial") || stringUrl == QL1S("about:blank")) {
stringUrl.clear();
}

View File

@ -58,13 +58,13 @@ void IconProvider::saveIcon(WebView* view)
QStringLiteral("qupzilla"),
QStringLiteral("ftp"),
QStringLiteral("file"),
QStringLiteral("view-source")
QStringLiteral("view-source"),
QStringLiteral("data"),
QStringLiteral("about")
};
for (const QString &scheme : ignoredSchemes) {
if (view->url().scheme() == scheme) {
return;
}
if (ignoredSchemes.contains(view->url().scheme())) {
return;
}
BufferedIcon item;