Changeset View
Changeset View
Standalone View
Standalone View
plugins/contextbrowser/browsemanager.cpp
Show First 20 Lines • Show All 187 Lines • ▼ Show 20 Line(s) | 187 | { | |||
---|---|---|---|---|---|
188 | //Completion is active. | 188 | //Completion is active. | ||
189 | avoidMenuAltFocus(); | 189 | avoidMenuAltFocus(); | ||
190 | }else{ | 190 | }else{ | ||
191 | m_browsingStartedInView = view; | 191 | m_browsingStartedInView = view; | ||
192 | } | 192 | } | ||
193 | } | 193 | } | ||
194 | } | 194 | } | ||
195 | 195 | | |||
196 | if (keyEvent && m_browsingByKey && m_browsingStartedInView && keyEvent->type() == QEvent::KeyPress) { | ||||
197 | if (keyEvent->key() >= Qt::Key_1 && keyEvent->key() <= Qt::Key_9) { | ||||
198 | // user wants to trigger an action in the code browser | ||||
199 | const int index = keyEvent->key() - Qt::Key_1; | ||||
200 | emit invokeAction(index); | ||||
201 | stopDelayedBrowsing(); | ||||
202 | return true; | ||||
203 | } | ||||
204 | } | ||||
205 | | ||||
196 | if(!view) { | 206 | if(!view) { | ||
197 | return false; | 207 | return false; | ||
198 | } | 208 | } | ||
199 | 209 | | |||
200 | QFocusEvent* focusEvent = dynamic_cast<QFocusEvent*>(event); | 210 | QFocusEvent* focusEvent = dynamic_cast<QFocusEvent*>(event); | ||
201 | //Eventually stop key-browsing | 211 | //Eventually stop key-browsing | ||
202 | if((keyEvent && m_browsingByKey && keyEvent->key() == m_browsingByKey && keyEvent->type() == QEvent::KeyRelease) | 212 | if((keyEvent && m_browsingByKey && keyEvent->key() == m_browsingByKey && keyEvent->type() == QEvent::KeyRelease) | ||
203 | || (focusEvent && focusEvent->lostFocus()) || event->type() == QEvent::WindowDeactivate) { | 213 | || (focusEvent && focusEvent->lostFocus()) || event->type() == QEvent::WindowDeactivate) { | ||
▲ Show 20 Lines • Show All 128 Lines • Show Last 20 Lines |