diff options
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; } |