ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #00188
[Branch ~agateau/plasma-indicatordisplay/trunk] Rev 88: Time should be presented if there is no count (not the reverse)
------------------------------------------------------------
revno: 88
committer: Aurelien Gateau <aurelien.gateau@xxxxxxxxxxxxx>
branch nick: plasma-indicatordisplay
timestamp: Tue 2009-09-15 17:47:53 +0200
message:
Time should be presented if there is no count (not the reverse)
modified:
src/delegate.cpp
--
lp:plasma-indicatordisplay
https://code.launchpad.net/~agateau/plasma-indicatordisplay/trunk
Your team ayatana-commits is subscribed to branch lp:plasma-indicatordisplay.
To unsubscribe from this branch go to https://code.launchpad.net/~agateau/plasma-indicatordisplay/trunk/+edit-subscription.
=== modified file 'src/delegate.cpp'
--- src/delegate.cpp 2009-09-15 15:45:44 +0000
+++ src/delegate.cpp 2009-09-15 15:47:53 +0000
@@ -77,13 +77,13 @@
//painter->drawLine(option.rect.left(), yPos, option.rect.right(), yPos);
}
- QString timeText = timeTextForIndex(index);
- if (!timeText.isEmpty()) {
- paintTime(painter, option, timeText);
+ int count = index.data(ListenerModel::IndicatorCountRole).toInt();
+ if (count > 0) {
+ paintCount(painter, option, count);
} else {
- int count = index.data(ListenerModel::IndicatorCountRole).toInt();
- if (count > 0) {
- paintCount(painter, option, count);
+ QString timeText = timeTextForIndex(index);
+ if (!timeText.isEmpty()) {
+ paintTime(painter, option, timeText);
}
}
}