mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
Fixed finding on google in locationbar, sometimes it just loads empty
google page instead of search results
This commit is contained in:
parent
28bfa1e549
commit
8b4ae53b71
@ -92,7 +92,10 @@ void LocationBar::urlEnter()
|
||||
{
|
||||
m_webView->setFocus();
|
||||
QUrl guessedUrl = WebView::guessUrlFromString(text());
|
||||
m_webView->load(guessedUrl);
|
||||
if (guessedUrl.isEmpty())
|
||||
m_webView->load(QUrl(text()));
|
||||
else
|
||||
m_webView->load(guessedUrl);
|
||||
setText(guessedUrl.toString());
|
||||
}
|
||||
|
||||
|
@ -245,7 +245,7 @@ int TabWidget::addView(QUrl url, const QString &title, OpenUrlIn openIn, bool se
|
||||
connect(webView, SIGNAL(ipChanged(QString)), p_QupZilla->ipLabel(), SLOT(setText(QString)));
|
||||
|
||||
if (url.isValid())
|
||||
webView->setUrl(url);
|
||||
webView->load(url);
|
||||
|
||||
if (selectLine)
|
||||
p_QupZilla->locationBar()->setFocus();
|
||||
@ -394,7 +394,7 @@ void TabWidget::restoreClosedTab()
|
||||
QDataStream historyStream(tab.history);
|
||||
historyStream >> *weView(index)->history();
|
||||
|
||||
weView(index)->setUrl(tab.url);
|
||||
weView(index)->load(tab.url);
|
||||
}
|
||||
|
||||
void TabWidget::restoreAllClosedTabs()
|
||||
@ -408,7 +408,7 @@ void TabWidget::restoreAllClosedTabs()
|
||||
QDataStream historyStream(tab.history);
|
||||
historyStream >> *weView(index)->history();
|
||||
|
||||
weView(index)->setUrl(tab.url);
|
||||
weView(index)->load(tab.url);
|
||||
}
|
||||
m_closedTabsManager->clearList();
|
||||
}
|
||||
@ -495,7 +495,7 @@ void TabWidget::restorePinnedTabs()
|
||||
addedIndex= addView(QUrl());
|
||||
QDataStream historyStream(historyState);
|
||||
historyStream >> *weView(addedIndex)->history();
|
||||
weView(addedIndex)->setUrl(url);
|
||||
weView(addedIndex)->load(url);
|
||||
} else {
|
||||
addedIndex = addView(url);
|
||||
}
|
||||
@ -564,7 +564,7 @@ bool TabWidget::restoreState(const QByteArray &state)
|
||||
int index = addView(QUrl());
|
||||
QDataStream historyStream(historyState);
|
||||
historyStream >> *weView(index)->history();
|
||||
weView(index)->setUrl(url);
|
||||
weView(index)->load(url);
|
||||
} else {
|
||||
addView(url);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user