mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
SSL Certficate Error is now shown in non-blocking javascript prompt
This commit is contained in:
parent
f370877bda
commit
74d146ead6
BIN
src/icon.ico
BIN
src/icon.ico
Binary file not shown.
Before Width: | Height: | Size: 9.4 KiB |
@ -215,7 +215,7 @@ void LocationBar::setPrivacy(bool state)
|
||||
void LocationBar::focusOutEvent(QFocusEvent* e)
|
||||
{
|
||||
QLineEdit::focusOutEvent(e);
|
||||
if (!selectedText().isEmpty() && e->reason() != Qt::TabFocusReason)
|
||||
if (!selectedText().isEmpty() && e->reason() != Qt::TabFocusReason)
|
||||
return;
|
||||
setCursorPosition(0);
|
||||
hideGoButton();
|
||||
@ -232,7 +232,7 @@ void LocationBar::dropEvent(QDropEvent* event)
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (event->mimeData()->hasText()) {
|
||||
else if (event->mimeData()->hasText()) {
|
||||
QUrl dropUrl = QUrl(event->mimeData()->text());
|
||||
if (WebView::isUrlValid(dropUrl)) {
|
||||
setText(dropUrl.toString());
|
||||
|
@ -90,6 +90,13 @@ void NetworkManager::sslError(QNetworkReply* reply, QList<QSslError> errors)
|
||||
reply->ignoreSslErrors(errors);
|
||||
return;
|
||||
}
|
||||
|
||||
QNetworkRequest request = reply->request();
|
||||
QVariant v = request.attribute((QNetworkRequest::Attribute)(QNetworkRequest::User + 100));
|
||||
WebPage* webPage = (WebPage*)(v.value<void*>());
|
||||
if (!webPage)
|
||||
return;
|
||||
|
||||
QString title = tr("SSL Certificate Error!");
|
||||
QString text1 = tr("The page you trying to access has following errors in SSL Certificate:");
|
||||
|
||||
@ -112,9 +119,11 @@ void NetworkManager::sslError(QNetworkReply* reply, QList<QSslError> errors)
|
||||
QString message = QString(QLatin1String("<b>%1</b><p>%2</p><ul><li>%3</li></ul><p>%4</p>")).arg(title, text1, actions.join(QLatin1String("</li><li>")), text2);
|
||||
|
||||
if (!actions.isEmpty()) {
|
||||
QMessageBox::StandardButton button = QMessageBox::critical(p_QupZilla, tr("SSL Certificate Error"),
|
||||
message, QMessageBox::Yes | QMessageBox::No);
|
||||
if (button != QMessageBox::Yes)
|
||||
// QMessageBox::StandardButton button = QMessageBox::critical(p_QupZilla, tr("SSL Certificate Error"),
|
||||
// message, QMessageBox::Yes | QMessageBox::No);
|
||||
// if (button != QMessageBox::Yes)
|
||||
// return;
|
||||
if (!webPage->javaScriptConfirm(webPage->mainFrame(), message))
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ void ButtonWithMenu::removeItem(const Item &item)
|
||||
m_items.removeOne(item);
|
||||
|
||||
if (*m_currentItem == item)
|
||||
setActiveItem(m_items.takeFirst());
|
||||
setActiveItem(m_items.first());
|
||||
|
||||
generateMenu();
|
||||
}
|
||||
|
@ -24,10 +24,8 @@ void ClosedTabsManager::saveView(WebView* view)
|
||||
ClosedTabsManager::Tab ClosedTabsManager::getFirstClosedTab()
|
||||
{
|
||||
Tab tab;
|
||||
if (m_closedTabs.count() > 0) {
|
||||
if (m_closedTabs.count() > 0)
|
||||
tab = m_closedTabs.takeFirst();
|
||||
m_closedTabs.removeOne(tab);
|
||||
}
|
||||
|
||||
return tab;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user