summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-05-24 17:14:38 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-05-24 18:49:25 (GMT)
commitff464cee022c75258405ab01ebeedf7bc1c79aa0 (patch)
treecf580126009cb1b1af9d94178363c5460f2be632 /Swift/QtUI/QtStatusWidget.cpp
parent688175f8bb6a4ae2c6589b5faabf08e3dd15e2f1 (diff)
downloadswift-ff464cee022c75258405ab01ebeedf7bc1c79aa0.zip
swift-ff464cee022c75258405ab01ebeedf7bc1c79aa0.tar.bz2
Escape to close status edit.
Resolves: #363
Diffstat (limited to 'Swift/QtUI/QtStatusWidget.cpp')
-rw-r--r--Swift/QtUI/QtStatusWidget.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Swift/QtUI/QtStatusWidget.cpp b/Swift/QtUI/QtStatusWidget.cpp
index e7e2e5b..a5eda8b 100644
--- a/Swift/QtUI/QtStatusWidget.cpp
+++ b/Swift/QtUI/QtStatusWidget.cpp
@@ -8,7 +8,6 @@
#include <QBoxLayout>
#include <QComboBox>
-#include <QLineEdit>
#include <QLabel>
#include <QFrame>
#include <QPoint>
@@ -20,6 +19,7 @@
#include <QListWidgetItem>
#include "Swift/QtUI/QtElidingLabel.h"
+#include "Swift/QtUI/QtLineEdit.h"
namespace Swift {
@@ -64,9 +64,10 @@ QtStatusWidget::QtStatusWidget(QWidget *parent) : QWidget(parent), editCursor_(Q
page2Layout->setContentsMargins(0,0,0,0);
stack_->addWidget(page2);
- statusEdit_ = new QLineEdit(this);
+ statusEdit_ = new QtLineEdit(this);
page2Layout->addWidget(statusEdit_);
connect(statusEdit_, SIGNAL(returnPressed()), this, SLOT(handleEditComplete()));
+ connect(statusEdit_, SIGNAL(escapePressed()), this, SLOT(handleEditCancelled()));
connect(statusEdit_, SIGNAL(textChanged(const QString&)), this, SLOT(generateList()));
setStatusText("");