summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2012-04-23 10:58:51 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-04-23 12:27:54 (GMT)
commitae77eccb397460676b4df8297beaebcc1394faec (patch)
treed7cef13176863f4dbee56d5e07e4df5438903ddf /Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
parent39d46fb62ef01c3394ec0b453229f8d703f75153 (diff)
downloadswift-ae77eccb397460676b4df8297beaebcc1394faec.zip
swift-ae77eccb397460676b4df8297beaebcc1394faec.tar.bz2
Explicitly show "No results." if a user search yields to no results on the results page.
Resolves: #811 License: This patch is BSD-licensed, see http://www.opensource.org/licenses/bsd-license.php
Diffstat (limited to 'Swift/QtUI/UserSearch/QtUserSearchWindow.cpp')
-rw-r--r--Swift/QtUI/UserSearch/QtUserSearchWindow.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
index b8a44e5..2b11d02 100644
--- a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
+++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
@@ -253,6 +253,7 @@ void QtUserSearchWindow::setResults(const std::vector<UserSearchResult>& results
resultsPage_->results_->setHeaderHidden(true);
delete model_;
model_ = newModel;
+ resultsPage_->setNoResults(model_->rowCount() == 0);
}
void QtUserSearchWindow::setResultsForm(Form::ref results) {
@@ -264,6 +265,7 @@ void QtUserSearchWindow::setResultsForm(Form::ref results) {
resultsPage_->results_->header()->setResizeMode(QHeaderView::ResizeToContents);
delete model_;
model_ = newModel;
+ resultsPage_->setNoResults(model_->rowCount() == 0);
}
void QtUserSearchWindow::setSelectedService(const JID& jid) {