Git commit 5c5495929fcfa0dd9d75ae76bbbf190cdac3e428 by Simone Gaiarin.
Committed on 25/06/2019 at 17:23.
Pushed by gaiarin into branch '5.3'.

Fix browse mode not disabled after Ctrl is released

M  +2    -0    doc/kdevelop/index.docbook
M  +1    -1    plugins/contextbrowser/browsemanager.cpp

https://invent.kde.org/kde/kdevelop/commit/5c5495929fcfa0dd9d75ae76bbbf190cdac3e428

diff --git a/doc/kdevelop/index.docbook b/doc/kdevelop/index.docbook
index e611d32624..9a708e1179 100644
--- a/doc/kdevelop/index.docbook
+++ b/doc/kdevelop/index.docbook
@@ -384,6 +384,8 @@ double bar ()
   </mediaobject>
 </screenshot> Clicking on the links for the declaration of a symbol or 
expanding the list of uses allows you to jump to these locations, if necessary 
opening the respective file and placing the cursor at the corresponding 
location. A similar effect can be achieved by using the <guilabel>Code 
Browser</guilabel> tool view also discussed previously.
 </para></listitem>
+<listitem><para>A quicker way to jump to the declaration of a symbol without 
having to click on the links in the tooltip is to temporary enabling 
<guilabel>Source Browse Mode</guilabel> by holding down the &Alt; or &Ctrl; 
key. In this mode, it is possible to directly click on any symbol in the editor 
to jump to its declaration.
+</para></listitem>
 <listitem><para><guilabel>Quick open</guilabel>: A very powerful way of 
jumping to other files or locations is to use the various <emphasis>quick 
open</emphasis> methods in &kdevelop;. There are four versions of these:
 <itemizedlist>
 <listitem><para><guilabel>Quick open class</guilabel> 
(<menuchoice><guimenu>Navigate</guimenu><guimenuitem>Quick open 
class</guimenuitem></menuchoice> or 
<keycombo>&Alt;&Ctrl;<keycap>C</keycap></keycombo>): You will get a list of all 
classes in this session. Start typing (a part of) the name of a class and the 
list will continue to whittle down to only those that actually match what 
you've typed so far. If the list is short enough, select an element using the 
up and down keys and &kdevelop; will get you to the place where the class is 
declared.
diff --git a/plugins/contextbrowser/browsemanager.cpp 
b/plugins/contextbrowser/browsemanager.cpp
index f81685d291..3afb39ce13 100644
--- a/plugins/contextbrowser/browsemanager.cpp
+++ b/plugins/contextbrowser/browsemanager.cpp
@@ -211,7 +211,7 @@ bool BrowseManager::eventFilter(QObject * watched, QEvent * 
event) {
 
     QFocusEvent* focusEvent = dynamic_cast<QFocusEvent*>(event);
     //Eventually stop key-browsing
-    if((keyEvent && m_browsingByKey && keyEvent->key() == m_browsingByKey && 
keyEvent->type() == QEvent::KeyRelease)
+    if((keyEvent && m_browsingByKey && ( keyEvent->key() == m_browsingByKey || 
keyEvent->modifiers() == Qt::ControlModifier ) && keyEvent->type() == 
QEvent::KeyRelease)
         || (focusEvent && focusEvent->lostFocus()) || event->type() == 
QEvent::WindowDeactivate) {
         m_browsingByKey = 0;
         emit stopDelayedBrowsing();

Reply via email to