mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-13 10:32:11 +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();
|
m_webView->setFocus();
|
||||||
QUrl guessedUrl = WebView::guessUrlFromString(text());
|
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());
|
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)));
|
connect(webView, SIGNAL(ipChanged(QString)), p_QupZilla->ipLabel(), SLOT(setText(QString)));
|
||||||
|
|
||||||
if (url.isValid())
|
if (url.isValid())
|
||||||
webView->setUrl(url);
|
webView->load(url);
|
||||||
|
|
||||||
if (selectLine)
|
if (selectLine)
|
||||||
p_QupZilla->locationBar()->setFocus();
|
p_QupZilla->locationBar()->setFocus();
|
||||||
|
@ -394,7 +394,7 @@ void TabWidget::restoreClosedTab()
|
||||||
QDataStream historyStream(tab.history);
|
QDataStream historyStream(tab.history);
|
||||||
historyStream >> *weView(index)->history();
|
historyStream >> *weView(index)->history();
|
||||||
|
|
||||||
weView(index)->setUrl(tab.url);
|
weView(index)->load(tab.url);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TabWidget::restoreAllClosedTabs()
|
void TabWidget::restoreAllClosedTabs()
|
||||||
|
@ -408,7 +408,7 @@ void TabWidget::restoreAllClosedTabs()
|
||||||
QDataStream historyStream(tab.history);
|
QDataStream historyStream(tab.history);
|
||||||
historyStream >> *weView(index)->history();
|
historyStream >> *weView(index)->history();
|
||||||
|
|
||||||
weView(index)->setUrl(tab.url);
|
weView(index)->load(tab.url);
|
||||||
}
|
}
|
||||||
m_closedTabsManager->clearList();
|
m_closedTabsManager->clearList();
|
||||||
}
|
}
|
||||||
|
@ -495,7 +495,7 @@ void TabWidget::restorePinnedTabs()
|
||||||
addedIndex= addView(QUrl());
|
addedIndex= addView(QUrl());
|
||||||
QDataStream historyStream(historyState);
|
QDataStream historyStream(historyState);
|
||||||
historyStream >> *weView(addedIndex)->history();
|
historyStream >> *weView(addedIndex)->history();
|
||||||
weView(addedIndex)->setUrl(url);
|
weView(addedIndex)->load(url);
|
||||||
} else {
|
} else {
|
||||||
addedIndex = addView(url);
|
addedIndex = addView(url);
|
||||||
}
|
}
|
||||||
|
@ -564,7 +564,7 @@ bool TabWidget::restoreState(const QByteArray &state)
|
||||||
int index = addView(QUrl());
|
int index = addView(QUrl());
|
||||||
QDataStream historyStream(historyState);
|
QDataStream historyStream(historyState);
|
||||||
historyStream >> *weView(index)->history();
|
historyStream >> *weView(index)->history();
|
||||||
weView(index)->setUrl(url);
|
weView(index)->load(url);
|
||||||
} else {
|
} else {
|
||||||
addView(url);
|
addView(url);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user