forked from qt-creator/qt-creator
Callgrind: Avoid an extra call to QDir::entryList()
Change-Id: I22220ccafe64b2eede3ac7d360b8fabe7ccc2b85 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
c8c642dde0
commit
136e0f69e4
@@ -225,11 +225,11 @@ void CallgrindController::getLocalDataFile()
|
|||||||
// this, &CallgrindController::foundRemoteFile);
|
// this, &CallgrindController::foundRemoteFile);
|
||||||
// m_findRemoteFile->start();
|
// m_findRemoteFile->start();
|
||||||
} else {
|
} else {
|
||||||
QDir dir(workingDir, QString::fromLatin1("%1.*").arg(baseFileName), QDir::Time);
|
const QDir dir(workingDir, QString::fromLatin1("%1.*").arg(baseFileName), QDir::Time);
|
||||||
QStringList outputFiles = dir.entryList();
|
const QStringList outputFiles = dir.entryList();
|
||||||
// if there are files like callgrind.out.PID.NUM, set it to the most recent one of those
|
// if there are files like callgrind.out.PID.NUM, set it to the most recent one of those
|
||||||
if (!outputFiles.isEmpty())
|
if (!outputFiles.isEmpty())
|
||||||
fileName = workingDir + QLatin1Char('/') + dir.entryList().first();
|
fileName = workingDir + QLatin1Char('/') + outputFiles.first();
|
||||||
|
|
||||||
emit localParseDataAvailable(fileName);
|
emit localParseDataAvailable(fileName);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user