Commits

flupp committed 10080b9

refs ticket #13: fixes for KDE 4.8 API changes

Comments (0)

Files changed (6)

applet/SmoothTasks/PlasmaToolTip.cpp

 	}
 	
 	Plasma::ToolTipContent data;
-	TaskManager::TaskPtr taskPtr(task->task());
+	TaskManager::Task* taskPtr(task->task());
 	QList<WId> windows;
 	int desktop = -1;
 

applet/SmoothTasks/SmoothToolTip.cpp

 	foreach (WindowPreview *preview, m_previews) {
 		preview->show();
 
-		TaskManager::TaskPtr task = preview->task()->task();
+		TaskManager::Task* task = preview->task()->task();
 		
 		if (task && preview->task()->type() != Task::StartupItem && preview->task()->type() != Task::LauncherItem) {
 			winIds.append(task->window());

applet/SmoothTasks/Task.cpp

 }
 
 QString Task::text() const {
-	TaskManager::TaskPtr    task;
-	TaskManager::StartupPtr startup;
+	TaskManager::Task*    task;
+	TaskManager::Startup* startup;
 	
 	switch (type()) {
 	case StartupItem:
    return m_task ? m_task->task()->desktop() : -1;
 }
 
-TaskManager::TaskPtr Task::task() const {
-	return m_task ? m_task->task() : TaskManager::TaskPtr();
+TaskManager::Task* Task::task() const {
+	return m_task ? m_task->task() : 0;
 }
 
-TaskManager::StartupPtr Task::startup() const {
-	return m_task ? m_task->startup() : TaskManager::StartupPtr();
+TaskManager::Startup* Task::startup() const {
+	return m_task ? m_task->startup() : 0;
 }
 
 int Task::taskCount() const {
 	if (changes & TaskManager::ActionsChanged) changesStr += " ActionsChanged";
 	if (changes & TaskManager::TransientsChanged) changesStr += " TransientsChanged";
 	if (changes & TaskManager::IconChanged) changesStr += " IconChanged";
-	if (changes & TaskManager::ColorChanged) changesStr += " ColorChanged";
+	// TODO:  ActivitiesChanged, AttentionChanged, ClassChanged
 	//if (changes & TaskManager::EverythingChanged) changesStr += " EverythingChanged";
 	if (m_group) {
 		changesStr += " [";
 void Task::setWindowTask(TaskManager::TaskItem* taskItem) {
 	m_type = TaskItem;
 	if (m_task && m_task->task()) {
-		disconnect(m_task->task().constData(), 0, this, 0);
+		disconnect(m_task->task(), 0, this, 0);
 	}
 	
 	m_task = taskItem;

applet/SmoothTasks/Task.h

 	QString                 text() const;
 	QString                 description() const;
 	int                     desktop() const;
-	TaskManager::TaskPtr    task() const;
+	TaskManager::Task*      task() const;
 	TaskManager::AbstractGroupableItem *abstractItem() { return m_abstractItem; }
 	TaskManager::GroupPtr   group() const { return m_group; }
 	TaskManager::TaskItem  *taskItem() const { return m_task; }
 	TaskManager::LauncherItem  *launcherItem() const { return m_launcher; }
-	TaskManager::StartupPtr startup() const;
+	TaskManager::Startup*   startup() const;
 	TaskFlags               flags() const { return m_flags; }
 	ItemType                type()  const { return m_type; }
 	void                    addMimeData(QMimeData* mimeData);

applet/SmoothTasks/TaskItem.cpp

 
 void TaskItem::publishIconGeometry() {
 	QRect iconRect(iconGeometry());
-	TaskManager::TaskPtr task;
+	TaskManager::Task* task;
 	TaskManager::GroupPtr group;
 	
 	switch (m_task->type()) {
 }
 
 void TaskItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) {
-	TaskManager::TaskPtr task;
+	TaskManager::Task* task;
 	
 	switch (event->button()) {
 	case Qt::LeftButton:
 }
 
 void TaskItem::activate() {
-	TaskManager::TaskPtr task;
+	TaskManager::Task* task;
 	
 	switch (m_task->type()) {
 	case Task::TaskItem:

applet/SmoothTasks/WindowPreview.cpp

 	if (m_toolTip->previewsAvailable()) {
 		// determine preview size:
 		WId wid = 0;
-		TaskManager::TaskPtr task = m_task->task();
+		TaskManager::Task* task = m_task->task();
 		
 		if (task) {
 			wid = task->window();
 }
 
 void WindowPreview::highlightTask() {
-	TaskManager::TaskPtr task = m_task->task();
+	TaskManager::Task* task = m_task->task();
 	
 	if (task) {
 		m_toolTip->highlightTask(task->window());
 	}
 	
 	if(m_task->type() != Task::LauncherItem) {
-		TaskManager::TaskPtr task = m_task->task();
+		TaskManager::Task* task = m_task->task();
 		if (task) {
 			if (m_toolTip->applet()->hideTooltipAfterClick() || !task->isActive())
 				task->activate();
 }
 
 void WindowPreview::activateForDrop() {
-	TaskManager::TaskPtr task = m_task->task();
+	TaskManager::Task* task = m_task->task();
 	if (task) {
 		if (task->isMinimized()) {
 			task->restore();
 }
 
 void WindowPreview::closeTask() {
-	TaskManager::TaskPtr task = m_task->task();
+	TaskManager::Task* task = m_task->task();
 	if (task) {
 		task->close();
 	}