make the casts a bit more sensible
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=784938
This commit is contained in:
parent
f17c8c6676
commit
ff54447acf
@ -139,7 +139,7 @@ void PlasmaAppletItemModel::setRunningApplets(const QHash<QString, int> &apps)
|
|||||||
//foreach item, find that string and set the count
|
//foreach item, find that string and set the count
|
||||||
for (int r=0; r<rowCount(); ++r) {
|
for (int r=0; r<rowCount(); ++r) {
|
||||||
QStandardItem *i = item(r);
|
QStandardItem *i = item(r);
|
||||||
PlasmaAppletItem *p = (PlasmaAppletItem *)i;
|
PlasmaAppletItem *p = dynamic_cast<PlasmaAppletItem *>(i);
|
||||||
if (p) {
|
if (p) {
|
||||||
p->setRunning(apps.value(p->name()));
|
p->setRunning(apps.value(p->name()));
|
||||||
}
|
}
|
||||||
@ -150,7 +150,7 @@ void PlasmaAppletItemModel::setRunningApplets(const QString &name, int count)
|
|||||||
{
|
{
|
||||||
for (int r=0; r<rowCount(); ++r) {
|
for (int r=0; r<rowCount(); ++r) {
|
||||||
QStandardItem *i = item(r);
|
QStandardItem *i = item(r);
|
||||||
PlasmaAppletItem *p = (PlasmaAppletItem *)i;
|
PlasmaAppletItem *p = dynamic_cast<PlasmaAppletItem *>(i);
|
||||||
if (p && p->name() == name) {
|
if (p && p->name() == name) {
|
||||||
p->setRunning(count);
|
p->setRunning(count);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user