ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #00262
[Branch ~agateau/plasma-indicatordisplay/trunk] Rev 94: Renamed IndicatorCountRole to CountRole, since it's now used for servers as
------------------------------------------------------------
revno: 94
committer: Aurelien Gateau <aurelien.gateau@xxxxxxxxxxxxx>
branch nick: plasma-indicatordisplay
timestamp: Thu 2009-09-17 15:48:34 +0200
message:
Renamed IndicatorCountRole to CountRole, since it's now used for servers as
well.
modified:
src/delegate.cpp
src/indicatordisplay.cpp
src/listenermodel.cpp
src/listenermodel.h
tests/listenermodeltest.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:47:53 +0000
+++ src/delegate.cpp 2009-09-17 13:48:34 +0000
@@ -77,7 +77,7 @@
//painter->drawLine(option.rect.left(), yPos, option.rect.right(), yPos);
}
- int count = index.data(ListenerModel::IndicatorCountRole).toInt();
+ int count = index.data(ListenerModel::CountRole).toInt();
if (count > 0) {
paintCount(painter, option, count);
} else {
=== modified file 'src/indicatordisplay.cpp'
--- src/indicatordisplay.cpp 2009-09-15 15:33:21 +0000
+++ src/indicatordisplay.cpp 2009-09-17 13:48:34 +0000
@@ -269,7 +269,7 @@
hash.insert(Qt::DisplayRole, new SimpleRoleDumper("display"));
hash.insert(Qt::DecorationRole, new SimpleRoleDumper("decoration"));
hash.insert(ListenerModel::ServerTypeRole, new SimpleRoleDumper("type"));
- hash.insert(ListenerModel::IndicatorCountRole, new SimpleRoleDumper("count"));
+ hash.insert(ListenerModel::CountRole, new SimpleRoleDumper("count"));
hash.insert(ListenerModel::IndicatorDateTimeRole, new SimpleRoleDumper("time"));
hash.insert(ListenerModel::IndicatorDrawAttentionRole, new SimpleRoleDumper("attention"));
hash.insert(Qt::UserRole + 1, new PointerRoleDumper<QIndicate::Listener::Server>("server"));
=== modified file 'src/listenermodel.cpp'
--- src/listenermodel.cpp 2009-09-17 13:46:42 +0000
+++ src/listenermodel.cpp 2009-09-17 13:48:34 +0000
@@ -216,7 +216,7 @@
return;
}
- item->setData(QVariant(count), IndicatorCountRole);
+ item->setData(QVariant(count), CountRole);
}
void ListenerModel::slotIndicatorAdded(QIndicate::Listener::Server* server,
@@ -332,7 +332,7 @@
}
} else if (key == "count") {
int count = QIndicate::Decode::intFromValue(value);
- item->setData(QVariant(count), IndicatorCountRole);
+ item->setData(QVariant(count), CountRole);
} else {
kWarning() << "Unhandled key" << key;
}
=== modified file 'src/listenermodel.h'
--- src/listenermodel.h 2009-09-17 13:46:42 +0000
+++ src/listenermodel.h 2009-09-17 13:48:34 +0000
@@ -28,7 +28,7 @@
enum AdditionalRoles
{
ServerTypeRole = 0x0F3B4320,
- IndicatorCountRole = 0x2CFC6823,
+ CountRole = 0x2CFC6823,
IndicatorDateTimeRole = 0x215B03CC,
IndicatorDrawAttentionRole = 0x28304470
};
=== modified file 'tests/listenermodeltest.cpp'
--- tests/listenermodeltest.cpp 2009-09-15 15:33:21 +0000
+++ tests/listenermodeltest.cpp 2009-09-17 13:48:34 +0000
@@ -234,7 +234,7 @@
static int indicatorCount(const QModelIndex& index)
{
- QVariant value = index.data(ListenerModel::IndicatorCountRole);
+ QVariant value = index.data(ListenerModel::CountRole);
return value.canConvert(QVariant::Int) ? value.toInt() : 0;
}