[Konversation-devel] [Bug 99354] New: Googling from the input box
Michiel
luyt at ovosoft.nl
Mon Feb 14 14:42:12 CET 2005
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=99354
Summary: Googling from the input box
Product: konversation
Version: unspecified
Platform: FreeBSD Ports
OS/Version: Linux
Status: UNCONFIRMED
Severity: wishlist
Priority: NOR
Component: general
AssignedTo: konversation-devel kde org
ReportedBy: luyt ovosoft nl
Version: 15.1 (using KDE KDE 3.3.2)
Installed from: FreeBSD Ports
It would be nice to be able to quickly search Google from the input box, by entering something like: /g searchword
Probably this can be implemented as a simple script. Care should be taken that a search on 'K&R syntax' really searches on K&R syntax: correct treatment of the ampersand and spaces in the search term might need some attention.
This is how I implemented it in the C++ code; a script would be nicer.
QString url = "http://www.google.com";
// If a parameter is specified, append it to Google's URL as a searchword
if (parameter!="") {
QString cooked(parameter);
cooked.replace(QRegExp("&"),"%26"); // In case someone searches for K&R ;-)
url+="/search?q="+cooked;
}
More information about the Konversation-devel
mailing list