diff -r 56cd8111b7f7 -r 41300fa6a67c examples/network/googlesuggest/searchbox.cpp --- a/examples/network/googlesuggest/searchbox.cpp Tue Jan 26 12:42:25 2010 +0200 +++ b/examples/network/googlesuggest/searchbox.cpp Tue Feb 02 00:43:10 2010 +0200 @@ -47,12 +47,12 @@ #define GSEARCH_URL "http://www.google.com/search?q=%1" - +//! [1] SearchBox::SearchBox(QWidget *parent): QLineEdit(parent) { completer = new GSuggestCompletion(this); - connect(this, SIGNAL(returnPressed()), SLOT(doSearch())); + connect(this, SIGNAL(returnPressed()),this, SLOT(doSearch())); setWindowTitle("Search with Google"); @@ -60,10 +60,13 @@ resize(400, height()); setFocus(); } +//! [1] +//! [2] void SearchBox::doSearch() { completer->preventSuggest(); QString url = QString(GSEARCH_URL).arg(text()); QDesktopServices::openUrl(QUrl(url)); } +//! [2] \ No newline at end of file