From: Markus Heidelberg <markus.heidelberg@web.de>
To: Marco Costalba <mcostalba@gmail.com>
Cc: git@vger.kernel.org, Markus Heidelberg <markus.heidelberg@web.de>
Subject: [PATCH QGit 1/4] Don't count the submenu entries for checking if it is empty
Date: Sat, 6 Jun 2009 13:57:48 +0200 [thread overview]
Message-ID: <1244289471-698-2-git-send-email-markus.heidelberg@web.de> (raw)
Checking with isEmpty() is more effective.
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
---
src/mainimpl.cpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/mainimpl.cpp b/src/mainimpl.cpp
index 8c7b19e..60414ab 100644
--- a/src/mainimpl.cpp
+++ b/src/mainimpl.cpp
@@ -1179,7 +1179,7 @@ void MainImpl::doContexPopup(SCRef sha) {
act = contextRmtMenu.addAction(*it);
act->setData("Ref");
}
- if (contextRmtMenu.actions().count() > 0)
+ if (!contextRmtMenu.isEmpty())
contextMenu.addMenu(&contextRmtMenu);
if (!bn.empty())
@@ -1194,7 +1194,7 @@ void MainImpl::doContexPopup(SCRef sha) {
act->setData("Ref");
}
if (!tn.empty())
- if (contextSubMenu.actions().count() > 0)
+ if (!contextSubMenu.isEmpty())
contextSubMenu.addSeparator();
else
contextMenu.addSeparator();
@@ -1207,7 +1207,7 @@ void MainImpl::doContexPopup(SCRef sha) {
act->setData("Ref");
}
- if (contextSubMenu.actions().count() > 0)
+ if (!contextSubMenu.isEmpty())
contextMenu.addMenu(&contextSubMenu);
}
contextMenu.exec(QCursor::pos());
--
1.6.3.2.213.g30b07
reply other threads:[~2009-06-06 11:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1244289471-698-2-git-send-email-markus.heidelberg@web.de \
--to=markus.heidelberg@web.de \
--cc=git@vger.kernel.org \
--cc=mcostalba@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).