Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 9fdff87b authored by Kurt Hindenburg's avatar Kurt Hindenburg

Mostly revert of "Allow view-controlling keys in read-only mode"

I should have just reverted the entire commit.

(cherry picked from commit 4c68ff3f)
parent 7f2af0da
......@@ -3421,6 +3421,12 @@ void TerminalDisplay::scrollScreenWindow(enum ScreenWindow::RelativeScrollMode m
void TerminalDisplay::keyPressEvent(QKeyEvent* event)
{
if (_readOnly) {
event->accept();
return;
}
if ((_urlHintsModifiers != 0u) && event->modifiers() == _urlHintsModifiers) {
int hintSelected = event->key() - 0x31;
if (hintSelected >= 0 && hintSelected < 10 && hintSelected < _filterChain->hotSpots().count()) {
......@@ -3437,29 +3443,25 @@ void TerminalDisplay::keyPressEvent(QKeyEvent* event)
}
}
if (!_readOnly) {
_screenWindow->screen()->setCurrentTerminalDisplay(this);
_screenWindow->screen()->setCurrentTerminalDisplay(this);
_actSel = 0; // Key stroke implies a screen update, so TerminalDisplay won't
// know where the current selection is.
_actSel = 0; // Key stroke implies a screen update, so TerminalDisplay won't
// know where the current selection is.
if (_allowBlinkingCursor) {
_blinkCursorTimer->start();
if (_cursorBlinking) {
// if cursor is blinking(hidden), blink it again to show it
blinkCursorEvent();
}
Q_ASSERT(!_cursorBlinking);
if (_allowBlinkingCursor) {
_blinkCursorTimer->start();
if (_cursorBlinking) {
// if cursor is blinking(hidden), blink it again to show it
blinkCursorEvent();
}
Q_ASSERT(!_cursorBlinking);
}
emit keyPressedSignal(event);
#ifndef QT_NO_ACCESSIBILITY
if (!_readOnly) {
QAccessibleTextCursorEvent textCursorEvent(this, _usedColumns * screenWindow()->screen()->getCursorY() + screenWindow()->screen()->getCursorX());
QAccessible::updateAccessibility(&textCursorEvent);
}
QAccessibleTextCursorEvent textCursorEvent(this, _usedColumns * screenWindow()->screen()->getCursorY() + screenWindow()->screen()->getCursorX());
QAccessible::updateAccessibility(&textCursorEvent);
#endif
event->accept();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment