[Differential] [Request, 49 lines] D4101: Remove uneeded if-guard
noreply at phabricator.kde.org
Thu Jan 12 13:30:31 UTC 2017
tcanabrava created this revision.
tcanabrava added reviewers: kfunk, apol.
Restricted Application added a subscriber: kdevelop-devel.
The GUIenabled variable is just used if not in KDEVELOP_SINGLE_APP
mode, but silencing the warning with unguarded-ifs unclutters the
code a bit and has no sideeffects.
Use brace-initialization for QStringList
No need to test for isEmpty before using Q_FOREACH
If the container is empty, it will just do anything
on the foreach macro. this also reduces the indentation
level a bit.
Rename variable p to project
The outer loop has a variable named p, and while C++ accepts
that inner variables have biggest priority than outer
variables, this could be a potential human mistake.
Replace 8 ocorrencies of const char* to QString to a single QString
QString is UTF_16 internally, so creating just one QString
for a given string is better than runtime-creating a few more
via const char*.
compiled and tested
To: tcanabrava, kfunk, apol
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KDevelop-devel