|
|
|
@ -76,7 +76,7 @@ FilteredTextEdit::FilteredTextEdit(QWidget *parent) |
|
|
|
|
&FilteredTextEdit::uploadData); |
|
|
|
|
|
|
|
|
|
connect(this, &FilteredTextEdit::resultsRetrieved, this, &FilteredTextEdit::showResults); |
|
|
|
|
connect(&replyPopup_, &ReplyPopup::userSelected, this, [this](const QString &text) { |
|
|
|
|
connect(&replyPopup_, &ReplyPopup::userSelected, this, [](const QString &text) { |
|
|
|
|
// TODO: Show user avatar window.
|
|
|
|
|
nhlog::ui()->info("User selected: " + text.toStdString()); |
|
|
|
|
}); |
|
|
|
@ -176,18 +176,16 @@ FilteredTextEdit::keyPressEvent(QKeyEvent *event) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (replyPopup_.isVisible()) { |
|
|
|
|
switch (event->key()) |
|
|
|
|
{ |
|
|
|
|
switch (event->key()) { |
|
|
|
|
case Qt::Key_Escape: |
|
|
|
|
closeReply(); |
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
default: |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (event->key()) { |
|
|
|
|
case Qt::Key_At: |
|
|
|
|
atTriggerPosition_ = textCursor().position(); |
|
|
|
|