diff options
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/UserSearch/QtUserSearchWindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp index e770186..8d15739 100644 --- a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp +++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp @@ -130,61 +130,61 @@ void QtUserSearchWindow::handleCurrentChanged(int page) { } JID QtUserSearchWindow::getServerToSearch() { if (type_ == Type::AddContact) { return firstPage_->byRemoteSearch_->isChecked() ? JID(Q2PSTRING(firstPage_->service_->currentText().trimmed())) : myServer_; } else { return firstMultiJIDPage_->byRemoteSearch_->isChecked() ? JID(Q2PSTRING(firstMultiJIDPage_->service_->currentText().trimmed())) : myServer_; } } void QtUserSearchWindow::handleAccepted() { JID jid; std::vector<JID> jids; switch(type_) { case Type::AddContact: jid = getContactJID(); eventStream_->send(std::make_shared<AddContactUIEvent>(jid, detailsPage_->getName(), detailsPage_->getSelectedGroups())); break; case Type::ChatToContact: if (contactVector_.size() == 1) { std::shared_ptr<UIEvent> event(new RequestChatUIEvent(contactVector_[0]->jid)); eventStream_->send(event); break; } for (Contact::ref contact : contactVector_) { jids.push_back(contact->jid); } - eventStream_->send(std::make_shared<CreateImpromptuMUCUIEvent>(jids, Q2PSTRING(firstMultiJIDPage_->reason_->text()))); + eventStream_->send(std::make_shared<CreateImpromptuMUCUIEvent>(jids, JID(), Q2PSTRING(firstMultiJIDPage_->reason_->text()))); break; case Type::InviteToChat: for (Contact::ref contact : contactVector_) { jids.push_back(contact->jid); } eventStream_->send(std::make_shared<InviteToMUCUIEvent>(originatorJID_, jids, Q2PSTRING(firstMultiJIDPage_->reason_->text()))); break; } } void QtUserSearchWindow::handleContactSuggestionRequested(const QString& text) { std::string stdText = Q2PSTRING(text); onContactSuggestionsRequested(stdText); } void QtUserSearchWindow::addContact() { auto contactToAdd = firstMultiJIDPage_->jid_->getContact(); if (!!contactToAdd) { contactVector_.push_back(contactToAdd); firstMultiJIDPage_->jid_->clear(); } firstMultiJIDPage_->contactList_->setList(contactVector_); firstMultiJIDPage_->emitCompletenessCheck(); if (type_ == Type::ChatToContact) { firstMultiJIDPage_->groupBox->setEnabled(supportsImpromptu_ ? 1 : (contactVector_.size() < 1)); } if (!!contactToAdd && contactToAdd->jid.isValid() && contactToAdd->statusType == StatusShow::None) { onJIDUpdateRequested({contactToAdd->jid}); |