forked from qt-creator/qt-creator
		
	Fixed the line retreival for find-usages.
Instead of using the pre-processed source, the original one is used. This makes a difference when a macro is used in the line, where the pre- processed source would have a "#gen true" token. Task-number: QTCREATORBUG-3345
This commit is contained in:
		@@ -62,7 +62,7 @@ public:
 | 
			
		||||
class CPLUSPLUS_EXPORT FindUsages: protected ASTVisitor
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    FindUsages(Document::Ptr doc, const Snapshot &snapshot);
 | 
			
		||||
    FindUsages(const QByteArray &originalSource, Document::Ptr doc, const Snapshot &snapshot);
 | 
			
		||||
    FindUsages(const LookupContext &context);
 | 
			
		||||
 | 
			
		||||
    void operator()(Symbol *symbol);
 | 
			
		||||
@@ -75,8 +75,6 @@ protected:
 | 
			
		||||
 | 
			
		||||
    Scope *switchScope(Scope *scope);
 | 
			
		||||
 | 
			
		||||
    QString matchingLine(const Token &tk) const;
 | 
			
		||||
 | 
			
		||||
    void reportResult(unsigned tokenIndex, const Name *name, Scope *scope = 0);
 | 
			
		||||
    void reportResult(unsigned tokenIndex, const Identifier *id, Scope *scope = 0);
 | 
			
		||||
    void reportResult(unsigned tokenIndex, const QList<LookupItem> &candidates);
 | 
			
		||||
@@ -295,6 +293,7 @@ private:
 | 
			
		||||
    Document::Ptr _doc;
 | 
			
		||||
    Snapshot _snapshot;
 | 
			
		||||
    LookupContext _context;
 | 
			
		||||
    QByteArray _originalSource;
 | 
			
		||||
    QByteArray _source;
 | 
			
		||||
    QList<int> _references;
 | 
			
		||||
    QList<Usage> _usages;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user