summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/UserSearch/QtUserSearchWindow.cpp')
-rw-r--r--Swift/QtUI/UserSearch/QtUserSearchWindow.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
index 17214e4..e5bd5d0 100644
--- a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
+++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
@@ -80,3 +80,3 @@ void QtUserSearchWindow::handleCurrentChanged(int page) {
if (page == 1 && lastPage_ == 3) {
- addSearchedJIDToList(getContactJID());
+ addSearchedJIDToList(getContact());
setSecondPage();
@@ -272,5 +272,9 @@ JID QtUserSearchWindow::getContactJID() const {
-void QtUserSearchWindow::addSearchedJIDToList(const JID& jid) {
+Contact::ref QtUserSearchWindow::getContact() const {
+ return boost::make_shared<Contact>("", getContactJID(), StatusShow::None, "");
+}
+
+void QtUserSearchWindow::addSearchedJIDToList(const Contact::ref& contact) {
std::vector<JID> jids;
- jids.push_back(jid);
+ jids.push_back(contact->jid);
handleJIDsAdded(jids);
@@ -345,3 +349,3 @@ void QtUserSearchWindow::setJIDs(const std::vector<JID> &jids) {
foreach(JID jid, jids) {
- addSearchedJIDToList(jid);
+ addSearchedJIDToList(boost::make_shared<Contact>("", jid, StatusShow::None, ""));
}