X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Ftopicwidget.cpp;h=40e7ae8e21c747634a96f133f5d92d02f45d6f1c;hp=ea319bef36aca15b7425990294c3d459638fa655;hb=dcba0652ac1275877b98b06d6482924ee6df0cd1;hpb=d6b056e936ec441258d291b7a8af7b83f9f53016 diff --git a/src/qtui/topicwidget.cpp b/src/qtui/topicwidget.cpp index ea319bef..40e7ae8e 100644 --- a/src/qtui/topicwidget.cpp +++ b/src/qtui/topicwidget.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005/06 by the Quassel IRC Team * + * Copyright (C) 2005/06 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -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()); }