mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
WebView: Only show source code action on supported schemes
This commit is contained in:
parent
6241e8d37f
commit
954cfeefd6
|
@ -783,7 +783,12 @@ void WebView::createPageContextMenu(QMenu* menu)
|
|||
menu->addSeparator();
|
||||
menu->addAction(QIcon::fromTheme("edit-select-all"), tr("Select &all"), this, SLOT(editSelectAll()));
|
||||
menu->addSeparator();
|
||||
menu->addAction(QIcon::fromTheme("text-html"), tr("Show so&urce code"), this, SLOT(showSource()));
|
||||
|
||||
const QString scheme = url().scheme();
|
||||
|
||||
if (scheme != QL1S("view-source") && WebPage::internalSchemes().contains(scheme)) {
|
||||
menu->addAction(QIcon::fromTheme("text-html"), tr("Show so&urce code"), this, SLOT(showSource()));
|
||||
}
|
||||
|
||||
if (SiteInfo::canShowSiteInfo(url()))
|
||||
menu->addAction(QIcon::fromTheme("dialog-information"), tr("Show info ab&out site"), this, SLOT(showSiteInfo()));
|
||||
|
|
Loading…
Reference in New Issue
Block a user