Commit a767da6f2d0fbee707f5c2fe896fa501b3da6b07
Fix for number entry in QDateTimeEntry using Shift+KeyPad (QTBUG-7842)
Merge-request: 2300
Reviewed-by: Olivier Goffart <ogoffart@trolltech.com>
| |   |
| 1175 | 1175 | return; } |
| 1176 | 1176 | } |
| 1177 | 1177 | QAbstractSpinBox::keyPressEvent(event); |
| if (select && !(event->modifiers() & Qt::ShiftModifier) && !d->edit->hasSelectedText()) { |
| if (select && !d->edit->hasSelectedText()) { |
| 1179 | 1179 | if (inserted && d->sectionAt(d->edit->cursorPosition()) == QDateTimeParser::NoSectionIndex) { |
| 1180 | 1180 | QString str = d->displayText(); |
| 1181 | 1181 | int pos = d->edit->cursorPosition(); |
| |   |
| 3357 | 3357 | QTest::addColumn<Qt::KeyboardModifiers>("modifiers"); |
| 3358 | 3358 | QTest::newRow("None") << (Qt::KeyboardModifiers)Qt::NoModifier; |
| 3359 | 3359 | QTest::newRow("Keypad") << (Qt::KeyboardModifiers)Qt::KeypadModifier; |
| // QTBUG-7842: Using KeyPad with shift (numlock off) |
| QTest::newRow("Keypad+Shift") << (Qt::KeyboardModifiers)(Qt::KeypadModifier|Qt::ShiftModifier); |
| 3360 | 3362 | } |
| 3361 | 3363 | |
| 3362 | 3364 | |