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
4e6cfb39
Commit
4e6cfb39
authored
Nov 26, 2020
by
Alexander Lohnau
💬
Browse files
Prevent clang-format uglification
parent
8d7faee0
Changes
7
Hide whitespace changes
Inline
Side-by-side
applets/kicker/plugin/actionlist.cpp
View file @
4e6cfb39
...
...
@@ -285,12 +285,14 @@ QVariantList recentDocumentActions(KService::Ptr service)
return
list
;
}
// clang-format off
auto
query
=
UsedResources
|
RecentlyUsedFirst
|
Agent
(
storageId
)
|
Type
::
any
()
|
Activity
::
current
()
|
Url
::
file
();
// clang-format on
ResultSet
results
(
query
);
...
...
@@ -343,11 +345,13 @@ bool handleRecentDocumentAction(KService::Ptr service, const QString &actionId,
return
false
;
}
// clang-format off
auto
query
=
UsedResources
|
Agent
(
storageId
)
|
Type
::
any
()
|
Activity
::
current
()
|
Url
::
file
();
// clang-format on
KAStats
::
forgetResources
(
query
);
...
...
applets/kicker/plugin/recentcontactsmodel.cpp
View file @
4e6cfb39
...
...
@@ -172,6 +172,7 @@ void RecentContactsModel::refresh()
{
QObject
*
oldModel
=
sourceModel
();
// clang-format off
auto
query
=
UsedResources
|
RecentlyUsedFirst
|
Agent
(
QStringLiteral
(
"KTp"
))
...
...
@@ -179,6 +180,7 @@ void RecentContactsModel::refresh()
|
Activity
::
current
()
|
Url
::
startsWith
(
QStringLiteral
(
"ktp"
))
|
Limit
(
15
);
// clang-format on
ResultModel
*
model
=
new
ResultModel
(
query
);
...
...
applets/kicker/plugin/recentusagemodel.cpp
View file @
4e6cfb39
...
...
@@ -513,11 +513,13 @@ void RecentUsageModel::refresh()
setSourceModel
(
nullptr
);
delete
oldModel
;
// clang-format off
auto
query
=
UsedResources
|
(
m_ordering
==
Recent
?
RecentlyUsedFirst
:
HighScoredFirst
)
|
Agent
::
any
()
|
(
m_usage
==
OnlyDocs
?
Type
::
files
()
:
Type
::
any
())
|
Activity
::
current
();
// clang-format on
switch
(
m_usage
)
{
case
AppsAndDocs
:
...
...
applets/notifications/filemenu.cpp
View file @
4e6cfb39
...
...
@@ -149,7 +149,7 @@ void FileMenu::open(int x, int y)
const
bool
canTrash
=
itemProperties
.
isLocal
()
&&
itemProperties
.
supportsMoving
();
if
(
canTrash
)
{
QAction
*
moveToTrash
Action
=
KStandardAction
::
moveToTrash
(
this
,
[
this
]
{
auto
moveToTrash
Lambda
=
[
this
]
{
const
QList
<
QUrl
>
urls
{
m_url
};
KIO
::
JobUiDelegate
uiDelegate
;
...
...
@@ -159,7 +159,8 @@ void FileMenu::open(int x, int y)
KIO
::
FileUndoManager
::
self
()
->
recordJob
(
KIO
::
FileUndoManager
::
Trash
,
urls
,
QUrl
(
QStringLiteral
(
"trash:/"
)),
job
);
}
},
menu
);
};
QAction
*
moveToTrashAction
=
KStandardAction
::
moveToTrash
(
this
,
moveToTrashLambda
,
menu
);
moveToTrashAction
->
setShortcut
({});
// Can't focus notification to press Delete
menu
->
addAction
(
moveToTrashAction
);
}
...
...
@@ -168,7 +169,7 @@ void FileMenu::open(int x, int y)
const
bool
showDeleteCommand
=
cg
.
readEntry
(
"ShowDeleteCommand"
,
false
);
if
(
itemProperties
.
supportsDeleting
()
&&
(
!
canTrash
||
showDeleteCommand
))
{
QAction
*
deleteAction
=
KStandardAction
::
deleteFile
(
this
,
[
this
]
{
auto
deleteLambda
=
[
this
]
{
const
QList
<
QUrl
>
urls
{
m_url
};
KIO
::
JobUiDelegate
uiDelegate
;
...
...
@@ -176,7 +177,8 @@ void FileMenu::open(int x, int y)
auto
*
job
=
KIO
::
del
(
urls
);
job
->
uiDelegate
()
->
setAutoErrorHandlingEnabled
(
true
);
}
},
menu
);
};
QAction
*
deleteAction
=
KStandardAction
::
deleteFile
(
this
,
deleteLambda
,
menu
);
deleteAction
->
setShortcut
({});
menu
->
addAction
(
deleteAction
);
}
...
...
applets/notifications/globalshortcuts.cpp
View file @
4e6cfb39
...
...
@@ -46,7 +46,7 @@ GlobalShortcuts::~GlobalShortcuts() = default;
void
GlobalShortcuts
::
showDoNotDisturbOsd
(
bool
doNotDisturb
)
const
{
QDBusMessage
msg
=
QDBusMessage
::
createMethodCall
(
QDBusMessage
msg
=
QDBusMessage
::
createMethodCall
(
//
QStringLiteral
(
"org.kde.plasmashell"
),
QStringLiteral
(
"/org/kde/osdService"
),
QStringLiteral
(
"org.kde.osdService"
),
...
...
libnotificationmanager/job_p.cpp
View file @
4e6cfb39
...
...
@@ -122,6 +122,7 @@ QString JobPrivate::prettyDestUrl() const
void
JobPrivate
::
updateHasDetails
()
{
// clang-format off
const
bool
hasDetails
=
m_totalBytes
>
0
||
m_totalFiles
>
0
||
m_totalDirectories
>
0
...
...
@@ -133,6 +134,7 @@ void JobPrivate::updateHasDetails()
||
!
m_descriptionValue1
.
isEmpty
()
||
!
m_descriptionValue2
.
isEmpty
()
||
m_speed
>
0
;
// clang-format on
if
(
m_hasDetails
!=
hasDetails
)
{
m_hasDetails
=
hasDetails
;
...
...
runners/recentdocuments/recentdocuments.cpp
View file @
4e6cfb39
...
...
@@ -59,6 +59,7 @@ void RecentDocuments::match(Plasma::RunnerContext &context)
return
;
}
// clang-format off
const
QString
term
=
context
.
query
();
auto
query
=
UsedResources
|
Activity
::
current
()
...
...
@@ -67,6 +68,7 @@ void RecentDocuments::match(Plasma::RunnerContext &context)
// we search only on file name, as KActivity does not support better options
|
Url
(
"/*/"
+
term
+
"*"
)
|
Limit
(
20
);
// clang-format on
const
auto
result
=
new
ResultModel
(
query
);
...
...
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