forked from qt-creator/qt-creator
Debugger: Use iterateDirectory
Change-Id: I37010d4b33ac1c555f05abe91376b9befe9fa65c Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -1603,17 +1603,20 @@ QString GdbEngine::cleanupFullName(const QString &fileName)
|
|||||||
return cleanFilePath;
|
return cleanFilePath;
|
||||||
}
|
}
|
||||||
if (m_baseNameToFullName.isEmpty()) {
|
if (m_baseNameToFullName.isEmpty()) {
|
||||||
QString debugSource = sysroot + "/usr/src/debug";
|
FilePath filePath = FilePath::fromString(sysroot + "/usr/src/debug");
|
||||||
if (QFileInfo(debugSource).isDir()) {
|
|
||||||
QDirIterator it(debugSource, QDirIterator::Subdirectories);
|
if (filePath.isDir()) {
|
||||||
while (it.hasNext()) {
|
filePath.iterateDirectory(
|
||||||
it.next();
|
[this](const FilePath &filePath) {
|
||||||
QString name = it.fileName();
|
QString name = filePath.fileName();
|
||||||
if (!name.startsWith('.')) {
|
if (!name.startsWith('.')) {
|
||||||
QString path = it.filePath();
|
QString path = filePath.path();
|
||||||
m_baseNameToFullName.insert(name, path);
|
m_baseNameToFullName.insert(name, path);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
{"*"},
|
||||||
|
QDir::NoFilter,
|
||||||
|
QDirIterator::Subdirectories);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user