diff -r fd30d51f876b -r b6db4fd4947b clock/clockui/clockviews/src/clockalarmlistitemprototype.cpp --- a/clock/clockui/clockviews/src/clockalarmlistitemprototype.cpp Mon May 03 12:30:32 2010 +0300 +++ b/clock/clockui/clockviews/src/clockalarmlistitemprototype.cpp Mon Jun 28 15:22:02 2010 +0530 @@ -17,7 +17,6 @@ */ // System includes -#include #include // User includes @@ -37,9 +36,7 @@ \parent of type QGraphicsItem. */ ClockAlarmListItemPrototype::ClockAlarmListItemPrototype(QGraphicsItem *parent) -:HbListViewItem(parent), - mParent(parent), - malarmIconItem(0) +:HbListViewItem(parent) { // Nothing yet. } @@ -68,19 +65,11 @@ QString alarmIconPath = alarmIconRole.toString(); if (!malarmIconItem) { malarmIconItem = new HbPushButton(this); - HbStyle::setItemName(malarmIconItem, - QLatin1String("alarmIconItem")); + HbStyle::setItemName( + malarmIconItem, QLatin1String("alarmIconItem")); connect( malarmIconItem, SIGNAL(clicked()), this, SLOT(handleAlarmStatusChanged())); - if (mParent) { - connect( - this, - SIGNAL(alarmStatusHasChanged(int)), - qobject_cast( - static_cast(mParent)), - SLOT(handleAlarmStatusChanged(int))); - } } malarmIconItem->setIcon(alarmIconPath); } @@ -94,7 +83,7 @@ */ ClockAlarmListItemPrototype *ClockAlarmListItemPrototype::createItem() { - return new ClockAlarmListItemPrototype(mParent); + return new ClockAlarmListItemPrototype(*this); } /*! @@ -103,7 +92,8 @@ void ClockAlarmListItemPrototype::handleAlarmStatusChanged() { int row = modelIndex().row(); - emit alarmStatusHasChanged(row); + emit static_cast( + prototype())->alarmStatusHasChanged(row); } // End of file --Don't remove this.