forked from qt-creator/qt-creator
CMakeProjectManager: Select the expected CMakeLists.txt for targets
When using locator with "cmo <target>" do not select the deepest CMakeLists.txt in the stack. Fixes: QTCREATORBUG-25166 Change-Id: I25437c3ddc57b7bf12213aefa51eb5f4fd853326 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -76,8 +76,8 @@ void CMakeTargetLocatorFilter::prepareSearch(const QString &entry)
|
|||||||
const int index = target.title.indexOf(entry);
|
const int index = target.title.indexOf(entry);
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
const FilePath path = target.backtrace.isEmpty() ? cmakeProject->projectFilePath()
|
const FilePath path = target.backtrace.isEmpty() ? cmakeProject->projectFilePath()
|
||||||
: target.backtrace.first().path;
|
: target.backtrace.last().path;
|
||||||
const int line = target.backtrace.isEmpty() ? -1 : target.backtrace.first().line;
|
const int line = target.backtrace.isEmpty() ? -1 : target.backtrace.last().line;
|
||||||
|
|
||||||
QVariantMap extraData;
|
QVariantMap extraData;
|
||||||
extraData.insert("project", cmakeProject->projectFilePath().toString());
|
extraData.insert("project", cmakeProject->projectFilePath().toString());
|
||||||
|
Reference in New Issue
Block a user