Commit 4349d04c authored by Rolf Eike Beer's avatar Rolf Eike Beer Committed by Rolf Eike Beer
Browse files

use isEmpty() instead of comparing count() to 0

parent 0499dca3
......@@ -44,7 +44,7 @@ KGpgExpandableNode::getChild(const int index) const
int
KGpgExpandableNode::getChildCount()
{
if (children.count() == 0)
if (children.isEmpty())
readChildren();
return children.count();
......@@ -53,13 +53,13 @@ KGpgExpandableNode::getChildCount()
bool
KGpgExpandableNode::hasChildren() const
{
return (children.count() != 0);
return !children.isEmpty();
}
bool
KGpgExpandableNode::wasExpanded() const
{
return (children.count() != 0);
return !children.isEmpty();
}
const
......
......@@ -53,7 +53,7 @@ KeyTreeView::selectedNodes(bool *psame, KgpgCore::KgpgItemType *pt) const
KgpgItemType tp = 0;
bool sametype = true;
if (selidx.count() == 0) {
if (selidx.isEmpty()) {
if (pt != Q_NULLPTR)
*pt = tp;
if (psame != Q_NULLPTR)
......
......@@ -102,7 +102,7 @@ int KGpgApp::newInstance(QCommandLineParser& parser)
}
// parsing of command line args
if (parser.isSet("k") || (!KGpgSettings::showSystray() && (parser.positionalArguments().count() == 0) && !parser.isSet("d"))) {
if (parser.isSet("k") || (!KGpgSettings::showSystray() && parser.positionalArguments().isEmpty() && !parser.isSet("d"))) {
s_keyManager->show();
KWindowSystem::setOnDesktop(s_keyManager->winId(), KWindowSystem::currentDesktop()); //set on the current desktop
KWindowSystem::unminimizeWindow(s_keyManager->winId()); //de-iconify window
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment