forked from qt-creator/qt-creator
Remove some lambdas from Utils::transform calls
It is often possible to user (member) functions or members directly. That improves readablility and potentially reduces the total number of symbols. Also use qobject_container_cast at places where it is appropriate. Change-Id: Ia2591bca356591e001e2c53eeebcf753e5bc3c37 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -353,10 +353,7 @@ void MainWindow::closeEvent(QCloseEvent *event)
|
||||
void MainWindow::openDroppedFiles(const QList<DropSupport::FileSpec> &files)
|
||||
{
|
||||
raiseWindow();
|
||||
QStringList filePaths = Utils::transform(files,
|
||||
[](const DropSupport::FileSpec &spec) -> QString {
|
||||
return spec.filePath;
|
||||
});
|
||||
QStringList filePaths = Utils::transform(files, &DropSupport::FileSpec::filePath);
|
||||
openFiles(filePaths, ICore::SwitchMode);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user