TaskHub: Sanitize tasks and reject obviously invalid ones.

I hope this helps to track down tasks as described in QTCREATORBUG-11976

Change-Id: I758c28c56ad69aa0c19896065925de188475bda3
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Tobias Hunger
2014-04-10 12:44:13 +02:00
parent 2e22993c83
commit cf618464d2
3 changed files with 20 additions and 0 deletions

View File

@@ -29,6 +29,8 @@
#include "task.h"
#include <utils/qtcassert.h>
namespace ProjectExplorer
{
@@ -68,6 +70,8 @@ Task::Task(TaskType type_, const QString &description_,
void Task::addMark(TextEditor::BaseTextMark *mark)
{
QTC_ASSERT(m_mark.isNull(), return);
m_mark = QSharedPointer<TextEditor::BaseTextMark>(mark);
}