From 785a984f38ab489e4629f4b215e519375b4daf45 Mon Sep 17 00:00:00 2001 From: kezi olio Date: Sat, 5 Oct 2019 21:18:32 +0000 Subject: [PATCH] Remove obfuscated code from okular's source code --- ui/pageview.cpp | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/ui/pageview.cpp b/ui/pageview.cpp index 217c45010..17edb466a 100644 --- a/ui/pageview.cpp +++ b/ui/pageview.cpp @@ -2001,25 +2001,24 @@ void PageView::keyPressEvent( QKeyEvent * e ) switch ( e->key() ) { case Qt::Key_J: - case Qt::Key_K: case Qt::Key_Down: + slotScrollDown( true /* singleStep */ ); + break; + case Qt::Key_PageDown: + slotScrollDown(); + break; + + case Qt::Key_K: case Qt::Key_Up: + slotScrollUp( true /* singleStep */ ); + break; + case Qt::Key_PageUp: case Qt::Key_Backspace: - if ( e->key() == Qt::Key_Down - || e->key() == Qt::Key_PageDown - || e->key() == Qt::Key_J ) - { - bool singleStep = e->key() == Qt::Key_Down || e->key() == Qt::Key_J; - slotScrollDown( singleStep ); - } - else - { - bool singleStep = e->key() == Qt::Key_Up || e->key() == Qt::Key_K; - slotScrollUp( singleStep ); - } - break; + slotScrollUp(); + break; + case Qt::Key_Left: case Qt::Key_H: if ( horizontalScrollBar()->maximum() == 0 )