// Make links navigable with the keyboard too
itemLabel->setTextInteractionFlags(Qt::LinksAccessibleByKeyboard | Qt::LinksAccessibleByMouse);
- connect(itemLabel, SIGNAL(linkActivated(QString)), this, SLOT(watch(QString)));
+ connect(itemLabel, SIGNAL(linkActivated(QString)), this, SLOT(watchKeywords(QString)));
recentKeywordsLayout->addWidget(itemLabel);
}
emit search(searchParams);
}
+void SearchView::watchKeywords(QString query) {
+
+ query = query.simplified();
+
+ // check for empty query
+ if (query.length() == 0) {
+ queryEdit->setFocus(Qt::OtherFocusReason);
+ return;
+ }
+
+ SearchParams *searchParams = new SearchParams();
+ searchParams->setKeywords(query);
+
+ // go!
+ emit search(searchParams);
+}
+
void SearchView::checkForUpdate() {
static const QString updateCheckKey = "updateCheck";
public slots:
void watch(QString query);
void watchChannel(QString channel);
+ void watchKeywords(QString query);
void gotNewVersion(QString version);
signals: