summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/UserSearch')
-rw-r--r--Swift/QtUI/UserSearch/QtSuggestingJIDInput.cpp4
-rw-r--r--Swift/QtUI/UserSearch/QtUserSearchWindow.cpp19
-rw-r--r--Swift/QtUI/UserSearch/QtUserSearchWindow.h2
-rw-r--r--Swift/QtUI/UserSearch/UserSearchModel.h2
4 files changed, 14 insertions, 13 deletions
diff --git a/Swift/QtUI/UserSearch/QtSuggestingJIDInput.cpp b/Swift/QtUI/UserSearch/QtSuggestingJIDInput.cpp
index 4e8f4e1..e9a26ea 100644
--- a/Swift/QtUI/UserSearch/QtSuggestingJIDInput.cpp
+++ b/Swift/QtUI/UserSearch/QtSuggestingJIDInput.cpp
@@ -74,13 +74,13 @@ Contact::ref QtSuggestingJIDInput::getContact() {
if (!text().isEmpty()) {
JID jid(Q2PSTRING(text()));
if (jid.isValid()) {
- Contact::ref manualContact = boost::make_shared<Contact>();
+ Contact::ref manualContact = std::make_shared<Contact>();
manualContact->name = jid.toString();
manualContact->jid = jid;
return manualContact;
}
}
- return boost::shared_ptr<Contact>();
+ return std::shared_ptr<Contact>();
}
void QtSuggestingJIDInput::setSuggestions(const std::vector<Contact::ref>& suggestions) {
diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
index 09943c5..83b8df6 100644
--- a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
+++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
@@ -6,8 +6,9 @@
#include <Swift/QtUI/UserSearch/QtUserSearchWindow.h>
+#include <memory>
+
#include <boost/bind.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <QItemDelegate>
#include <QModelIndex>
@@ -132,11 +133,11 @@ void QtUserSearchWindow::handleAccepted() {
switch(type_) {
case AddContact:
jid = getContactJID();
- eventStream_->send(boost::make_shared<AddContactUIEvent>(jid, detailsPage_->getName(), detailsPage_->getSelectedGroups()));
+ eventStream_->send(std::make_shared<AddContactUIEvent>(jid, detailsPage_->getName(), detailsPage_->getSelectedGroups()));
break;
case ChatToContact:
if (contactVector_.size() == 1) {
- boost::shared_ptr<UIEvent> event(new RequestChatUIEvent(contactVector_[0]->jid));
+ std::shared_ptr<UIEvent> event(new RequestChatUIEvent(contactVector_[0]->jid));
eventStream_->send(event);
break;
}
@@ -145,13 +146,13 @@ void QtUserSearchWindow::handleAccepted() {
jids.push_back(contact->jid);
}
- eventStream_->send(boost::make_shared<CreateImpromptuMUCUIEvent>(jids, JID(), Q2PSTRING(firstMultiJIDPage_->reason_->text())));
+ eventStream_->send(std::make_shared<CreateImpromptuMUCUIEvent>(jids, JID(), Q2PSTRING(firstMultiJIDPage_->reason_->text())));
break;
case InviteToChat:
foreach(Contact::ref contact, contactVector_) {
jids.push_back(contact->jid);
}
- eventStream_->send(boost::make_shared<InviteToMUCUIEvent>(roomJID_, jids, Q2PSTRING(firstMultiJIDPage_->reason_->text())));
+ eventStream_->send(std::make_shared<InviteToMUCUIEvent>(roomJID_, jids, Q2PSTRING(firstMultiJIDPage_->reason_->text())));
break;
}
}
@@ -229,7 +230,7 @@ void QtUserSearchWindow::handleFirstPageRadioChange() {
}
void QtUserSearchWindow::handleSearch() {
- boost::shared_ptr<SearchPayload> search(new SearchPayload());
+ std::shared_ptr<SearchPayload> search(new SearchPayload());
if (fieldsPage_->getFormWidget()) {
search->setForm(fieldsPage_->getFormWidget()->getCompletedForm());
search->getForm()->clearEmptyTextFields();
@@ -292,7 +293,7 @@ JID QtUserSearchWindow::getContactJID() const {
}
Contact::ref QtUserSearchWindow::getContact() const {
- return boost::make_shared<Contact>("", getContactJID(), StatusShow::None, "");
+ return std::make_shared<Contact>("", getContactJID(), StatusShow::None, "");
}
void QtUserSearchWindow::addSearchedJIDToList(const Contact::ref& contact) {
@@ -330,7 +331,7 @@ void QtUserSearchWindow::addSavedServices(const std::vector<JID>& services) {
}
}
-void QtUserSearchWindow::setSearchFields(boost::shared_ptr<SearchPayload> fields) {
+void QtUserSearchWindow::setSearchFields(std::shared_ptr<SearchPayload> fields) {
fieldsPage_->fetchingThrobber_->hide();
fieldsPage_->fetchingThrobber_->movie()->stop();
fieldsPage_->fetchingLabel_->hide();
@@ -375,7 +376,7 @@ void QtUserSearchWindow::setContactSuggestions(const std::vector<Contact::ref>&
void QtUserSearchWindow::setJIDs(const std::vector<JID> &jids) {
foreach(JID jid, jids) {
- addSearchedJIDToList(boost::make_shared<Contact>("", jid, StatusShow::None, ""));
+ addSearchedJIDToList(std::make_shared<Contact>("", jid, StatusShow::None, ""));
}
onJIDUpdateRequested(jids);
}
diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.h b/Swift/QtUI/UserSearch/QtUserSearchWindow.h
index bcef0b9..5d8b755 100644
--- a/Swift/QtUI/UserSearch/QtUserSearchWindow.h
+++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.h
@@ -42,7 +42,7 @@ namespace Swift {
virtual void setSelectedService(const JID& jid);
virtual void setServerSupportsSearch(bool error);
virtual void setSearchError(bool error);
- virtual void setSearchFields(boost::shared_ptr<SearchPayload> fields);
+ virtual void setSearchFields(std::shared_ptr<SearchPayload> fields);
virtual void setNameSuggestions(const std::vector<std::string>& suggestions);
virtual void prepopulateJIDAndName(const JID& jid, const std::string& name);
virtual void setContactSuggestions(const std::vector<Contact::ref>& suggestions);
diff --git a/Swift/QtUI/UserSearch/UserSearchModel.h b/Swift/QtUI/UserSearch/UserSearchModel.h
index 0a57b28..a3940da 100644
--- a/Swift/QtUI/UserSearch/UserSearchModel.h
+++ b/Swift/QtUI/UserSearch/UserSearchModel.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <QAbstractItemModel>
#include <QList>