Commit 80d85e28 authored by con's avatar con

Locator Cpp filters can jump to a column too.

parent 3cee7dad
......@@ -135,5 +135,5 @@ QList<Locator::FilterEntry> CppLocatorFilter::matchesFor(const QString &origEntr
void CppLocatorFilter::accept(Locator::FilterEntry selection) const
{
ModelItemInfo info = qvariant_cast<CppTools::Internal::ModelItemInfo>(selection.internalData);
TextEditor::BaseTextEditor::openEditorAt(info.fileName, info.line);
TextEditor::BaseTextEditor::openEditorAt(info.fileName, info.line, info.column);
}
......@@ -213,5 +213,6 @@ void SearchSymbols::appendItem(const QString &name,
items.append(ModelItemInfo(name, info, type,
QString::fromUtf8(symbol->fileName(), symbol->fileNameLength()),
symbol->line(),
symbol->column() - 1, // 1-based vs 0-based column
icon));
}
......@@ -60,12 +60,14 @@ struct ModelItemInfo
ItemType type,
const QString &fileName,
int line,
int column,
const QIcon &icon)
: symbolName(symbolName),
symbolType(symbolType),
type(type),
fileName(fileName),
line(line),
column(column),
icon(icon)
{ }
......@@ -74,6 +76,7 @@ struct ModelItemInfo
ItemType type;
QString fileName;
int line;
int column;
QIcon icon;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment