Commit 059290a2 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use std::as_const

parent a558c783
Pipeline #68887 passed with stage
in 9 minutes and 22 seconds
......@@ -69,7 +69,7 @@ void ConfigurationDialog::setupLogModeConfigurations()
mLogModeConfigurations.append(logMode->logModeConfigurationWidget());
}
for (LogModeConfigurationWidget *logModeConfigurationWidget : qAsConst(mLogModeConfigurations)) {
for (LogModeConfigurationWidget *logModeConfigurationWidget : std::as_const(mLogModeConfigurations)) {
logDebug() << "Adding " << logModeConfigurationWidget->itemName() << " configuration...";
addPage(logModeConfigurationWidget,
......@@ -106,7 +106,7 @@ void ConfigurationDialog::updateSettings()
mGeneralConfiguration->saveConfig();
for (LogModeConfigurationWidget *logModeConfigurationWidget : qAsConst(mLogModeConfigurations)) {
for (LogModeConfigurationWidget *logModeConfigurationWidget : std::as_const(mLogModeConfigurations)) {
logModeConfigurationWidget->saveConfig();
}
......@@ -129,7 +129,7 @@ void ConfigurationDialog::updateConfiguration()
bool valid = mGeneralConfiguration->isValid();
if (valid) {
for (LogModeConfigurationWidget *logModeConfigurationWidget : qAsConst(mLogModeConfigurations)) {
for (LogModeConfigurationWidget *logModeConfigurationWidget : std::as_const(mLogModeConfigurations)) {
if (!logModeConfigurationWidget->isValid()) {
valid = false;
break;
......@@ -159,7 +159,7 @@ void ConfigurationDialog::updateWidgets()
logDebug() << "Reading configuration...";
mGeneralConfiguration->readConfig();
for (LogModeConfigurationWidget *logModeConfigurationWidget : qAsConst(mLogModeConfigurations)) {
for (LogModeConfigurationWidget *logModeConfigurationWidget : std::as_const(mLogModeConfigurations)) {
logModeConfigurationWidget->readConfig();
}
......@@ -171,7 +171,7 @@ void ConfigurationDialog::updateWidgetsDefault()
logDebug() << "Loading default configuration...";
mGeneralConfiguration->defaultConfig();
for (LogModeConfigurationWidget *logModeConfigurationWidget : qAsConst(mLogModeConfigurations)) {
for (LogModeConfigurationWidget *logModeConfigurationWidget : std::as_const(mLogModeConfigurations)) {
logModeConfigurationWidget->defaultConfig();
}
......
......@@ -258,7 +258,7 @@ void Globals::recreateLogModeActions()
d->mLogModeActions.clear();
// Create new log mode action for each log mode.
for (LogModeFactory *factory : qAsConst(d->mFactories)) {
for (LogModeFactory *factory : std::as_const(d->mFactories)) {
LogModeAction *logModeAction = factory->createLogModeAction();
if (logModeAction) {
d->mLogModeActions.append(logModeAction);
......
......@@ -90,7 +90,7 @@ QStringList LogViewColumns::toStringList() const
QStringList columnNames;
columnNames.reserve(mColumns.count());
for (const LogViewColumn &column : qAsConst(mColumns)) {
for (const LogViewColumn &column : std::as_const(mColumns)) {
columnNames.append(column.columnName());
}
......
......@@ -59,7 +59,7 @@ void JournaldConfiguration::setEntriesType(JournaldConfiguration::EntriesType en
QVector<JournalAddress> JournaldConfiguration::remoteJournals() const
{
QVector<JournalAddress> journals;
for (const QString &addressItem : qAsConst(mRemoteJournals)) {
for (const QString &addressItem : std::as_const(mRemoteJournals)) {
JournalAddress addressInfo;
addressInfo.address = addressItem.section(QChar::fromLatin1('|'), 0, 0);
addressInfo.port = addressItem.section(QChar::fromLatin1('|'), 1, 1).toUInt();
......
......@@ -118,7 +118,7 @@ LogManager *TabLogViewsWidget::findRelatedLogManager(View *view)
TabLogManager *TabLogViewsWidget::findRelatedTabLogManager(View *view) const
{
for (TabLogManager *tabLogManager : qAsConst(mTabLogManagers)) {
for (TabLogManager *tabLogManager : std::as_const(mTabLogManagers)) {
if (tabLogManager->logManager()->usedView() == view) {
return tabLogManager;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment