CppEditor: Re-use also the code to find the right index

Don't calculate the right QModelIndex twice.
This commit is contained in:
Kai Koehne
2010-07-08 16:00:41 +02:00
parent 2ba49e4e72
commit 82497a9545
4 changed files with 49 additions and 73 deletions

View File

@@ -39,12 +39,10 @@ public:
private slots:
void modelUpdated();
void updateSelectionInTree();
void updateSelectionInTree(const QModelIndex &index);
void updateSelectionInText(const QItemSelection &selection);
private:
QModelIndex indexForPosition(const QModelIndex &rootIndex, int line, int column);
bool positionInsideSymbol(unsigned cursorLine, unsigned cursorColumn, CPlusPlus::Symbol *symbol) const;
bool syncCursor();
private: