X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Ftopicwidget.cpp;h=40e7ae8e21c747634a96f133f5d92d02f45d6f1c;hb=d69da0b56103c347107fb490008b5c6b0d59e3df;hp=06303c8385252c528873208042cebd641d109403;hpb=8699dd758516d0ded076811e8ea656adc95e69d0;p=quassel.git diff --git a/src/qtui/topicwidget.cpp b/src/qtui/topicwidget.cpp index 06303c83..40e7ae8e 100644 --- a/src/qtui/topicwidget.cpp +++ b/src/qtui/topicwidget.cpp @@ -28,13 +28,12 @@ TopicWidget::TopicWidget(QWidget *parent) ui.setupUi(this); } -QString TopicWidget::topic() const { - return ui.topicLineEdit->text(); -} - void TopicWidget::setTopic(const QString &newtopic) { ui.topicLineEdit->setText(newtopic); + ui.topicLineEdit->setCursorPosition(0); } -TopicWidget::~TopicWidget() { +void TopicWidget::on_topicLineEdit_returnPressed() { + ui.topicLineEdit->setCursorPosition(0); + emit topicChanged(topic()); }