Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
System
KSystemLog
Commits
059290a2
Commit
059290a2
authored
Jul 06, 2021
by
Laurent Montel
😁
Browse files
Use std::as_const
parent
a558c783
Pipeline
#68887
passed with stage
in 9 minutes and 22 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/configurationDialog.cpp
View file @
059290a2
...
...
@@ -69,7 +69,7 @@ void ConfigurationDialog::setupLogModeConfigurations()
mLogModeConfigurations
.
append
(
logMode
->
logModeConfigurationWidget
());
}
for
(
LogModeConfigurationWidget
*
logModeConfigurationWidget
:
qAsC
onst
(
mLogModeConfigurations
))
{
for
(
LogModeConfigurationWidget
*
logModeConfigurationWidget
:
std
::
as_c
onst
(
mLogModeConfigurations
))
{
logDebug
()
<<
"Adding "
<<
logModeConfigurationWidget
->
itemName
()
<<
" configuration..."
;
addPage
(
logModeConfigurationWidget
,
...
...
@@ -106,7 +106,7 @@ void ConfigurationDialog::updateSettings()
mGeneralConfiguration
->
saveConfig
();
for
(
LogModeConfigurationWidget
*
logModeConfigurationWidget
:
qAsC
onst
(
mLogModeConfigurations
))
{
for
(
LogModeConfigurationWidget
*
logModeConfigurationWidget
:
std
::
as_c
onst
(
mLogModeConfigurations
))
{
logModeConfigurationWidget
->
saveConfig
();
}
...
...
@@ -129,7 +129,7 @@ void ConfigurationDialog::updateConfiguration()
bool
valid
=
mGeneralConfiguration
->
isValid
();
if
(
valid
)
{
for
(
LogModeConfigurationWidget
*
logModeConfigurationWidget
:
qAsC
onst
(
mLogModeConfigurations
))
{
for
(
LogModeConfigurationWidget
*
logModeConfigurationWidget
:
std
::
as_c
onst
(
mLogModeConfigurations
))
{
if
(
!
logModeConfigurationWidget
->
isValid
())
{
valid
=
false
;
break
;
...
...
@@ -159,7 +159,7 @@ void ConfigurationDialog::updateWidgets()
logDebug
()
<<
"Reading configuration..."
;
mGeneralConfiguration
->
readConfig
();
for
(
LogModeConfigurationWidget
*
logModeConfigurationWidget
:
qAsC
onst
(
mLogModeConfigurations
))
{
for
(
LogModeConfigurationWidget
*
logModeConfigurationWidget
:
std
::
as_c
onst
(
mLogModeConfigurations
))
{
logModeConfigurationWidget
->
readConfig
();
}
...
...
@@ -171,7 +171,7 @@ void ConfigurationDialog::updateWidgetsDefault()
logDebug
()
<<
"Loading default configuration..."
;
mGeneralConfiguration
->
defaultConfig
();
for
(
LogModeConfigurationWidget
*
logModeConfigurationWidget
:
qAsC
onst
(
mLogModeConfigurations
))
{
for
(
LogModeConfigurationWidget
*
logModeConfigurationWidget
:
std
::
as_c
onst
(
mLogModeConfigurations
))
{
logModeConfigurationWidget
->
defaultConfig
();
}
...
...
src/lib/globals.cpp
View file @
059290a2
...
...
@@ -258,7 +258,7 @@ void Globals::recreateLogModeActions()
d
->
mLogModeActions
.
clear
();
// Create new log mode action for each log mode.
for
(
LogModeFactory
*
factory
:
qAsC
onst
(
d
->
mFactories
))
{
for
(
LogModeFactory
*
factory
:
std
::
as_c
onst
(
d
->
mFactories
))
{
LogModeAction
*
logModeAction
=
factory
->
createLogModeAction
();
if
(
logModeAction
)
{
d
->
mLogModeActions
.
append
(
logModeAction
);
...
...
src/lib/logViewColumns.cpp
View file @
059290a2
...
...
@@ -90,7 +90,7 @@ QStringList LogViewColumns::toStringList() const
QStringList
columnNames
;
columnNames
.
reserve
(
mColumns
.
count
());
for
(
const
LogViewColumn
&
column
:
qAsC
onst
(
mColumns
))
{
for
(
const
LogViewColumn
&
column
:
std
::
as_c
onst
(
mColumns
))
{
columnNames
.
append
(
column
.
columnName
());
}
...
...
src/modes/journald/journaldConfiguration.cpp
View file @
059290a2
...
...
@@ -59,7 +59,7 @@ void JournaldConfiguration::setEntriesType(JournaldConfiguration::EntriesType en
QVector
<
JournalAddress
>
JournaldConfiguration
::
remoteJournals
()
const
{
QVector
<
JournalAddress
>
journals
;
for
(
const
QString
&
addressItem
:
qAsC
onst
(
mRemoteJournals
))
{
for
(
const
QString
&
addressItem
:
std
::
as_c
onst
(
mRemoteJournals
))
{
JournalAddress
addressInfo
;
addressInfo
.
address
=
addressItem
.
section
(
QChar
::
fromLatin1
(
'|'
),
0
,
0
);
addressInfo
.
port
=
addressItem
.
section
(
QChar
::
fromLatin1
(
'|'
),
1
,
1
).
toUInt
();
...
...
src/tabLogViewsWidget.cpp
View file @
059290a2
...
...
@@ -118,7 +118,7 @@ LogManager *TabLogViewsWidget::findRelatedLogManager(View *view)
TabLogManager
*
TabLogViewsWidget
::
findRelatedTabLogManager
(
View
*
view
)
const
{
for
(
TabLogManager
*
tabLogManager
:
qAsC
onst
(
mTabLogManagers
))
{
for
(
TabLogManager
*
tabLogManager
:
std
::
as_c
onst
(
mTabLogManagers
))
{
if
(
tabLogManager
->
logManager
()
->
usedView
()
==
view
)
{
return
tabLogManager
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment