summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-09-30 16:53:32 (GMT)
committerSwift Review <review@swift.im>2015-10-13 13:43:24 (GMT)
commit39f291afd3cab9d6c1e7cdf7f0f5476ef6747abd (patch)
treec711cf842aecaec2d1f2d740f096df7d47fac335
parentd8946ea19cfc37df6660cebc516e86a93204def0 (diff)
downloadswift-39f291afd3cab9d6c1e7cdf7f0f5476ef6747abd.zip
swift-39f291afd3cab9d6c1e7cdf7f0f5476ef6747abd.tar.bz2
Fix crash in user search dialog for invitation use case
Commit 9b48a73 introduced a bug because it always assumed the 'Add contact' user case. Test-Information: Retested the add contact case described in commit 9b48a73 and tested MUC invitation by DND. Neither crashes anymore. Change-Id: Ifab356e6ad9a52365ed15dd46e4e94492bdc60bf
-rw-r--r--Swift/QtUI/UserSearch/QtUserSearchWindow.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
index 013b869..bb6fc31 100644
--- a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
+++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
@@ -302,11 +302,13 @@ void QtUserSearchWindow::handleOnSearchedJIDSelected(const Contact::ref& contact
302 firstPage_->jid_->setText(P2QSTRING(contact->jid.toString())); 302 firstPage_->jid_->setText(P2QSTRING(contact->jid.toString()));
303} 303}
304 304
305void QtUserSearchWindow::show() { 305void QtUserSearchWindow::show() {
306 clear(); 306 clear();
307 setWarning(boost::optional<std::string>()); 307 if (type_ == AddContact) {
308 setWarning(boost::optional<std::string>());
309 }
308 QWidget::show(); 310 QWidget::show();
309} 311}
310 312
311void QtUserSearchWindow::addSavedServices(const std::vector<JID>& services) { 313void QtUserSearchWindow::addSavedServices(const std::vector<JID>& services) {
312 if (type_ == AddContact) { 314 if (type_ == AddContact) {