forked from qt-creator/qt-creator
Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I88edd91395849574436299b8badda21bb93bea39 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -189,7 +189,7 @@ void TarPackageCreationStep::deployFinished(bool success)
|
||||
const Kit *kit = target()->kit();
|
||||
|
||||
// Store files that have been tar'd and successfully deployed
|
||||
for (const DeployableFile &file : qAsConst(m_files))
|
||||
for (const DeployableFile &file : std::as_const(m_files))
|
||||
m_deployTimes.saveDeploymentTimeStamp(file, kit, QDateTime());
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ bool TarPackageCreationStep::doPackage()
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const DeployableFile &d : qAsConst(m_files)) {
|
||||
for (const DeployableFile &d : std::as_const(m_files)) {
|
||||
if (d.remoteDirectory().isEmpty()) {
|
||||
emit addOutput(Tr::tr("No remote path specified for file \"%1\", skipping.")
|
||||
.arg(d.localFilePath().toUserOutput()), OutputFormat::ErrorMessage);
|
||||
|
||||
Reference in New Issue
Block a user