projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixing BR #167 (Key down now puts the content of inputline into the history (doing...
[quassel.git]
/
src
/
uisupport
/
inputline.cpp
diff --git
a/src/uisupport/inputline.cpp
b/src/uisupport/inputline.cpp
index
31ec399
..
6ea156a
100644
(file)
--- a/
src/uisupport/inputline.cpp
+++ b/
src/uisupport/inputline.cpp
@@
-41,7
+41,11
@@
void InputLine::keyPressEvent(QKeyEvent * event) {
} else if(event->key() == Qt::Key_Down) {
if(idx < history.count()) idx++;
if(idx < history.count()) setText(history[idx]);
} else if(event->key() == Qt::Key_Down) {
if(idx < history.count()) idx++;
if(idx < history.count()) setText(history[idx]);
- else setText("");
+ else if(!text().isEmpty()) {
+ history << text();
+ idx = history.count();
+ setText("");
+ }
event->accept();
} else if(event->key() == Qt::Key_Select) { // for Qtopia
emit returnPressed();
event->accept();
} else if(event->key() == Qt::Key_Select) { // for Qtopia
emit returnPressed();