diff options
author | Kevin Smith <git@kismith.co.uk> | 2012-03-23 09:51:38 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-03-23 09:52:11 (GMT) |
commit | 8ccdfd958ba1e7afbeb8c5893c12f09046cb8892 (patch) | |
tree | 8e033606b686e58b9319e7791e2cd72defa750bb /Swift | |
parent | 823d3a26d21e38c8ab82a07be71377f0276a0555 (diff) | |
download | swift-contrib-8ccdfd958ba1e7afbeb8c5893c12f09046cb8892.zip swift-contrib-8ccdfd958ba1e7afbeb8c5893c12f09046cb8892.tar.bz2 |
Don't let trailing whitespace in JIDS interfere with User Search
Diffstat (limited to 'Swift')
-rw-r--r-- | Swift/QtUI/UserSearch/QtUserSearchFirstPage.cpp | 4 | ||||
-rw-r--r-- | Swift/QtUI/UserSearch/QtUserSearchWindow.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Swift/QtUI/UserSearch/QtUserSearchFirstPage.cpp b/Swift/QtUI/UserSearch/QtUserSearchFirstPage.cpp index cba2f33..7a91a98 100644 --- a/Swift/QtUI/UserSearch/QtUserSearchFirstPage.cpp +++ b/Swift/QtUI/UserSearch/QtUserSearchFirstPage.cpp @@ -21,11 +21,11 @@ QtUserSearchFirstPage::QtUserSearchFirstPage(UserSearchWindow::Type type, const bool QtUserSearchFirstPage::isComplete() const { bool complete = false; if (byJID_->isChecked()) { - complete = JID(Q2PSTRING(jid_->text())).isValid(); + complete = JID(Q2PSTRING(jid_->text().trimmed())).isValid(); } else if (byLocalSearch_->isChecked()) { complete = true; } else if (byRemoteSearch_->isChecked()) { - complete = JID(Q2PSTRING(service_->currentText())).isValid(); + complete = JID(Q2PSTRING(service_->currentText().trimmed())).isValid(); } return complete; } diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp index 53eac07..949d65c 100644 --- a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp +++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp @@ -97,7 +97,7 @@ void QtUserSearchWindow::handleCurrentChanged(int page) { } JID QtUserSearchWindow::getServerToSearch() { - return firstPage_->byRemoteSearch_->isChecked() ? JID(Q2PSTRING(firstPage_->service_->currentText())) : myServer_; + return firstPage_->byRemoteSearch_->isChecked() ? JID(Q2PSTRING(firstPage_->service_->currentText().trimmed())) : myServer_; } void QtUserSearchWindow::handleAccepted() { @@ -192,7 +192,7 @@ JID QtUserSearchWindow::getContactJID() const { } } else { - jid = JID(Q2PSTRING(firstPage_->jid_->text())); + jid = JID(Q2PSTRING(firstPage_->jid_->text().trimmed())); } return jid; } |