1. flupp
  2. Smooth Tasks Fork
  3. Issues
Issue #13 resolved

Compiling fails in 4.7.80

Anonymous created an issue

Hi, just now I've updated to 4.7.80 and can't recompile smooth-tasks any more.

Scanning dependencies of target plasma_applet_smooth-tasks
[ 14%] [ 18%] [ 22%] [ 25%] Building CXX object applet/CMakeFiles/plasma_applet_smooth-tasks.dir/plasma_applet_smooth-tasks_automoc.o
Building CXX object applet/CMakeFiles/plasma_applet_smooth-tasks.dir/SmoothTasks/TaskItem.o
Building CXX object applet/CMakeFiles/plasma_applet_smooth-tasks.dir/SmoothTasks/Applet.o
Building CXX object applet/CMakeFiles/plasma_applet_smooth-tasks.dir/SmoothTasks/Task.o
In file included from /var/abs/local/yaourtbuild/smooth-tasks-fork/src/smooth-tasks-fork-build/applet/SmoothTasks/Task.cpp:23:0:
/var/abs/local/yaourtbuild/smooth-tasks-fork/src/smooth-tasks-fork-build/applet/SmoothTasks/Task.h:81:2: ошибка: «TaskPtr» in namespace «TaskManager» does not name a type /var/abs/local/yaourtbuild/smooth-tasks-fork/src/smooth-tasks-fork-build/applet/SmoothTasks/Task.h:86:2: ошибка: «StartupPtr» in namespace «TaskManager» does not name a type In file included from /var/abs/local/yaourtbuild/smooth-tasks-fork/src/smooth-tasks-fork-build/applet/SmoothTasks/TaskItem.h:25:0, from /var/abs/local/yaourtbuild/smooth-tasks-fork/src/smooth-tasks-fork-build/applet/SmoothTasks/TaskItem.cpp:23: /var/abs/local/yaourtbuild/smooth-tasks-fork/src/smooth-tasks-fork-build/applet/SmoothTasks/Task.h:81:2: ошибка: «TaskPtr» in namespace «TaskManager» does not name a type /var/abs/local/yaourtbuild/smooth-tasks-fork/src/smooth-tasks-fork-build/applet/SmoothTasks/Task.h:86:2: ошибка: «StartupPtr» in namespace «TaskManager» does not name a type /var/abs/local/yaourtbuild/smooth-tasks-fork/src/smooth-tasks-fork-build/applet/SmoothTasks/Task.cpp: In constructor «SmoothTasks::Task::Task(TaskManager::AbstractGroupableItem, QObject

Comments (5)

  1. Anonymous

    I managed to get it compiled and running with KDE 4.8 RC1. A simple patch is needed (I have no idea if its any correct though)

    diff -u src/smooth-tasks-fork/applet/SmoothTasks/PlasmaToolTip.cpp src/smooth-tasks-fork/applet/SmoothTasksX/PlasmaToolTip.cpp
    --- src/smooth-tasks-fork/applet/SmoothTasks/PlasmaToolTip.cpp	2011-12-24 03:13:55.604361299 +0100
    +++ src/smooth-tasks-fork/applet/SmoothTasksX/PlasmaToolTip.cpp	2011-12-24 03:11:00.000000000 +0100
    @@ -91,7 +91,7 @@
     	}
     	
     	Plasma::ToolTipContent data;
    -	TaskManager::TaskPtr taskPtr(task->task());
    +	TaskManager::Task* taskPtr(task->task());
     	QList<WId> windows;
     	int desktop = -1;
     
    diff -u src/smooth-tasks-fork/applet/SmoothTasks/SmoothToolTip.cpp src/smooth-tasks-fork/applet/SmoothTasksX/SmoothToolTip.cpp
    --- src/smooth-tasks-fork/applet/SmoothTasks/SmoothToolTip.cpp	2011-12-24 03:13:55.605361287 +0100
    +++ src/smooth-tasks-fork/applet/SmoothTasksX/SmoothToolTip.cpp	2011-12-24 03:10:24.000000000 +0100
    @@ -474,7 +474,7 @@
     	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());
    diff -u src/smooth-tasks-fork/applet/SmoothTasks/Task.cpp src/smooth-tasks-fork/applet/SmoothTasksX/Task.cpp
    --- src/smooth-tasks-fork/applet/SmoothTasks/Task.cpp	2011-12-24 03:13:55.606361275 +0100
    +++ src/smooth-tasks-fork/applet/SmoothTasksX/Task.cpp	2011-12-24 03:07:21.000000000 +0100
    @@ -118,8 +118,8 @@
     }
     
     QString Task::text() const {
    -	TaskManager::TaskPtr    task;
    -	TaskManager::StartupPtr startup;
    +	TaskManager::Task    *task;
    +	TaskManager::Startup *startup;
     	
     	switch (type()) {
     	case StartupItem:
    @@ -186,12 +186,23 @@
        return m_task ? m_task->task()->desktop() : -1;
     }
     
    -TaskManager::TaskPtr Task::task() const {
    -	return m_task ? m_task->task() : TaskManager::TaskPtr();
    -}
    -
    -TaskManager::StartupPtr Task::startup() const {
    -	return m_task ? m_task->startup() : TaskManager::StartupPtr();
    +TaskManager::Task* Task::task() const {
    +	if (m_task) {
    +		return m_task->task();
    +	} else {
    +		TaskManager::Task *task;
    +		return task;
    +	}
    +	//return m_task ? m_task->task() : ::TaskManager::Task task;
    +}
    +
    +TaskManager::Startup* Task::startup() const {
    +	if (m_task) {
    +		return m_task->startup();
    +	} else {
    +		TaskManager::Startup* startup;
    +		return startup;
    +	}
     }
     
     int Task::taskCount() const {
    @@ -309,7 +320,7 @@
     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;
    diff -u src/smooth-tasks-fork/applet/SmoothTasks/Task.h src/smooth-tasks-fork/applet/SmoothTasksX/Task.h
    --- src/smooth-tasks-fork/applet/SmoothTasks/Task.h	2011-12-24 03:13:55.607361262 +0100
    +++ src/smooth-tasks-fork/applet/SmoothTasksX/Task.h	2011-12-24 02:34:23.000000000 +0100
    @@ -78,12 +78,12 @@
     	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::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);
    Only in src/smooth-tasks-fork/applet/SmoothTasksX: .Task.h.kate-swp
    diff -u src/smooth-tasks-fork/applet/SmoothTasks/TaskItem.cpp src/smooth-tasks-fork/applet/SmoothTasksX/TaskItem.cpp
    --- src/smooth-tasks-fork/applet/SmoothTasks/TaskItem.cpp	2011-12-24 03:13:55.610361223 +0100
    +++ src/smooth-tasks-fork/applet/SmoothTasksX/TaskItem.cpp	2011-12-24 03:09:11.000000000 +0100
    @@ -375,7 +375,7 @@
     
     void TaskItem::publishIconGeometry() {
     	QRect iconRect(iconGeometry());
    -	TaskManager::TaskPtr task;
    +	TaskManager::Task *task;
     	TaskManager::GroupPtr group;
     	
     	switch (m_task->type()) {
    @@ -465,7 +465,7 @@
     }
     
     void TaskItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) {
    -	TaskManager::TaskPtr task;
    +	TaskManager::Task* task;
     	
     	switch (event->button()) {
     	case Qt::LeftButton:
    @@ -626,7 +626,7 @@
     }
     
     void TaskItem::activate() {
    -	TaskManager::TaskPtr task;
    +	TaskManager::Task* task;
     	
     	switch (m_task->type()) {
     	case Task::TaskItem:
    Common subdirectories: src/smooth-tasks-fork/applet/SmoothTasks/Ui and src/smooth-tasks-fork/applet/SmoothTasksX/Ui
    diff -u src/smooth-tasks-fork/applet/SmoothTasks/WindowPreview.cpp src/smooth-tasks-fork/applet/SmoothTasksX/WindowPreview.cpp
    --- src/smooth-tasks-fork/applet/SmoothTasks/WindowPreview.cpp	2011-12-24 03:13:55.619361111 +0100
    +++ src/smooth-tasks-fork/applet/SmoothTasksX/WindowPreview.cpp	2011-12-24 03:12:49.000000000 +0100
    @@ -117,7 +117,7 @@
     	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();
    @@ -297,7 +297,7 @@
     }
     
     void WindowPreview::highlightTask() {
    -	TaskManager::TaskPtr task = m_task->task();
    +	TaskManager::Task* task = m_task->task();
     	
     	if (task) {
     		m_toolTip->highlightTask(task->window());
    @@ -325,7 +325,7 @@
     	m_toolTip->hide();
     	
             if(m_task->type() != Task::LauncherItem) {
    -                TaskManager::TaskPtr task = m_task->task();
    +                TaskManager::Task* task = m_task->task();
                     if (task) {
                             task->activate();
                     }
    @@ -336,7 +336,7 @@
     }
     
     void WindowPreview::activateForDrop() {
    -	TaskManager::TaskPtr task = m_task->task();
    +	TaskManager::Task* task = m_task->task();
     	if (task) {
     		if (task->isMinimized()) {
     			task->restore();
    @@ -347,7 +347,7 @@
     }
     
     void WindowPreview::closeTask() {
    -	TaskManager::TaskPtr task = m_task->task();
    +	TaskManager::Task* task = m_task->task();
     	if (task) {
     		task->close();
     	}
    
    
    
    
  2. Anonymous

    When I was testing the patch, I had a problem with the permanent launchers disappearing after logout. Is the problem still present in KDE 4.8 final?

  3. Anonymous

    I'm fix the patch above for KDE 4.8.0 Release (I have no idea if its any correct though too):

    diff --git a/applet/SmoothTasks/PlasmaToolTip.cpp b/applet/SmoothTasks/PlasmaToolTip.cpp
    --- a/applet/SmoothTasks/PlasmaToolTip.cpp
    +++ b/applet/SmoothTasks/PlasmaToolTip.cpp
    @@ -91,7 +91,7 @@
     	}
     	
     	Plasma::ToolTipContent data;
    -	TaskManager::TaskPtr taskPtr(task->task());
    +	TaskManager::Task* taskPtr(task->task());
     	QList<WId> windows;
     	int desktop = -1;
     
    diff --git a/applet/SmoothTasks/SmoothToolTip.cpp b/applet/SmoothTasks/SmoothToolTip.cpp
    --- a/applet/SmoothTasks/SmoothToolTip.cpp
    +++ b/applet/SmoothTasks/SmoothToolTip.cpp
    @@ -474,7 +474,7 @@
     	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());
    diff --git a/applet/SmoothTasks/Task.cpp b/applet/SmoothTasks/Task.cpp
    --- a/applet/SmoothTasks/Task.cpp
    +++ b/applet/SmoothTasks/Task.cpp
    @@ -45,7 +45,7 @@
     		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(
    @@ -119,8 +119,8 @@
     }
     
     QString Task::text() const {
    -	TaskManager::TaskPtr    task;
    -	TaskManager::StartupPtr startup;
    +	TaskManager::Task    *task;
    +	TaskManager::Startup *startup;
     	
     	switch (type()) {
     	case StartupItem:
    @@ -187,12 +187,25 @@
        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 {
    +    if (m_task) {
    +		return m_task->task();
    +	} else {
    +        //TaskManager::Task *task;
    +        //return task;
    +        return NULL;
    +    }
    +	//return m_task ? m_task->task() : ::TaskManager::Task task;
     }
     
    -TaskManager::StartupPtr Task::startup() const {
    -	return m_task ? m_task->startup() : TaskManager::StartupPtr();
    +TaskManager::Startup* Task::startup() const {
    +	if (m_task) {
    +		return m_task->startup();
    +	} else {
    +        //TaskManager::Startup* startup;
    +        //return startup;
    +        return NULL;
    +	}
     }
     
     int Task::taskCount() const {
    @@ -226,7 +239,7 @@
     	if (changes & TaskManager::ActionsChanged) changesStr += " ActionsChanged";
     	if (changes & TaskManager::TransientsChanged) changesStr += " TransientsChanged";
     	if (changes & TaskManager::IconChanged) changesStr += " IconChanged";
    -	if (changes & TaskManager::ColorChanged) changesStr += " ColorChanged";
    +    //if (changes & TaskManager::ColorChanged) changesStr += " ColorChanged";
     	//if (changes & TaskManager::EverythingChanged) changesStr += " EverythingChanged";
     	if (m_group) {
     		changesStr += " [";
    @@ -336,7 +349,7 @@
     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;
    diff --git a/applet/SmoothTasks/Task.h b/applet/SmoothTasks/Task.h
    --- a/applet/SmoothTasks/Task.h
    +++ b/applet/SmoothTasks/Task.h
    @@ -78,12 +78,12 @@
     	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::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);
    diff --git a/applet/SmoothTasks/TaskItem.cpp b/applet/SmoothTasks/TaskItem.cpp
    --- a/applet/SmoothTasks/TaskItem.cpp
    +++ b/applet/SmoothTasks/TaskItem.cpp
    @@ -75,7 +75,7 @@
     const QString TaskItem::GROUP_EXPANDER_TOP    = QString::fromLatin1("group-expander-top");
     const QString TaskItem::GROUP_EXPANDER_RIGHT  = QString::fromLatin1("group-expander-right");
     const QString TaskItem::GROUP_EXPANDER_LEFT   = QString::fromLatin1("group-expander-left");
    -const QString TaskItem::GROUP_EXPANDER_BOTTOM = QString::fromLatin1("group-expander-bottom");
    +const QString TaskItem::GROUP_EXPANDER_BOTTOM = QString::fromLatin1("group-expanisGroupItemder-bottom");
     
     TaskItem::TaskItem(AbstractGroupableItem *abstractItem, Applet *applet)
     		: QGraphicsWidget(applet),
    @@ -132,7 +132,7 @@
     		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*)),
    @@ -190,7 +190,7 @@
     		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());
    @@ -511,7 +511,7 @@
     
     void TaskItem::publishIconGeometry() {
     	QRect iconRect(iconGeometry());
    -	TaskManager::TaskPtr task;
    +	TaskManager::Task *task;
     	TaskManager::GroupPtr group;
     	
     	switch (m_task->type()) {
    @@ -617,7 +617,7 @@
     }
     
     void TaskItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) {
    -	TaskManager::TaskPtr task;
    +	TaskManager::Task* task;
     	
     	switch (event->button()) {
     	case Qt::LeftButton:
    @@ -778,7 +778,7 @@
     }
     
     void TaskItem::activate() {
    -	TaskManager::TaskPtr task;
    +	TaskManager::Task* task;
     	
     	switch (m_task->type()) {
     	case Task::TaskItem:
    @@ -1388,7 +1388,7 @@
     
     /** 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);
     		}
    diff --git a/applet/SmoothTasks/WindowPreview.cpp b/applet/SmoothTasks/WindowPreview.cpp
    --- a/applet/SmoothTasks/WindowPreview.cpp
    +++ b/applet/SmoothTasks/WindowPreview.cpp
    @@ -118,7 +118,7 @@
     	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();
    @@ -298,7 +298,7 @@
     }
     
     void WindowPreview::highlightTask() {
    -	TaskManager::TaskPtr task = m_task->task();
    +	TaskManager::Task* task = m_task->task();
     	
     	if (task) {
     		m_toolTip->highlightTask(task->window());
    @@ -328,7 +328,7 @@
     	}
     	
     	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();
    @@ -342,7 +342,7 @@
     }
     
     void WindowPreview::activateForDrop() {
    -	TaskManager::TaskPtr task = m_task->task();
    +	TaskManager::Task* task = m_task->task();
     	if (task) {
     		if (task->isMinimized()) {
     			task->restore();
    @@ -353,7 +353,7 @@
     }
     
     void WindowPreview::closeTask() {
    -	TaskManager::TaskPtr task = m_task->task();
    +	TaskManager::Task* task = m_task->task();
     	if (task) {
     		task->close();
     	}
    
    
  4. Log in to comment