Now highlights the text in the channel change dialogue.

This commit is contained in:
Cranken 2018-04-07 21:21:56 +02:00 committed by fourtf
parent 5211ebaf71
commit 884349b340
3 changed files with 8 additions and 0 deletions

View file

@ -190,6 +190,7 @@ bool Split::showChangeChannelPopup(const char *dialogTitle, bool empty)
if (!empty) { if (!empty) {
dialog.setText(this->channel->name); dialog.setText(this->channel->name);
dialog.highlightText();
} }
if (dialog.exec() == QDialog::Accepted) { if (dialog.exec() == QDialog::Accepted) {

View file

@ -37,5 +37,10 @@ void TextInputDialog::cancelButtonClicked()
close(); close();
} }
void TextInputDialog::highlightText()
{
this->_lineEdit.selectAll();
}
} // namespace widgets } // namespace widgets
} // namespace chatterino } // namespace chatterino

View file

@ -27,6 +27,8 @@ public:
_lineEdit.setText(text); _lineEdit.setText(text);
} }
void highlightText();
private: private:
QVBoxLayout _vbox; QVBoxLayout _vbox;
QLineEdit _lineEdit; QLineEdit _lineEdit;