summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-04-11 15:03:54 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-04-11 15:05:09 (GMT)
commit73f845a3f380c5a1adbac2cf29e9f36cc9b498cf (patch)
tree25655c928aa2d4a8c05e54f9c7c18203286fb8f3 /Swift/QtUI/QtChatWindow.cpp
parent8b09a21b14488a6ceb159607511b351d5cd60ac2 (diff)
downloadswift-73f845a3f380c5a1adbac2cf29e9f36cc9b498cf.zip
swift-73f845a3f380c5a1adbac2cf29e9f36cc9b498cf.tar.bz2
Proper handling of keypresses in the chat input that're meant for the chat log.
Resolves: #284
Diffstat (limited to 'Swift/QtUI/QtChatWindow.cpp')
-rw-r--r--Swift/QtUI/QtChatWindow.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index dd1bf98..5bedc22 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -39,6 +39,7 @@ QtChatWindow::QtChatWindow(const QString &contact, QtTreeWidgetFactory *treeWidg
layout->addWidget(logRosterSplitter);
messageLog_ = new QtChatView(this);
+ messageLog_->setFocusPolicy(Qt::NoFocus);
logRosterSplitter->addWidget(messageLog_);
treeWidget_ = dynamic_cast<QtTreeWidget*>(treeWidgetFactory->createTreeWidget());
@@ -65,6 +66,7 @@ QtChatWindow::QtChatWindow(const QString &contact, QtTreeWidgetFactory *treeWidg
inputClearing_ = false;
contactIsTyping_ = false;
+ connect(input_, SIGNAL(unhandledKeyPressEvent(QKeyEvent*)), messageLog_, SLOT(handleKeyPressEvent(QKeyEvent*)));
connect(input_, SIGNAL(returnPressed()), this, SLOT(returnPressed()));
connect(input_, SIGNAL(textChanged()), this, SLOT(handleInputChanged()));
setFocusProxy(input_);