1. flupp
  2. Smooth Tasks Fork

Commits

flupp  committed 6ebffd6

fixed some deprecation warnings (TaskManager::AbstractGroupableItem.isGroupItem)

  • Participants
  • Parent commits 100d82a
  • Branches kde-4.8

Comments (0)

Files changed (2)

File applet/SmoothTasks/Task.cpp

View file
  • Ignore whitespace
 		abstractItem, SIGNAL(destroyed(QObject*)),
 		this, SLOT(itemDestroyed()));
 	
-	if (abstractItem->isGroupItem()) {
+	if (abstractItem->itemType() == TaskManager::GroupItemType) {
 		m_type  = GroupItem;
 		m_group = static_cast<TaskManager::TaskGroup*>(abstractItem);
 		connect(

File applet/SmoothTasks/TaskItem.cpp

View file
  • Ignore whitespace
 		m_light->startAnimation(Light::StartupAnimation, 500, true);
 	}
 		
-	if (abstractItem->isGroupItem()) {
+	if (abstractItem->itemType() == TaskManager::GroupItemType) {
 		TaskManager::TaskGroup* group = static_cast<TaskManager::TaskGroup*>(abstractItem);
 		connect(
 			group, SIGNAL(itemAdded(AbstractGroupableItem*)),
 		rdHeight = qMax(rdHeight, prefTextSize.height());
 	}
 	
-	if (abstractGroupableItem.isGroupItem()) {
+	if (abstractGroupableItem.itemType() == TaskManager::GroupItemType) {
 		QRectF expanderRec = expanderRect(abstractGroupableItem, applet, orientation, QRectF(0, 0, 0, 0));
 		rdWidth += expanderRec.width() + 5;  // TODO: make text seperation variable
 		rdHeight = qMax(rdHeight, expanderRec.height());
 
 /** initially copied from KDEs Task plasmoid but substantially altered */
 QRectF TaskItem::expanderRect(const TaskManager::AbstractGroupableItem& abstractGroupableItem, const Applet& applet, const Qt::Orientation& orientation, const QRectF& bounds) {
-	if (!abstractGroupableItem.isGroupItem()) {
+	if (!abstractGroupableItem.itemType() == TaskManager::GroupItemType) {
 		if (QApplication::isLeftToRight()) {
 			return QRectF(bounds.right(), bounds.top(), 0, 0);
 		}