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
fda6d411
Commit
fda6d411
authored
Nov 11, 2020
by
Alexander Lohnau
💬
Browse files
Fix a bunch of clazy warnings
Should be uncontroversial and compile time checked.
parent
43dd5dad
Changes
13
Hide whitespace changes
Inline
Side-by-side
applets/systemmonitor/systemmonitor/systemmonitor.cpp
View file @
fda6d411
...
...
@@ -40,7 +40,7 @@ SystemMonitor::SystemMonitor(QObject *parent, const QVariantList &args)
//Don't set the preset right now as we can't write on the config here because we don't have a Corona yet
if
(
args
.
count
()
>
2
&&
args
.
mid
(
3
).
length
()
>
0
)
{
const
QString
preset
=
args
.
mid
(
3
).
f
irst
().
toString
();
const
QString
preset
=
args
.
mid
(
3
).
constF
irst
().
toString
();
if
(
preset
.
length
()
>
0
)
{
m_pendingStartupPreset
=
preset
;
}
...
...
components/shellprivate/interactiveconsole/interactiveconsole.cpp
View file @
fda6d411
...
...
@@ -275,7 +275,7 @@ void InteractiveConsole::loadScript(const QString &script)
void
InteractiveConsole
::
showEvent
(
QShowEvent
*
)
{
if
(
m_editorPart
)
{
m_editorPart
->
views
().
f
irst
()
->
setFocus
();
m_editorPart
->
views
().
constF
irst
()
->
setFocus
();
}
else
{
m_editor
->
setFocus
();
}
...
...
@@ -336,7 +336,7 @@ void InteractiveConsole::openScriptUrlSelected(int result)
}
if
(
result
==
QDialog
::
Accepted
)
{
const
QUrl
url
=
m_fileDialog
->
selectedUrls
().
f
irst
();
const
QUrl
url
=
m_fileDialog
->
selectedUrls
().
constF
irst
();
if
(
!
url
.
isEmpty
())
{
loadScriptFromUrl
(
url
);
}
...
...
@@ -452,7 +452,7 @@ void InteractiveConsole::saveScriptUrlSelected(int result)
}
if
(
result
==
QDialog
::
Accepted
)
{
const
QUrl
url
=
m_fileDialog
->
selectedUrls
().
f
irst
();
const
QUrl
url
=
m_fileDialog
->
selectedUrls
().
constF
irst
();
if
(
!
url
.
isEmpty
())
{
saveScript
(
url
);
}
...
...
@@ -551,7 +551,7 @@ void InteractiveConsole::evaluateScript()
if
(
reply
.
type
()
==
QDBusMessage
::
ErrorMessage
)
{
print
(
reply
.
errorMessage
());
}
else
{
const
int
id
=
reply
.
arguments
().
f
irst
().
toInt
();
const
int
id
=
reply
.
arguments
().
constF
irst
().
toInt
();
QDBusConnection
::
sessionBus
().
connect
(
s_kwinService
,
"/"
+
QString
::
number
(
id
),
QString
(),
QStringLiteral
(
"print"
),
this
,
SLOT
(
print
(
QString
)));
QDBusConnection
::
sessionBus
().
connect
(
s_kwinService
,
"/"
+
QString
::
number
(
id
),
QString
(),
QStringLiteral
(
"printError"
),
this
,
SLOT
(
print
(
QString
)));
message
=
QDBusMessage
::
createMethodCall
(
s_kwinService
,
"/"
+
QString
::
number
(
id
),
QString
(),
QStringLiteral
(
"run"
));
...
...
components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp
View file @
fda6d411
...
...
@@ -112,7 +112,7 @@ QString PlasmaAppletItem::author() const
return
QString
();
}
return
m_info
.
authors
().
f
irst
().
name
();
return
m_info
.
authors
().
constF
irst
().
name
();
}
QString
PlasmaAppletItem
::
email
()
const
...
...
@@ -121,7 +121,7 @@ QString PlasmaAppletItem::email() const
return
QString
();
}
return
m_info
.
authors
().
f
irst
().
emailAddress
();
return
m_info
.
authors
().
constF
irst
().
emailAddress
();
}
int
PlasmaAppletItem
::
running
()
const
...
...
kcms/cursortheme/kcmcursortheme.cpp
View file @
fda6d411
...
...
@@ -209,7 +209,6 @@ void CursorThemeConfig::updateSizeComboBox()
if
(
selected
.
isValid
())
{
const
CursorTheme
*
theme
=
m_themeProxyModel
->
theme
(
selected
);
const
QList
<
int
>
sizes
=
theme
->
availableSizes
();
QIcon
m_icon
;
// only refill the combobox if there is more that 1 size
if
(
sizes
.
size
()
>
1
)
{
int
i
;
...
...
@@ -384,8 +383,6 @@ void CursorThemeConfig::load()
{
ManagedConfigModule
::
load
();
setPreferredSize
(
cursorThemeSettings
()
->
cursorSize
());
// Get the name of the theme KDE is configured to use
QString
currentTheme
=
cursorThemeSettings
()
->
cursorTheme
();
// Disable the listview and the buttons if we're in kiosk mode
if
(
cursorThemeSettings
()
->
isImmutable
(
QStringLiteral
(
"cursorTheme"
)))
{
...
...
kcms/fonts/fontsaasettings.cpp
View file @
fda6d411
...
...
@@ -67,7 +67,6 @@ class FontAASettingsStore : public QObject
public:
FontAASettingsStore
(
FontsAASettings
*
parent
=
nullptr
)
:
QObject
(
parent
)
,
m_settings
(
parent
)
{
load
();
}
...
...
@@ -243,7 +242,6 @@ public:
}
private:
FontsAASettings
*
m_settings
;
bool
m_isImmutable
;
bool
m_antiAliasing
;
bool
m_antiAliasingChanged
;
...
...
kcms/fonts/kxftconfig.cpp
View file @
fda6d411
...
...
@@ -648,7 +648,6 @@ void KXftConfig::readContents()
while
(
en
.
isComment
())
{
en
=
en
.
nextSibling
();
}
QString
family
;
double
from
=
-
1.0
,
to
=
-
1.0
,
pixelFrom
=
-
1.0
,
...
...
kcms/kfontinst/lib/Fc.cpp
View file @
fda6d411
...
...
@@ -387,7 +387,6 @@ QString getFcString(FcPattern *pat, const char *val, int index)
// ...so if possible, use that. Else, use the first non "xx" lang.
QString
getFcLangString
(
FcPattern
*
pat
,
const
char
*
val
,
const
char
*
valLang
)
{
QString
rv
;
int
langIndex
=-
1
;
for
(
int
i
=
0
;
true
;
++
i
)
...
...
kcms/kfontinst/lib/FcEngine.cpp
View file @
fda6d411
...
...
@@ -568,6 +568,9 @@ void cleanupXImage(void *data)
QImage
CFcEngine
::
Xft
::
toImage
(
int
w
,
int
h
)
const
{
Q_UNUSED
(
w
)
Q_UNUSED
(
h
)
if
(
!
XftDrawPicture
(
itsDraw
))
{
return
QImage
();
}
...
...
kcms/kfontinst/lib/Misc.cpp
View file @
fda6d411
...
...
@@ -419,8 +419,7 @@ QMap<QString, QString> getFontFileMap(const QSet<QString> &files)
{
QVector
<
QString
>
orig
(
fIt
.
value
().
count
()),
modified
(
fIt
.
value
().
count
());
QSet
<
QString
>::
ConstIterator
oIt
(
fIt
.
value
().
constBegin
()),
oEnd
(
fIt
.
value
().
constEnd
());
QSet
<
QString
>::
ConstIterator
oIt
(
fIt
.
value
().
constBegin
());
bool
good
=
true
;
int
count
=
fIt
.
value
().
count
();
...
...
kcms/lookandfeel/lnftool.cpp
View file @
fda6d411
...
...
@@ -71,7 +71,7 @@ int main(int argc, char **argv)
}
if
(
parser
.
isSet
(
_list
))
{
QList
<
KPluginMetaData
>
pkgs
=
KPackage
::
PackageLoader
::
self
()
->
listPackages
(
"Plasma/LookAndFeel"
);
const
QList
<
KPluginMetaData
>
pkgs
=
KPackage
::
PackageLoader
::
self
()
->
listPackages
(
"Plasma/LookAndFeel"
);
for
(
const
KPluginMetaData
&
data
:
pkgs
)
{
std
::
cout
<<
data
.
pluginId
().
toStdString
()
<<
std
::
endl
;
...
...
ksmserver/server.cpp
View file @
fda6d411
...
...
@@ -590,7 +590,7 @@ extern "C" int _IceTransNoListen(const char * protocol);
#endif
KSMServer
::
KSMServer
(
InitFlags
flags
)
:
sessionGroup
(
QStringLiteral
(
""
)
)
:
sessionGroup
(
QLatin1String
(
""
)
)
,
m_kwinInterface
(
new
OrgKdeKWinSessionInterface
(
QStringLiteral
(
"org.kde.KWin"
),
QStringLiteral
(
"/Session"
),
QDBusConnection
::
sessionBus
(),
this
))
,
sockets
{
-
1
,
-
1
}
{
...
...
@@ -847,7 +847,7 @@ QString KSMServer::currentSession()
{
if
(
sessionGroup
.
startsWith
(
QLatin1String
(
"Session: "
)
)
)
return
sessionGroup
.
mid
(
9
);
return
Q
StringLiteral
(
""
);
// empty, not null, since used for KConfig::setGroup // TODO does this comment make any sense?
return
Q
Latin1String
(
""
);
// empty, not null, since used for KConfig::setGroup // TODO does this comment make any sense?
}
void
KSMServer
::
discardSession
()
...
...
logout-greeter/shutdowndlg.cpp
View file @
fda6d411
...
...
@@ -164,7 +164,6 @@ void KSMShutdownDlg::init()
rootContext
()
->
setContextProperty
(
QStringLiteral
(
"screenGeometry"
),
screen
()
->
geometry
());
QString
fileName
;
QString
fileUrl
;
KPackage
::
Package
package
=
KPackage
::
PackageLoader
::
self
()
->
loadPackage
(
QStringLiteral
(
"Plasma/LookAndFeel"
));
KConfigGroup
cg
(
KSharedConfig
::
openConfig
(
QStringLiteral
(
"kdeglobals"
)),
"KDE"
);
const
QString
packageName
=
cg
.
readEntry
(
"LookAndFeelPackage"
,
QString
());
...
...
runners/bookmarks/browsers/chrome.cpp
View file @
fda6d411
...
...
@@ -54,7 +54,7 @@ Chrome::Chrome( FindProfile* findProfile, QObject* parent )
m_profileBookmarks
<<
new
ProfileBookmarks
(
profile
);
m_watcher
->
addFile
(
profile
.
path
());
}
connect
(
m_watcher
,
&
KDirWatch
::
created
,
[
=
]
{
m_dirty
=
true
;
});
connect
(
m_watcher
,
&
KDirWatch
::
created
,
this
,
[
this
]
{
m_dirty
=
true
;
});
}
Chrome
::~
Chrome
()
...
...
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