[Differential] [Commented On] D3970: Bug 368311: Add a new warning during fetching git repo
kfunk (Kevin Funk)
noreply at phabricator.kde.org
Thu Jan 5 00:57:37 UTC 2017
kfunk added a comment.
Rest LGTM
INLINE COMMENTS
> projectsourcepage.cpp:226
> (m_providerWidget && m_providerWidget->isCorrect()));
> - bool validToCheckout = correct && validWidget; //To checkout, if it exists, it should be an empty dir
> - if (validToCheckout && cwd.isLocalFile() && dir.exists()) {
> - validToCheckout = dir.entryList(QDir::AllEntries | QDir::NoDotAndDotDot).isEmpty();
> - }
> + bool validToCheckout = (correct && validWidget && cwd.isLocalFile() && dir.exists()) ? dir.entryList(QDir::AllEntries | QDir::NoDotAndDotDot).isEmpty() : correct && validWidget ;
> +
This doesn't need a ternary operation :)
Hint: `a ? b : false` => `a && b`
REPOSITORY
R33 KDevPlatform
REVISION DETAIL
https://phabricator.kde.org/D3970
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: nellex, kfunk, #kdevelop
Cc: kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170105/4a66ad8d/attachment.html>
More information about the KDevelop-devel
mailing list