summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/UserSearch/QtUserSearchWindow.cpp')
-rw-r--r--Swift/QtUI/UserSearch/QtUserSearchWindow.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
index 949d65c..b8a44e5 100644
--- a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
+++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
@@ -230,18 +230,27 @@ void QtUserSearchWindow::setSearchFields(boost::shared_ptr<SearchPayload> fields
fieldsPage_->emitCompletenessCheck();
}
void QtUserSearchWindow::setNameSuggestions(const std::vector<std::string>& suggestions) {
if (detailsPage_) {
detailsPage_->setNameSuggestions(suggestions);
}
}
+void QtUserSearchWindow::prepopulateJIDAndName(const JID& jid, const std::string& name) {
+ firstPage_->jid_->setText(P2QSTRING(jid.toBare().toString()));
+ detailsPage_->setJID(jid);
+ lastPage_ = 1;
+ restart();
+ next();
+ detailsPage_->setName(name);
+}
+
void QtUserSearchWindow::setResults(const std::vector<UserSearchResult>& results) {
UserSearchModel *newModel = new UserSearchModel();
newModel->setResults(results);
resultsPage_->results_->setModel(newModel);
resultsPage_->results_->setItemDelegate(delegate_);
resultsPage_->results_->setHeaderHidden(true);
delete model_;
model_ = newModel;
}