forked from qt-creator/qt-creator
Don't call non-const methods on temporary QList
Otherwise it may unnecessarily detach. Either store a local const reference or call const equivalent (e.g. constFirst()). Change-Id: I96d665487cf28c17e72bea17f1b8f164ce06cc70 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -268,7 +268,7 @@ void PyLSClient::updateExtraCompilerContents(ExtraCompiler *compiler, const File
|
||||
|
||||
void PyLSClient::closeExtraCompiler(ProjectExplorer::ExtraCompiler *compiler)
|
||||
{
|
||||
const FilePath file = compiler->targets().first();
|
||||
const FilePath file = compiler->targets().constFirst();
|
||||
m_extraCompilerOutputDir.pathAppended(file.fileName()).removeFile();
|
||||
compiler->disconnect(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user