}
void SearchView::updateRecentKeywords() {
+ // load
+ QSettings settings;
+ QStringList keywords = settings.value(recentKeywordsKey).toStringList();
+ if (keywords == recentKeywords) return;
+ recentKeywords = keywords;
// cleanup
QLayoutItem *item;
delete item;
}
- // load
- QSettings settings;
- QStringList keywords = settings.value(recentKeywordsKey).toStringList();
recentKeywordsLabel->setVisible(!keywords.isEmpty());
The::globalActions()->value("clearRecentKeywords")->setEnabled(!keywords.isEmpty());
}
void SearchView::updateRecentChannels() {
+ // load
+ QSettings settings;
+ QStringList keywords = settings.value(recentChannelsKey).toStringList();
+ if (keywords == recentChannels) return;
+ recentChannels = keywords;
// cleanup
QLayoutItem *item;
delete item;
}
- // load
- QSettings settings;
- QStringList keywords = settings.value(recentChannelsKey).toStringList();
recentChannelsLabel->setVisible(!keywords.isEmpty());
// TODO The::globalActions()->value("clearRecentKeywords")->setEnabled(!keywords.isEmpty());
QLabel *message;
QPushButton *watchButton;
+ QStringList recentKeywords;
+ QStringList recentChannels;
};
#endif // __SEARCHVIEW_H__