/***************************************************************************
- * 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 *
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());
}