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
4915766b
Commit
4915766b
authored
Oct 14, 2020
by
Alexander Lohnau
💬
Browse files
Solve some clazy warnings
parent
5133d545
Changes
6
Hide whitespace changes
Inline
Side-by-side
applets/appmenu/plugin/appmenumodel.cpp
View file @
4915766b
...
...
@@ -221,7 +221,8 @@ void AppMenuModel::updateApplicationMenu(const QString &serviceName, const QStri
}
//cache first layer of sub menus, which we'll be popping up
for
(
QAction
*
a
:
m_menu
->
actions
())
{
const
auto
actions
=
m_menu
->
actions
();
for
(
QAction
*
a
:
actions
)
{
// signal dataChanged when the action changes
connect
(
a
,
&
QAction
::
changed
,
this
,
[
this
,
a
]
{
if
(
m_menuAvailable
&&
m_menu
)
{
...
...
@@ -253,7 +254,7 @@ void AppMenuModel::updateApplicationMenu(const QString &serviceName, const QStri
const
auto
actions
=
m_menu
->
actions
();
auto
it
=
std
::
find
(
actions
.
begin
(),
actions
.
end
(),
action
);
if
(
it
!=
actions
.
end
())
{
requestActivateIndex
(
it
-
actions
.
begin
());
Q_EMIT
requestActivateIndex
(
it
-
actions
.
begin
());
}
});
}
applets/icon/iconapplet.cpp
View file @
4915766b
...
...
@@ -294,7 +294,7 @@ void IconApplet::setUrl(const QUrl &url)
{
if
(
m_url
!=
url
)
{
m_url
=
url
;
urlChanged
(
url
);
Q_EMIT
urlChanged
(
url
);
config
().
writeEntry
(
QStringLiteral
(
"url"
),
url
);
...
...
@@ -349,7 +349,7 @@ QList<QAction *> IconApplet::contextualActions()
action
->
setSeparator
(
true
);
}
connect
(
action
,
&
QAction
::
triggered
,
this
,
[
this
,
serviceAction
]()
{
connect
(
action
,
&
QAction
::
triggered
,
this
,
[
serviceAction
]()
{
auto
*
job
=
new
KIO
::
ApplicationLauncherJob
(
serviceAction
);
auto
*
delegate
=
new
KNotificationJobUiDelegate
(
KJobUiDelegate
::
AutoErrorHandlingEnabled
);
job
->
setUiDelegate
(
delegate
);
...
...
applets/kicker/plugin/placeholdermodel.cpp
View file @
4915766b
...
...
@@ -254,8 +254,8 @@ int PlaceholderModel::separatorCount() const
void
PlaceholderModel
::
reset
()
{
emit
beginResetModel
();
emit
endResetModel
();
beginResetModel
();
endResetModel
();
emit
countChanged
();
emit
separatorCountChanged
();
}
...
...
applets/kicker/plugin/rootmodel.cpp
View file @
4915766b
...
...
@@ -306,7 +306,7 @@ void RootModel::refresh()
}
};
for
(
AbstractEntry
*
entry
:
m_entryList
)
{
for
(
AbstractEntry
*
entry
:
qAsConst
(
m_entryList
)
)
{
processEntry
(
entry
);
}
...
...
wallpapers/image/backgroundlistmodel.cpp
View file @
4915766b
...
...
@@ -467,7 +467,7 @@ void BackgroundListModel::setPendingDeletion(int rowIndex, bool pendingDeletion)
const
QStringList
BackgroundListModel
::
wallpapersAwaitingDeletion
()
{
QStringList
candidates
;
for
(
const
KPackage
::
Package
&
b
:
m_packages
)
{
for
(
const
KPackage
::
Package
&
b
:
qAsConst
(
m_packages
)
)
{
const
QUrl
wallpaperUrl
=
QUrl
::
fromLocalFile
(
b
.
filePath
(
"preferred"
));
if
(
m_pendingDeletion
.
contains
(
wallpaperUrl
.
toLocalFile
())
&&
m_pendingDeletion
[
wallpaperUrl
.
toLocalFile
()])
{
candidates
<<
wallpaperUrl
.
toLocalFile
();
...
...
wallpapers/image/image.cpp
View file @
4915766b
...
...
@@ -444,7 +444,7 @@ void Image::removeSlidePath(const QString &path)
if
(
m_slideshowModel
)
{
bool
haveParent
=
false
;
QStringList
children
;
for
(
const
QString
&
slidePath
:
m_slidePaths
)
{
for
(
const
QString
&
slidePath
:
qAsConst
(
m_slidePaths
)
)
{
if
(
path
.
startsWith
(
slidePath
))
{
haveParent
=
true
;
}
...
...
@@ -736,7 +736,8 @@ void Image::wallpaperBrowseCompleted()
{
Q_ASSERT
(
m_model
);
if
(
m_dialog
&&
m_dialog
->
selectedFiles
().
count
()
>
0
)
{
for
(
const
QString
image
:
m_dialog
->
selectedFiles
())
{
const
QStringList
selectedFiles
=
m_dialog
->
selectedFiles
();
for
(
const
QString
&
image
:
selectedFiles
)
{
addUsersWallpaper
(
image
);
}
emit
customWallpaperPicked
(
m_dialog
->
selectedFiles
().
first
());
...
...
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