diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt
index 13a985613e6..0ce4647124d 100644
--- a/src/plugins/CMakeLists.txt
+++ b/src/plugins/CMakeLists.txt
@@ -24,7 +24,6 @@ add_subdirectory(bookmarks)
add_subdirectory(cppeditor)
add_subdirectory(help)
add_subdirectory(resourceeditor)
-add_subdirectory(tasklist)
add_subdirectory(nim)
add_subdirectory(conan)
diff --git a/src/plugins/plugins.qbs b/src/plugins/plugins.qbs
index d46294e16cb..3a5564c772f 100644
--- a/src/plugins/plugins.qbs
+++ b/src/plugins/plugins.qbs
@@ -75,7 +75,6 @@ Project {
"silversearcher/silversearcher.qbs",
"studiowelcome/studiowelcome.qbs",
"subversion/subversion.qbs",
- "tasklist/tasklist.qbs",
"texteditor/texteditor.qbs",
"todo/todo.qbs",
"updateinfo/updateinfo.qbs",
diff --git a/src/plugins/projectexplorer/CMakeLists.txt b/src/plugins/projectexplorer/CMakeLists.txt
index 23f8e926372..120efbf6306 100644
--- a/src/plugins/projectexplorer/CMakeLists.txt
+++ b/src/plugins/projectexplorer/CMakeLists.txt
@@ -171,6 +171,7 @@ add_qtc_plugin(ProjectExplorer
targetsetuppage.cpp targetsetuppage.h
targetsetupwidget.cpp targetsetupwidget.h
task.cpp task.h
+ taskfile.cpp taskfile.h
taskhub.cpp taskhub.h
taskmodel.cpp taskmodel.h
taskwindow.cpp taskwindow.h
diff --git a/src/plugins/projectexplorer/ProjectExplorer.json.in b/src/plugins/projectexplorer/ProjectExplorer.json.in
index 8764d7d6eab..d96dcc26c6d 100644
--- a/src/plugins/projectexplorer/ProjectExplorer.json.in
+++ b/src/plugins/projectexplorer/ProjectExplorer.json.in
@@ -34,5 +34,17 @@
\"Description\" : \"Restore a saved session\"
}
],
- $$dependencyList
+ $$dependencyList,
+
+ \"Mimetypes\" : [
+ \"\",
+ \"\",
+ \" \",
+ \" \",
+ \" Qt Creator task list file\",
+ \" \",
+ \" \",
+ \" \",
+ \"\"
+ ]
}
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index 27bdbcd8400..dfa2d7c1f4f 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -92,6 +92,7 @@
#include "showineditortaskhandler.h"
#include "simpleprojectwizard.h"
#include "target.h"
+#include "taskfile.h"
#include "taskhub.h"
#include "toolchainmanager.h"
#include "toolchainoptionspage.h"
@@ -532,6 +533,7 @@ public:
void currentModeChanged(Id mode, Id oldMode);
void updateWelcomePage();
+ void loadSesssionTasks();
void checkForShutdown();
void timerEvent(QTimerEvent *) override;
@@ -717,6 +719,8 @@ public:
DefaultDeployConfigurationFactory m_defaultDeployConfigFactory;
IDocumentFactory m_documentFactory;
+ IDocumentFactory m_taskFileFactory;
+ StopMonitoringHandler closeTaskFile;
DeviceTypeKitAspect deviceTypeKitAspect;
DeviceKitAspect deviceKitAspect;
@@ -872,10 +876,10 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
dd, &ProjectExplorerPluginPrivate::updateActions);
connect(sessionManager, &SessionManager::sessionLoaded,
dd, &ProjectExplorerPluginPrivate::updateActions);
- connect(sessionManager,
- &SessionManager::sessionLoaded,
- dd,
- &ProjectExplorerPluginPrivate::updateWelcomePage);
+ connect(sessionManager, &SessionManager::sessionLoaded,
+ dd, &ProjectExplorerPluginPrivate::updateWelcomePage);
+ connect(sessionManager, &SessionManager::sessionLoaded,
+ dd, &ProjectExplorerPluginPrivate::loadSesssionTasks);
connect(sessionManager, &SessionManager::projectAdded, dd, [](ProjectExplorer::Project *project) {
dd->m_allProjectDirectoriesFilter.addDirectory(project->projectDirectory().toString());
@@ -2242,6 +2246,11 @@ void ProjectExplorerPlugin::extensionsInitialized()
dd->m_profileMimeTypes += mimeType;
}
+ dd->m_taskFileFactory.addMimeType("text/x-tasklist");
+ dd->m_taskFileFactory.setOpener([](const FilePath &filePath) {
+ return TaskFile::openTasks(filePath);
+ });
+
QString allProjectsFilter = tr("All Projects");
allProjectsFilter += QLatin1String(" (") + allGlobPatterns.join(QLatin1Char(' '))
+ QLatin1Char(')');
@@ -2251,6 +2260,7 @@ void ProjectExplorerPlugin::extensionsInitialized()
BuildManager::extensionsInitialized();
TaskHub::addCategory(Constants::TASK_CATEGORY_SANITIZER,
tr("Sanitizer", "Category for sanitizer issues listed under 'Issues'"));
+ TaskHub::addCategory(Constants::TASK_CATEGORY_TASKLIST_ID, tr("My Tasks"));
SshSettings::loadSettings(Core::ICore::settings());
const auto searchPathRetriever = [] {
@@ -2594,6 +2604,14 @@ void ProjectExplorerPluginPrivate::updateWelcomePage()
m_welcomePage.reloadWelcomeScreenData();
}
+void ProjectExplorerPluginPrivate::loadSesssionTasks()
+{
+ const FilePath filePath = FilePath::fromVariant(
+ SessionManager::value(Constants::SESSION_TASKFILE_KEY));
+ if (!filePath.isEmpty())
+ TaskFile::openTasks(filePath);
+}
+
void ProjectExplorerPluginPrivate::currentModeChanged(Id mode, Id oldMode)
{
if (oldMode == Constants::MODE_SESSION) {
diff --git a/src/plugins/projectexplorer/projectexplorer.qbs b/src/plugins/projectexplorer/projectexplorer.qbs
index 1843cf63719..b4afe27e97e 100644
--- a/src/plugins/projectexplorer/projectexplorer.qbs
+++ b/src/plugins/projectexplorer/projectexplorer.qbs
@@ -145,6 +145,7 @@ Project {
"targetsetuppage.cpp", "targetsetuppage.h",
"targetsetupwidget.cpp", "targetsetupwidget.h",
"task.cpp", "task.h",
+ "taskfile.cpp", "taskfile.h",
"taskhub.cpp", "taskhub.h",
"taskmodel.cpp", "taskmodel.h",
"taskwindow.cpp", "taskwindow.h",
diff --git a/src/plugins/projectexplorer/projectexplorerconstants.h b/src/plugins/projectexplorer/projectexplorerconstants.h
index 94cba518594..28b92fb588f 100644
--- a/src/plugins/projectexplorer/projectexplorerconstants.h
+++ b/src/plugins/projectexplorer/projectexplorerconstants.h
@@ -132,6 +132,7 @@ const char TASK_CATEGORY_BUILDSYSTEM[] = "Task.Category.Buildsystem";
const char TASK_CATEGORY_DEPLOYMENT[] = "Task.Category.Deploy";
const char TASK_CATEGORY_AUTOTEST[] = "Task.Category.Autotest";
const char TASK_CATEGORY_SANITIZER[] = "Task.Category.Analyzer";
+const char TASK_CATEGORY_TASKLIST_ID[] = "Task.Category.TaskListId";
// Wizard categories
const char QT_PROJECT_WIZARD_CATEGORY[] = "H.Project";
@@ -239,6 +240,7 @@ const char LASTSESSION_KEY[] = "ProjectExplorer/StartupSession";
const char SETTINGS_MENU_HIDE_BUILD[] = "Menu/HideBuild";
const char SETTINGS_MENU_HIDE_DEBUG[] = "Menu/HideDebug";
const char SETTINGS_MENU_HIDE_ANALYZE[] = "Menu/HideAnalyze";
+const char SESSION_TASKFILE_KEY[] = "TaskList.File";
// UI texts
PROJECTEXPLORER_EXPORT QString msgAutoDetected();
diff --git a/src/plugins/tasklist/tasklistplugin.cpp b/src/plugins/projectexplorer/taskfile.cpp
similarity index 55%
rename from src/plugins/tasklist/tasklistplugin.cpp
rename to src/plugins/projectexplorer/taskfile.cpp
index 6684f86a92c..d9c16fc69ee 100644
--- a/src/plugins/tasklist/tasklistplugin.cpp
+++ b/src/plugins/projectexplorer/taskfile.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
@@ -23,81 +23,91 @@
**
****************************************************************************/
-#include "tasklistplugin.h"
-
-#include "stopmonitoringhandler.h"
#include "taskfile.h"
-#include "tasklistconstants.h"
-#include
-#include
+#include "projectexplorer.h"
+#include "session.h"
+#include "taskhub.h"
+
#include
-#include
-#include
-#include
+#include
#include
+#include
-#include
+#include
#include
-#include
-using namespace Core;
-using namespace ProjectExplorer;
using namespace Utils;
-static const char SESSION_FILE_KEY[] = "TaskList.File";
-
-namespace TaskList {
+namespace ProjectExplorer {
namespace Internal {
-static TaskListPlugin *m_instance;
+// --------------------------------------------------------------------------
+// TaskFile
+// --------------------------------------------------------------------------
-class TaskListPluginPrivate
+QList TaskFile::openFiles;
+
+TaskFile::TaskFile(QObject *parent) : Core::IDocument(parent)
{
-public:
- QList m_openFiles;
- Core::IDocumentFactory m_fileFactory;
- StopMonitoringHandler m_stopMonitoringHandler;
-};
+ setId("TaskList.TaskFile");
+}
+
+Core::IDocument::ReloadBehavior TaskFile::reloadBehavior(ChangeTrigger state, ChangeType type) const
+{
+ Q_UNUSED(state)
+ Q_UNUSED(type)
+ return BehaviorSilent;
+}
+
+bool TaskFile::reload(QString *errorString, ReloadFlag flag, ChangeType type)
+{
+ Q_UNUSED(flag)
+
+ if (type == TypeRemoved) {
+ deleteLater();
+ return true;
+ }
+ return load(errorString, filePath());
+}
static Task::TaskType typeFrom(const QString &typeName)
{
- Task::TaskType type = Task::Unknown;
QString tmp = typeName.toLower();
- if (tmp.startsWith(QLatin1String("warn")))
- type = Task::Warning;
- else if (tmp.startsWith(QLatin1String("err")))
- type = Task::Error;
- return type;
+ if (tmp.startsWith("warn"))
+ return Task::Warning;
+ if (tmp.startsWith("err"))
+ return Task::Error;
+ return Task::Unknown;
}
static QStringList parseRawLine(const QByteArray &raw)
{
QStringList result;
QString line = QString::fromUtf8(raw.constData());
- if (line.startsWith(QLatin1Char('#')))
+ if (line.startsWith('#'))
return result;
- return line.split(QLatin1Char('\t'));
+ return line.split('\t');
}
static QString unescape(const QString &input)
{
QString result;
for (int i = 0; i < input.count(); ++i) {
- if (input.at(i) == QLatin1Char('\\')) {
+ if (input.at(i) == '\\') {
if (i == input.count() - 1)
continue;
- if (input.at(i + 1) == QLatin1Char('n')) {
- result.append(QLatin1Char('\n'));
+ if (input.at(i + 1) == 'n') {
+ result.append('\n');
++i;
continue;
- } else if (input.at(i + 1) == QLatin1Char('t')) {
- result.append(QLatin1Char('\t'));
+ } else if (input.at(i + 1) == 't') {
+ result.append('\t');
++i;
continue;
- } else if (input.at(i + 1) == QLatin1Char('\\')) {
- result.append(QLatin1Char('\\'));
+ } else if (input.at(i + 1) == '\\') {
+ result.append('\\');
++i;
continue;
}
@@ -112,7 +122,7 @@ static bool parseTaskFile(QString *errorString, const FilePath &name)
{
QFile tf(name.toString());
if (!tf.open(QIODevice::ReadOnly)) {
- *errorString = TaskListPlugin::tr("Cannot open task file %1: %2").arg(
+ *errorString = ProjectExplorerPlugin::tr("Cannot open task file %1: %2").arg(
name.toUserOutput(), tf.errorString());
return false;
}
@@ -155,78 +165,34 @@ static bool parseTaskFile(QString *errorString, const FilePath &name)
description = unescape(description);
TaskHub::addTask(Task(type, description, FilePath::fromUserInput(file), line,
- Constants::TASKLISTTASK_ID));
+ Constants::TASK_CATEGORY_TASKLIST_ID));
}
return true;
}
-// --------------------------------------------------------------------------
-// TaskListPlugin
-// --------------------------------------------------------------------------
-
-IDocument *TaskListPlugin::openTasks(const FilePath &fileName)
+static void clearTasks()
{
- TaskFile *file = Utils::findOrDefault(d->m_openFiles, Utils::equal(&TaskFile::filePath, fileName));
- QString errorString;
- if (file) {
- file->load(&errorString, fileName);
- } else {
- file = new TaskFile(this);
-
- if (!file->load(&errorString, fileName)) {
- QMessageBox::critical(ICore::dialogParent(), tr("File Error"), errorString);
- delete file;
- return nullptr;
- }
-
- d->m_openFiles.append(file);
-
- // Register with filemanager:
- DocumentManager::addDocument(file);
- }
- return file;
+ TaskHub::clearTasks(Constants::TASK_CATEGORY_TASKLIST_ID);
}
-TaskListPlugin::TaskListPlugin()
+void TaskFile::stopMonitoring()
{
- m_instance = this;
+ SessionManager::setValue(Constants::SESSION_TASKFILE_KEY, {});
+
+ for (TaskFile *document : qAsConst(openFiles))
+ document->deleteLater();
+ openFiles.clear();
}
-TaskListPlugin::~TaskListPlugin()
-{
- delete d;
- m_instance = nullptr;
-}
-
-bool TaskListPlugin::initialize(const QStringList &arguments, QString *errorMessage)
-{
- Q_UNUSED(arguments)
- Q_UNUSED(errorMessage)
-
- d = new TaskListPluginPrivate;
-
- //: Category under which tasklist tasks are listed in Issues view
- TaskHub::addCategory(Constants::TASKLISTTASK_ID, tr("My Tasks"));
-
- d->m_fileFactory.addMimeType(QLatin1String("text/x-tasklist"));
- d->m_fileFactory.setOpener([this](const FilePath &filePath) {
- return openTasks(filePath);
- });
-
- connect(SessionManager::instance(), &SessionManager::sessionLoaded,
- this, &TaskListPlugin::loadDataFromSession);
-
- return true;
-}
-
-bool TaskListPlugin::loadFile(QString *errorString, const FilePath &fileName)
+bool TaskFile::load(QString *errorString, const FilePath &fileName)
{
+ setFilePath(fileName);
clearTasks();
bool result = parseTaskFile(errorString, fileName);
if (result) {
if (!SessionManager::isDefaultSession(SessionManager::activeSession()))
- SessionManager::setValue(QLatin1String(SESSION_FILE_KEY), fileName.toString());
+ SessionManager::setValue(Constants::SESSION_TASKFILE_KEY, fileName.toVariant());
} else {
stopMonitoring();
}
@@ -234,27 +200,53 @@ bool TaskListPlugin::loadFile(QString *errorString, const FilePath &fileName)
return result;
}
-void TaskListPlugin::stopMonitoring()
+TaskFile *TaskFile::openTasks(const FilePath &filePath)
{
- SessionManager::setValue(QLatin1String(SESSION_FILE_KEY), QString());
+ TaskFile *file = Utils::findOrDefault(openFiles, Utils::equal(&TaskFile::filePath, filePath));
+ QString errorString;
+ if (file) {
+ file->load(&errorString, filePath);
+ } else {
+ file = new TaskFile(ProjectExplorerPlugin::instance());
- foreach (TaskFile *document, m_instance->d->m_openFiles)
- document->deleteLater();
- m_instance->d->m_openFiles.clear();
+ if (!file->load(&errorString, filePath)) {
+ QMessageBox::critical(Core::ICore::dialogParent(), tr("File Error"), errorString);
+ delete file;
+ return nullptr;
+ }
+
+ openFiles.append(file);
+
+ // Register with filemanager:
+ Core::DocumentManager::addDocument(file);
+ }
+ return file;
}
-void TaskListPlugin::clearTasks()
+bool StopMonitoringHandler::canHandle(const ProjectExplorer::Task &task) const
{
- TaskHub::clearTasks(Constants::TASKLISTTASK_ID);
+ return task.category == Constants::TASK_CATEGORY_TASKLIST_ID;
}
-void TaskListPlugin::loadDataFromSession()
+void StopMonitoringHandler::handle(const ProjectExplorer::Task &task)
{
- const FilePath fileName = FilePath::fromString(
- SessionManager::value(QLatin1String(SESSION_FILE_KEY)).toString());
- if (!fileName.isEmpty())
- openTasks(fileName);
+ QTC_ASSERT(canHandle(task), return);
+ Q_UNUSED(task)
+ TaskFile::stopMonitoring();
+}
+
+QAction *StopMonitoringHandler::createAction(QObject *parent) const
+{
+ const QString text =
+ QCoreApplication::translate("TaskList::Internal::StopMonitoringHandler",
+ "Stop Monitoring");
+ const QString toolTip =
+ QCoreApplication::translate("TaskList::Internal::StopMonitoringHandler",
+ "Stop monitoring task files.");
+ auto stopMonitoringAction = new QAction(text, parent);
+ stopMonitoringAction->setToolTip(toolTip);
+ return stopMonitoringAction;
}
} // namespace Internal
-} // namespace TaskList
+} // namespace ProjectExplorer
diff --git a/src/plugins/tasklist/taskfile.h b/src/plugins/projectexplorer/taskfile.h
similarity index 75%
rename from src/plugins/tasklist/taskfile.h
rename to src/plugins/projectexplorer/taskfile.h
index 22331f788e7..a5a1f852c11 100644
--- a/src/plugins/tasklist/taskfile.h
+++ b/src/plugins/projectexplorer/taskfile.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
@@ -25,13 +25,21 @@
#pragma once
+#include "itaskhandler.h"
+
#include
-namespace ProjectExplorer { class Project; }
-
-namespace TaskList {
+namespace ProjectExplorer {
namespace Internal {
+class StopMonitoringHandler : public ITaskHandler
+{
+public:
+ bool canHandle(const ProjectExplorer::Task &) const override;
+ void handle(const ProjectExplorer::Task &) override;
+ QAction *createAction(QObject *parent) const override;
+};
+
class TaskFile : public Core::IDocument
{
public:
@@ -41,7 +49,13 @@ public:
bool reload(QString *errorString, ReloadFlag flag, ChangeType type) override;
bool load(QString *errorString, const Utils::FilePath &fileName);
+
+ static TaskFile *openTasks(const Utils::FilePath &filePath);
+ static void stopMonitoring();
+
+private:
+ static QList openFiles;
};
} // namespace Internal
-} // namespace TaskList
+} // namespace ProjectExplorer
diff --git a/src/plugins/tasklist/CMakeLists.txt b/src/plugins/tasklist/CMakeLists.txt
deleted file mode 100644
index b82d633ec40..00000000000
--- a/src/plugins/tasklist/CMakeLists.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-add_qtc_plugin(TaskList
- PLUGIN_DEPENDS Core ProjectExplorer
- SOURCES
- stopmonitoringhandler.cpp stopmonitoringhandler.h
- taskfile.cpp taskfile.h
- tasklistconstants.h
- tasklistplugin.cpp tasklistplugin.h
-)
diff --git a/src/plugins/tasklist/TaskList.json.in b/src/plugins/tasklist/TaskList.json.in
deleted file mode 100644
index 78ae430c660..00000000000
--- a/src/plugins/tasklist/TaskList.json.in
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- \"Name\" : \"TaskList\",
- \"Version\" : \"$$QTCREATOR_VERSION\",
- \"CompatVersion\" : \"$$QTCREATOR_COMPAT_VERSION\",
- \"Vendor\" : \"The Qt Company Ltd\",
- \"Copyright\" : \"(C) $$QTCREATOR_COPYRIGHT_YEAR The Qt Company Ltd\",
- \"License\" : [ \"Commercial Usage\",
- \"\",
- \"Licensees holding valid Qt Commercial licenses may use this plugin in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and The Qt Company.\",
- \"\",
- \"GNU General Public License Usage\",
- \"\",
- \"Alternatively, this plugin may be used under the terms of the GNU General Public License version 3 as published by the Free Software Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT included in the packaging of this plugin. Please review the following information to ensure the GNU General Public License requirements will be met: https://www.gnu.org/licenses/gpl-3.0.html.\"
- ],
- \"Description\" : \"Use .tasks-files to populate the Issues view.\",
- \"Url\" : \"http://www.qt.io\",
- $$dependencyList,
-
- \"Mimetypes\" : [
- \"\",
- \"\",
- \" \",
- \" \",
- \" Qt Creator task list file\",
- \" \",
- \" \",
- \" \",
- \"\"
- ]
-}
diff --git a/src/plugins/tasklist/stopmonitoringhandler.cpp b/src/plugins/tasklist/stopmonitoringhandler.cpp
deleted file mode 100644
index 0ca105a719b..00000000000
--- a/src/plugins/tasklist/stopmonitoringhandler.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-****************************************************************************/
-
-#include "stopmonitoringhandler.h"
-
-#include "tasklistconstants.h"
-#include "tasklistplugin.h"
-
-#include
-#include
-
-#include
-#include
-
-using namespace TaskList;
-using namespace TaskList::Internal;
-
-// --------------------------------------------------------------------------
-// StopMonitoringHandler
-// --------------------------------------------------------------------------
-
-bool StopMonitoringHandler::canHandle(const ProjectExplorer::Task &task) const
-{
- return task.category == Constants::TASKLISTTASK_ID;
-}
-
-void StopMonitoringHandler::handle(const ProjectExplorer::Task &task)
-{
- QTC_ASSERT(canHandle(task), return);
- Q_UNUSED(task)
- TaskListPlugin::stopMonitoring();
-}
-
-QAction *StopMonitoringHandler::createAction(QObject *parent) const
-{
- const QString text =
- QCoreApplication::translate("TaskList::Internal::StopMonitoringHandler",
- "Stop Monitoring");
- const QString toolTip =
- QCoreApplication::translate("TaskList::Internal::StopMonitoringHandler",
- "Stop monitoring task files.");
- auto stopMonitoringAction = new QAction(text, parent);
- stopMonitoringAction->setToolTip(toolTip);
- return stopMonitoringAction;
-}
diff --git a/src/plugins/tasklist/stopmonitoringhandler.h b/src/plugins/tasklist/stopmonitoringhandler.h
deleted file mode 100644
index ebf8a4e8e77..00000000000
--- a/src/plugins/tasklist/stopmonitoringhandler.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-****************************************************************************/
-
-#pragma once
-
-#include
-
-namespace TaskList {
-namespace Internal {
-
-class StopMonitoringHandler : public ProjectExplorer::ITaskHandler
-{
-public:
- bool canHandle(const ProjectExplorer::Task &) const override;
- void handle(const ProjectExplorer::Task &) override;
- QAction *createAction(QObject *parent) const override;
-};
-
-} // namespace Internal
-} // namespace TaskList
diff --git a/src/plugins/tasklist/taskfile.cpp b/src/plugins/tasklist/taskfile.cpp
deleted file mode 100644
index 7bd512df563..00000000000
--- a/src/plugins/tasklist/taskfile.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-****************************************************************************/
-
-#include "taskfile.h"
-
-#include "tasklistplugin.h"
-
-#include
-
-using namespace TaskList;
-using namespace TaskList::Internal;
-
-// --------------------------------------------------------------------------
-// TaskFile
-// --------------------------------------------------------------------------
-
-TaskFile::TaskFile(QObject *parent) : Core::IDocument(parent)
-{
- setId("TaskList.TaskFile");
-}
-
-Core::IDocument::ReloadBehavior TaskFile::reloadBehavior(ChangeTrigger state, ChangeType type) const
-{
- Q_UNUSED(state)
- Q_UNUSED(type)
- return BehaviorSilent;
-}
-
-bool TaskFile::reload(QString *errorString, ReloadFlag flag, ChangeType type)
-{
- Q_UNUSED(flag)
-
- if (type == TypeRemoved) {
- deleteLater();
- return true;
- }
- return load(errorString, filePath());
-}
-
-bool TaskFile::load(QString *errorString, const Utils::FilePath &fileName)
-{
- setFilePath(fileName);
- return TaskListPlugin::loadFile(errorString, fileName);
-}
diff --git a/src/plugins/tasklist/tasklist.qbs b/src/plugins/tasklist/tasklist.qbs
deleted file mode 100644
index 0a84627f273..00000000000
--- a/src/plugins/tasklist/tasklist.qbs
+++ /dev/null
@@ -1,21 +0,0 @@
-import qbs 1.0
-
-QtcPlugin {
- name: "TaskList"
-
- Depends { name: "Qt.widgets" }
- Depends { name: "Utils" }
-
- Depends { name: "Core" }
- Depends { name: "ProjectExplorer" }
-
- files: [
- "stopmonitoringhandler.cpp",
- "stopmonitoringhandler.h",
- "taskfile.cpp",
- "taskfile.h",
- "tasklistconstants.h",
- "tasklistplugin.cpp",
- "tasklistplugin.h",
- ]
-}
diff --git a/src/plugins/tasklist/tasklistconstants.h b/src/plugins/tasklist/tasklistconstants.h
deleted file mode 100644
index 77b44f77665..00000000000
--- a/src/plugins/tasklist/tasklistconstants.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-****************************************************************************/
-
-#pragma once
-
-namespace TaskList {
-namespace Constants {
-
-const char TASKLISTTASK_ID[] = "TaskList.TaskListTaskId";
-
-} // namespace Constants
-} // namespace TaskList
diff --git a/src/plugins/tasklist/tasklistplugin.h b/src/plugins/tasklist/tasklistplugin.h
deleted file mode 100644
index 8ffee58cf39..00000000000
--- a/src/plugins/tasklist/tasklistplugin.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-****************************************************************************/
-
-#pragma once
-
-#include
-#include
-
-namespace Utils { class FilePath; }
-
-namespace TaskList {
-namespace Internal {
-
-class TaskListPlugin final : public ExtensionSystem::IPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "TaskList.json")
-
-public:
- TaskListPlugin();
- ~TaskListPlugin() final;
-
- bool initialize(const QStringList &arguments, QString *errorMessage) override;
-
- static bool loadFile(QString *errorString, const Utils::FilePath &fileName);
-
- static void stopMonitoring();
- static void clearTasks();
-
- Core::IDocument *openTasks(const Utils::FilePath &fileName);
-
- void loadDataFromSession();
-
-private:
- class TaskListPluginPrivate *d = nullptr;
-};
-
-} // namespace Internal
-} // namespace TaskList