1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 17:52:10 +02:00

Clicking on search button with no text in searchbar will now open the

search provider's page instead of doing nothing
This commit is contained in:
nowrep 2011-03-17 15:37:21 +01:00
parent 0a50391d07
commit c44d844c87

View File

@ -93,8 +93,8 @@ void WebSearchBar::searchChanged()
void WebSearchBar::search() void WebSearchBar::search()
{ {
if (text().isEmpty()) // if (text().isEmpty())
return; // return;
QUrl searchUrl; QUrl searchUrl;
if (m_boxSearchType->toolTip() == "Google") if (m_boxSearchType->toolTip() == "Google")
@ -106,7 +106,7 @@ void WebSearchBar::search()
if (m_boxSearchType->toolTip() == "Wikipedia (en)") if (m_boxSearchType->toolTip() == "Wikipedia (en)")
searchUrl = QUrl("http://en.wikipedia.org/w/index.php?search="+text()); searchUrl = QUrl("http://en.wikipedia.org/w/index.php?search="+text());
if (m_boxSearchType->toolTip() == "CSFD") if (m_boxSearchType->toolTip() == "CSFD")
searchUrl = QUrl("http://www.csfd.cz/hledani-filmu-hercu-reziseru-ve-filmove-databazi/?search="+text()); searchUrl = QUrl("http://www.csfd.cz/hledat/?q="+text());
if (m_boxSearchType->toolTip() == "Youtube") if (m_boxSearchType->toolTip() == "Youtube")
searchUrl = QUrl("http://www.youtube.com/results?search_query="+text()); searchUrl = QUrl("http://www.youtube.com/results?search_query="+text());