* [PATCH QGit 1/4] Don't count the submenu entries for checking if it is empty
@ 2009-06-06 11:57 Markus Heidelberg
0 siblings, 0 replies; only message in thread
From: Markus Heidelberg @ 2009-06-06 11:57 UTC (permalink / raw)
To: Marco Costalba; +Cc: git, Markus Heidelberg
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-06-06 11:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-06 11:57 [PATCH QGit 1/4] Don't count the submenu entries for checking if it is empty Markus Heidelberg
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).