summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/UserSearch/QtUserSearchResultsPage.cpp')
-rw-r--r--Swift/QtUI/UserSearch/QtUserSearchResultsPage.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/Swift/QtUI/UserSearch/QtUserSearchResultsPage.cpp b/Swift/QtUI/UserSearch/QtUserSearchResultsPage.cpp
index bc6933e7..dcd79d2 100644
--- a/Swift/QtUI/UserSearch/QtUserSearchResultsPage.cpp
+++ b/Swift/QtUI/UserSearch/QtUserSearchResultsPage.cpp
@@ -15,12 +15,23 @@ QtUserSearchResultsPage::QtUserSearchResultsPage() {
connect(results_, SIGNAL(clicked(const QModelIndex&)), this, SLOT(emitCompletenessCheck()));
connect(results_, SIGNAL(entered(const QModelIndex&)), this, SLOT(emitCompletenessCheck()));
results_->setExpandsOnDoubleClick(false);
+ setNoResults(false);
}
bool QtUserSearchResultsPage::isComplete() const {
return results_->currentIndex().isValid();
}
+void QtUserSearchResultsPage::setNoResults(bool noResults) {
+ if (noResults) {
+ results_->setEnabled(false);
+ noResults_->show();
+ } else {
+ results_->setEnabled(true);
+ noResults_->hide();
+ }
+}
+
void QtUserSearchResultsPage::emitCompletenessCheck() {
emit completeChanged();
}