aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/task.h
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@theqtcompany.com>2016-02-02 18:26:51 +0100
committerTobias Hunger <tobias.hunger@theqtcompany.com>2016-02-03 08:29:08 +0000
commitf4296d7504e87d291232bc13caa99a439d2393ab (patch)
tree66892ae3ded5333a7036401031effaf228921d3a /src/plugins/projectexplorer/task.h
parent6a3e687d140cad3dec006b2d5fa8982d4b10f31c (diff)
ProjectExplorer: Modernize
* Use override where appropriate * Use pragma once * Make more constructors explicit Change-Id: I2865fe10f288e3de570826058e43b70a0cb4ee37 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/projectexplorer/task.h')
-rw-r--r--src/plugins/projectexplorer/task.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/plugins/projectexplorer/task.h b/src/plugins/projectexplorer/task.h
index fe8147bd63..0b29101654 100644
--- a/src/plugins/projectexplorer/task.h
+++ b/src/plugins/projectexplorer/task.h
@@ -23,8 +23,7 @@
**
****************************************************************************/
-#ifndef PROJECTEXPLORER_TASK_H
-#define PROJECTEXPLORER_TASK_H
+#pragma once
#include "projectexplorer_export.h"
@@ -48,7 +47,7 @@ public:
Warning
};
- Task();
+ Task() = default;
Task(TaskType type, const QString &description,
const Utils::FileName &file, int line, Core::Id category,
const Utils::FileName &iconName = Utils::FileName());
@@ -59,12 +58,12 @@ public:
bool isNull() const;
void clear();
- unsigned int taskId;
- TaskType type;
+ unsigned int taskId = 0;
+ TaskType type = Unknown;
QString description;
Utils::FileName file;
- int line;
- int movedLine; // contains a line number if the line was moved in the editor
+ int line = -1;
+ int movedLine = -1; // contains a line number if the line was moved in the editor
Core::Id category;
QIcon icon;
void addMark(TextEditor::TextMark *mark);
@@ -93,5 +92,3 @@ bool PROJECTEXPLORER_EXPORT operator<(const Task &a, const Task &b);
Q_DECLARE_METATYPE(ProjectExplorer::Task)
Q_DECLARE_METATYPE(QList<ProjectExplorer::Task>)
-
-#endif // PROJECTEXPLORER_TASK_H