From kde-commits Tue Dec 31 19:11:19 2013 From: Michal Humpula Date: Tue, 31 Dec 2013 19:11:19 +0000 To: kde-commits Subject: [kate/frameworks] /: fix viemulatedcommandbar tests Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=138851708827436 Git commit efac51e1b2f5288d0fce425e17ff00aa0684a011 by Michal Humpula. Committed on 31/12/2013 at 18:56. Pushed by michalhumpula into branch 'frameworks'. fix viemulatedcommandbar tests M +5 -0 part/vimode/kateviemulatedcommandbar.cpp M +2 -0 tests/vimode_test.cpp http://commits.kde.org/kate/efac51e1b2f5288d0fce425e17ff00aa0684a011 diff --git a/part/vimode/kateviemulatedcommandbar.cpp b/part/vimode/katevie= mulatedcommandbar.cpp index a18bfa5..87b161c 100644 --- a/part/vimode/kateviemulatedcommandbar.cpp +++ b/part/vimode/kateviemulatedcommandbar.cpp @@ -1106,6 +1106,11 @@ bool KateViEmulatedCommandBar::handleKeyPress(const = QKeyEvent* keyEvent) m_edit->setCursorPosition(0); return true; } + else if (keyEvent->key() =3D=3D Qt::Key_E) + { + m_edit->setCursorPosition(m_edit->text().length()); + return true; + } else if (keyEvent->key() =3D=3D Qt::Key_W) { deleteSpacesToLeftOfCursor(); diff --git a/tests/vimode_test.cpp b/tests/vimode_test.cpp index 5e52986..eca1e51 100644 --- a/tests/vimode_test.cpp +++ b/tests/vimode_test.cpp @@ -7314,6 +7314,8 @@ void ViModeTest::waitForEmulatedCommandBarToHide(long= int timeout) { QApplication::processEvents(); } + //FIXME: seems like this debug message helps to pass a test... wtf? + qDebug() << "waited: " << waitStartedTime.msecsTo(QDateTime::currentDate= Time()); QVERIFY(!emulatedCommandBar()->isVisible()); } =20