summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-07-23 13:14:34 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-07-23 16:12:41 (GMT)
commit2410f261eaa13442baa46537202d31ad26d797e7 (patch)
treeea519b9b8625360edfa4285da1ed6f95f2031cff /src/gui
parent098be4ffcf4c9ba615332f853fd440ea630a4453 (diff)
downloadQt-2410f261eaa13442baa46537202d31ad26d797e7.zip
Qt-2410f261eaa13442baa46537202d31ad26d797e7.tar.gz
Qt-2410f261eaa13442baa46537202d31ad26d797e7.tar.bz2
Reverted commits that changed the behavior of the keypresses with modifiers.
Apparently it changes the behavior of Qt too much and also breaks the text input in some keyboard layouts (for example in German layout you need to be able to use Ctrl and Alt or AltGr modifiers to type text). Revert "Don't insert text into a text widget when a modifier is pressed." This reverts commit 099a32d121cbc80a1a234c3146f4be9b5237e7e8. Revert "Fixed the qlineedit autotest." This reverts commit 9210e8cdc83b6812d10f5f5847d05703ef2e5f7c.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/text/qtextcontrol.cpp3
-rw-r--r--src/gui/widgets/qlineedit.cpp3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp
index 2a590fd..b2ad686 100644
--- a/src/gui/text/qtextcontrol.cpp
+++ b/src/gui/text/qtextcontrol.cpp
@@ -1245,8 +1245,7 @@ void QTextControlPrivate::keyPressEvent(QKeyEvent *e)
process:
{
QString text = e->text();
- if (!text.isEmpty() && (text.at(0).isPrint() || text.at(0) == QLatin1Char('\t')) &&
- ((e->modifiers() & (Qt::ControlModifier | Qt::AltModifier | Qt::MetaModifier)) == Qt::NoModifier)) {
+ if (!text.isEmpty() && (text.at(0).isPrint() || text.at(0) == QLatin1Char('\t'))) {
if (overwriteMode
// no need to call deleteChar() if we have a selection, insertText
// does it already
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index d1067a8..c7f3e97 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -2169,8 +2169,7 @@ void QLineEdit::keyPressEvent(QKeyEvent *event)
if (unknown && !d->readOnly) {
QString t = event->text();
- if (!t.isEmpty() && t.at(0).isPrint() &&
- ((event->modifiers() & (Qt::ControlModifier | Qt::AltModifier | Qt::MetaModifier)) == Qt::NoModifier)) {
+ if (!t.isEmpty() && t.at(0).isPrint()) {
insert(t);
#ifndef QT_NO_COMPLETER
d->complete(event->key());