Changeset View
Changeset View
Standalone View
Standalone View
autotests/src/vimode/emulatedcommandbarsetupandteardown.cpp
Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Line(s) | |||||
63 | { | 63 | { | ||
64 | m_window->show(); | 64 | m_window->show(); | ||
65 | m_view->show(); | 65 | m_view->show(); | ||
66 | QApplication::setActiveWindow(m_window); | 66 | QApplication::setActiveWindow(m_window); | ||
67 | m_view->setFocus(); | 67 | m_view->setFocus(); | ||
68 | while (QApplication::hasPendingEvents()) { | 68 | while (QApplication::hasPendingEvents()) { | ||
69 | QApplication::processEvents(); | 69 | QApplication::processEvents(); | ||
70 | } | 70 | } | ||
71 | KateViewConfig::global()->setViInputModeStealKeys(true); | 71 | KateViewConfig::global()->setValue(KateViewConfig::ViInputModeStealKeys, true); | ||
72 | m_window->installEventFilter(&m_windowKeepActive); | 72 | m_window->installEventFilter(&m_windowKeepActive); | ||
73 | } | 73 | } | ||
74 | EmulatedCommandBarSetUpAndTearDown::~EmulatedCommandBarSetUpAndTearDown() | 74 | EmulatedCommandBarSetUpAndTearDown::~EmulatedCommandBarSetUpAndTearDown() | ||
75 | { | 75 | { | ||
76 | m_window->removeEventFilter(&m_windowKeepActive); | 76 | m_window->removeEventFilter(&m_windowKeepActive); | ||
77 | // Use invokeMethod to avoid having to export KateViewBar for testing. | 77 | // Use invokeMethod to avoid having to export KateViewBar for testing. | ||
78 | QMetaObject::invokeMethod(m_viInputMode->viModeEmulatedCommandBar(), "hideMe"); | 78 | QMetaObject::invokeMethod(m_viInputMode->viModeEmulatedCommandBar(), "hideMe"); | ||
79 | m_view->hide(); | 79 | m_view->hide(); | ||
80 | m_window->hide(); | 80 | m_window->hide(); | ||
81 | KateViewConfig::global()->setViInputModeStealKeys(false); | 81 | KateViewConfig::global()->setValue(KateViewConfig::ViInputModeStealKeys, false); | ||
82 | while (QApplication::hasPendingEvents()) { | 82 | while (QApplication::hasPendingEvents()) { | ||
83 | QApplication::processEvents(); | 83 | QApplication::processEvents(); | ||
84 | } | 84 | } | ||
85 | } | 85 | } | ||
86 | 86 | | |||
87 | //END: EmulatedCommandBarSetUpAndTearDown | 87 | //END: EmulatedCommandBarSetUpAndTearDown | ||
88 | 88 | |