diff options
Diffstat (limited to 'Swift/QtUI/UserSearch/QtSuggestingJIDInput.cpp')
| -rw-r--r-- | Swift/QtUI/UserSearch/QtSuggestingJIDInput.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Swift/QtUI/UserSearch/QtSuggestingJIDInput.cpp b/Swift/QtUI/UserSearch/QtSuggestingJIDInput.cpp index a4a4610..9b96627 100644 --- a/Swift/QtUI/UserSearch/QtSuggestingJIDInput.cpp +++ b/Swift/QtUI/UserSearch/QtSuggestingJIDInput.cpp @@ -92,4 +92,9 @@ void QtSuggestingJIDInput::setSuggestions(const std::vector<Contact::ref>& sugge } +void QtSuggestingJIDInput::clear() { + setText(""); + currentContact_.reset(); +} + void QtSuggestingJIDInput::keyPressEvent(QKeyEvent* event) { if (event->key() == Qt::Key_Up) { @@ -139,5 +144,4 @@ void QtSuggestingJIDInput::handleClicked(const QModelIndex& index) { if (index.isValid()) { currentContact_ = contactListModel_->getContact(index.row()); - setText(""); onUserSelected(currentContact_->jid); hidePopup(); |
Swift