forked from qt-creator/qt-creator
		
	CppTools: Use cursor range for better outline navigation
Clang provides cursor range for each declaration in symbol outline. Use that information to search for more accurate correspondence between a cursor position in editor and an entry in symbol outline. For example skip indexes with not matching ranges to prevent pure declarations from automatically become parents of everything coming after them. Change-Id: I0ef95c26772050cd6655e830288c46118aba38bb Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
		@@ -32,6 +32,8 @@
 | 
			
		||||
 | 
			
		||||
#include <QSharedPointer>
 | 
			
		||||
 | 
			
		||||
#include <utility>
 | 
			
		||||
 | 
			
		||||
namespace CPlusPlus { class Document; }
 | 
			
		||||
 | 
			
		||||
namespace Utils {
 | 
			
		||||
@@ -91,6 +93,9 @@ public:
 | 
			
		||||
    virtual Utils::Link linkFromIndex(const QModelIndex &) const = 0;
 | 
			
		||||
    virtual Utils::LineColumn lineColumnFromIndex(const QModelIndex &) const = 0;
 | 
			
		||||
 | 
			
		||||
    using Range = std::pair<Utils::LineColumn, Utils::LineColumn>;
 | 
			
		||||
    virtual Range rangeFromIndex(const QModelIndex &) const = 0;
 | 
			
		||||
 | 
			
		||||
signals:
 | 
			
		||||
    void needsUpdate();
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user