Use QString reference instead of copy in loop

This commit is contained in:
Nyall Dawson 2024-01-11 14:33:29 +10:00 committed by Jakub Melka
parent 221587c751
commit 2ed31dcd2c
1 changed files with 1 additions and 1 deletions

View File

@ -1778,7 +1778,7 @@ PDFColorProfileIdentifiers PDFCMSManager::getExternalProfilesImpl() const
if (directory.exists()) if (directory.exists())
{ {
QStringList colorDirectories = directory.entryList(QDir::Dirs | QDir::NoDotAndDotDot); QStringList colorDirectories = directory.entryList(QDir::Dirs | QDir::NoDotAndDotDot);
for (const QString colorDirectory : colorDirectories) for (const QString& colorDirectory : colorDirectories)
{ {
QString colorDirectoryName = directory.absoluteFilePath(colorDirectory); QString colorDirectoryName = directory.absoluteFilePath(colorDirectory);
directories << QDir::fromNativeSeparators(colorDirectoryName); directories << QDir::fromNativeSeparators(colorDirectoryName);