Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Workspace
Commits
0b09fe1b
Commit
0b09fe1b
authored
Oct 24, 2020
by
Alexander Lohnau
💬
Browse files
Solve clazy warnings about range based for loops
parent
ff9f6c8c
Changes
13
Hide whitespace changes
Inline
Side-by-side
applets/kicker/plugin/actionlist.cpp
View file @
0b09fe1b
...
...
@@ -259,7 +259,7 @@ QVariantList systemSettingsActions()
return
list
;
}
for
(
const
QString
&
id
:
ids
)
{
for
(
const
QString
&
id
:
qAsConst
(
ids
)
)
{
KService
::
Ptr
service
=
KService
::
serviceByStorageId
(
id
);
if
(
!
service
||
!
service
->
isValid
())
{
continue
;
...
...
applets/kicker/plugin/kastatsfavoritesmodel.cpp
View file @
0b09fe1b
...
...
@@ -416,7 +416,7 @@ public:
{
QStringList
ids
;
for
(
const
auto
&
item
:
m_items
)
{
for
(
const
auto
&
item
:
qAsConst
(
m_items
)
)
{
ids
<<
item
.
value
();
}
...
...
components/containmentlayoutmanager/appletslayout.cpp
View file @
0b09fe1b
...
...
@@ -481,7 +481,7 @@ void AppletsLayout::componentComplete()
m_layoutManager
->
parseLayout
(
m_containment
->
config
().
readEntry
(
m_configKey
,
""
));
}
QList
<
QObject
*>
appletObjects
=
m_containmentItem
->
property
(
"applets"
).
value
<
QList
<
QObject
*>
>
();
const
QList
<
QObject
*>
appletObjects
=
m_containmentItem
->
property
(
"applets"
).
value
<
QList
<
QObject
*>
>
();
for
(
auto
*
obj
:
appletObjects
)
{
PlasmaQuick
::
AppletQuickItem
*
appletItem
=
qobject_cast
<
PlasmaQuick
::
AppletQuickItem
*>
(
obj
);
...
...
components/containmentlayoutmanager/gridlayoutmanager.cpp
View file @
0b09fe1b
...
...
@@ -53,7 +53,7 @@ QString GridLayoutManager::serializeLayout() const
void
GridLayoutManager
::
parseLayout
(
const
QString
&
savedLayout
)
{
m_parsedConfig
.
clear
();
QStringList
itemsConfigs
=
savedLayout
.
split
(
QLatin1Char
(
';'
));
const
QStringList
itemsConfigs
=
savedLayout
.
split
(
QLatin1Char
(
';'
));
for
(
const
auto
&
itemString
:
itemsConfigs
)
{
QStringList
itemConfig
=
itemString
.
split
(
QLatin1Char
(
':'
));
...
...
@@ -153,7 +153,7 @@ void GridLayoutManager::resetLayoutFromConfig()
}
}
for
(
auto
*
item
:
missingItems
)
{
for
(
auto
*
item
:
qAsConst
(
missingItems
)
)
{
// NOTE: do not use positionItemAndAssign here, because we do not want to emit layoutNeedsSaving, to not save after resize
positionItem
(
item
);
assignSpaceImpl
(
item
);
...
...
components/containmentlayoutmanager/itemcontainer.cpp
View file @
0b09fe1b
...
...
@@ -409,7 +409,7 @@ void ItemContainer::componentComplete()
syncChildItemsGeometry
(
size
());
}
for
(
auto
*
o
:
m_contentData
)
{
for
(
auto
*
o
:
qAsConst
(
m_contentData
)
)
{
QQuickItem
*
item
=
qobject_cast
<
QQuickItem
*>
(
o
);
if
(
item
)
{
item
->
setParentItem
(
m_contentItem
);
...
...
components/shellprivate/interactiveconsole/interactiveconsole.cpp
View file @
0b09fe1b
...
...
@@ -377,7 +377,7 @@ void InteractiveConsole::populateTemplatesMenu()
return
left
.
name
()
<
right
.
name
();
});
KPackage
::
Package
package
=
KPackage
::
PackageLoader
::
self
()
->
loadPackage
(
QStringLiteral
(
"Plasma/LayoutTemplate"
));
for
(
const
auto
&
templateMetaData
:
templates
){
for
(
const
auto
&
templateMetaData
:
qAsConst
(
templates
)
)
{
package
.
setPath
(
templateMetaData
.
pluginId
());
const
QString
scriptFile
=
package
.
filePath
(
"mainscript"
);
if
(
!
scriptFile
.
isEmpty
())
{
...
...
components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp
View file @
0b09fe1b
...
...
@@ -141,7 +141,7 @@ bool PlasmaAppletItem::matches(const QString &pattern) const
const
QString
keywordsList
=
KPluginMetaData
::
readTranslatedString
(
m_info
.
rawData
(),
QStringLiteral
(
"Keywords"
));
const
auto
keywords
=
keywordsList
.
splitRef
(
QLatin1Char
(
';'
),
Qt
::
SkipEmptyParts
);
for
(
const
auto
keyword
:
keywords
)
{
for
(
const
auto
&
keyword
:
keywords
)
{
if
(
keyword
.
startsWith
(
pattern
,
Qt
::
CaseInsensitive
))
{
return
true
;
}
...
...
gmenu-dbusmenu-proxy/menu.cpp
View file @
0b09fe1b
...
...
@@ -90,7 +90,7 @@ void Menu::start(uint id)
const
bool
hadMenu
=
!
m_menus
.
isEmpty
();
const
auto
menus
=
reply
.
value
();
for
(
auto
menu
:
menus
)
{
for
(
const
auto
&
menu
:
menus
)
{
m_menus
[
menu
.
id
].
append
(
menus
);
}
...
...
kcms/feedback/feedback.cpp
View file @
0b09fe1b
...
...
@@ -61,7 +61,7 @@ Feedback::Feedback(QObject *parent, const QVariantList &args)
QStringLiteral
(
"1.0"
),
i18n
(
"Configure user feedback settings"
),
KAboutLicense
::
LGPL
));
QVector
<
QProcess
*>
processes
;
for
(
const
auto
exec
:
s_programs
.
keys
())
{
for
(
const
auto
&
exec
:
s_programs
.
keys
())
{
QProcess
*
p
=
new
QProcess
(
this
);
p
->
setProgram
(
exec
);
p
->
setArguments
({
QStringLiteral
(
"--feedback"
)});
...
...
kcms/style/gtkthemesmodel.cpp
View file @
0b09fe1b
...
...
@@ -134,8 +134,8 @@ QStringList GtkThemesModel::possiblePathsToThemes()
QStandardPaths
::
LocateDirectory
);
themesLocationsPaths
<<
QDir
::
homePath
()
+
QStringLiteral
(
"/.themes"
);
for
(
const
QString
&
themesLocationPath
:
themesLocationsPaths
)
{
QStringList
possibleThemesDirectoriesNames
=
QDir
(
themesLocationPath
).
entryList
(
QDir
::
NoDotAndDotDot
|
QDir
::
AllDirs
);
for
(
const
QString
&
themesLocationPath
:
qAsConst
(
themesLocationsPaths
)
)
{
const
QStringList
possibleThemesDirectoriesNames
=
QDir
(
themesLocationPath
).
entryList
(
QDir
::
NoDotAndDotDot
|
QDir
::
AllDirs
);
for
(
const
QString
&
possibleThemeDirectoryName
:
possibleThemesDirectoriesNames
)
{
possibleThemesPaths
+=
themesLocationPath
+
'/'
+
possibleThemeDirectoryName
;
}
...
...
libdbusmenuqt/dbusmenuimporter.cpp
View file @
0b09fe1b
...
...
@@ -404,7 +404,7 @@ void DBusMenuImporter::slotGetLayoutFinished(QDBusPendingCallWatcher *watcher)
//remove outdated actions
QSet
<
int
>
newDBusMenuItemIds
;
newDBusMenuItemIds
.
reserve
(
rootItem
.
children
.
count
());
for
(
const
DBusMenuLayoutItem
&
item
:
rootItem
.
children
)
{
for
(
const
DBusMenuLayoutItem
&
item
:
qAsConst
(
rootItem
.
children
)
)
{
newDBusMenuItemIds
<<
item
.
id
;
}
for
(
QAction
*
action
:
menu
->
actions
())
{
...
...
@@ -422,7 +422,7 @@ void DBusMenuImporter::slotGetLayoutFinished(QDBusPendingCallWatcher *watcher)
}
//insert or update new actions into our menu
for
(
const
DBusMenuLayoutItem
&
dbusMenuItem
:
rootItem
.
children
)
{
for
(
const
DBusMenuLayoutItem
&
dbusMenuItem
:
qAsConst
(
rootItem
.
children
)
)
{
DBusMenuImporterPrivate
::
ActionForId
::
Iterator
it
=
d
->
m_actionForId
.
find
(
dbusMenuItem
.
id
);
QAction
*
action
=
nullptr
;
if
(
it
==
d
->
m_actionForId
.
end
())
{
...
...
startkde/plasma-session/plasma-autostart-list/main.cpp
View file @
0b09fe1b
...
...
@@ -32,7 +32,7 @@ int main(int argc, char** argv)
asN
.
setPhase
(
phase
);
cout
<<
"phase: "
<<
phase
<<
'\n'
;
bool
foundThings
=
true
;
for
(
auto
asi
:
asN
.
startList
())
{
for
(
const
auto
&
asi
:
asN
.
startList
())
{
foundThings
=
false
;
cout
<<
"- "
<<
asi
.
name
<<
' '
<<
asi
.
service
;
if
(
!
asi
.
startAfter
.
isEmpty
())
...
...
startkde/startplasma.cpp
View file @
0b09fe1b
...
...
@@ -476,7 +476,7 @@ void waitForKonqi()
services
=
allServices
(
QLatin1String
(
"org.kde.drkonqi-"
));
if
(
wait_drkonqi_counter
.
elapsed
()
>=
wait_drkonqi_timeout
)
{
// ask remaining drkonqis to die in a graceful way
for
(
const
auto
&
service
:
services
)
{
for
(
const
auto
&
service
:
qAsConst
(
services
)
)
{
QDBusInterface
iface
(
service
,
QStringLiteral
(
"/MainApplication"
));
iface
.
call
(
QStringLiteral
(
"quit"
));
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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