forked from qt-creator/qt-creator
ProjectExplorer: Introduce a alias for QList<Tasks>
Change-Id: I91391ad22b420926b0f512cac23cfe009048b218 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -60,9 +60,9 @@ QmlTaskManager::QmlTaskManager()
|
||||
connect(&m_updateDelay, &QTimer::timeout, this, [this] { updateMessagesNow(); });
|
||||
}
|
||||
|
||||
static QList<Task> convertToTasks(const QList<DiagnosticMessage> &messages, const FileName &fileName, Core::Id category)
|
||||
static Tasks convertToTasks(const QList<DiagnosticMessage> &messages, const FileName &fileName, Core::Id category)
|
||||
{
|
||||
QList<Task> result;
|
||||
Tasks result;
|
||||
foreach (const DiagnosticMessage &msg, messages) {
|
||||
Task::TaskType type = msg.isError() ? Task::Error : Task::Warning;
|
||||
Task task(type, msg.message, fileName, msg.loc.startLine, category);
|
||||
@@ -71,7 +71,7 @@ static QList<Task> convertToTasks(const QList<DiagnosticMessage> &messages, cons
|
||||
return result;
|
||||
}
|
||||
|
||||
static QList<Task> convertToTasks(const QList<StaticAnalysis::Message> &messages, const FileName &fileName, Core::Id category)
|
||||
static Tasks convertToTasks(const QList<StaticAnalysis::Message> &messages, const FileName &fileName, Core::Id category)
|
||||
{
|
||||
QList<DiagnosticMessage> diagnostics;
|
||||
foreach (const StaticAnalysis::Message &msg, messages)
|
||||
@@ -179,7 +179,7 @@ void QmlTaskManager::displayAllResults()
|
||||
|
||||
void QmlTaskManager::insertTask(const Task &task)
|
||||
{
|
||||
QList<Task> tasks = m_docsWithTasks.value(task.file.toString());
|
||||
Tasks tasks = m_docsWithTasks.value(task.file.toString());
|
||||
tasks.append(task);
|
||||
m_docsWithTasks.insert(task.file.toString(), tasks);
|
||||
TaskHub::addTask(task);
|
||||
@@ -188,7 +188,7 @@ void QmlTaskManager::insertTask(const Task &task)
|
||||
void QmlTaskManager::removeTasksForFile(const QString &fileName)
|
||||
{
|
||||
if (m_docsWithTasks.contains(fileName)) {
|
||||
const QList<Task> tasks = m_docsWithTasks.value(fileName);
|
||||
const Tasks tasks = m_docsWithTasks.value(fileName);
|
||||
foreach (const Task &task, tasks)
|
||||
TaskHub::removeTask(task);
|
||||
m_docsWithTasks.remove(fileName);
|
||||
|
||||
@@ -65,7 +65,7 @@ private:
|
||||
{
|
||||
public:
|
||||
QString fileName;
|
||||
QList<ProjectExplorer::Task> tasks;
|
||||
ProjectExplorer::Tasks tasks;
|
||||
};
|
||||
static void collectMessages(QFutureInterface<FileErrorMessages> &future,
|
||||
QmlJS::Snapshot snapshot,
|
||||
@@ -74,7 +74,7 @@ private:
|
||||
bool updateSemantic);
|
||||
|
||||
private:
|
||||
QHash<QString, QList<ProjectExplorer::Task> > m_docsWithTasks;
|
||||
QHash<QString, ProjectExplorer::Tasks > m_docsWithTasks;
|
||||
QFutureWatcher<FileErrorMessages> m_messageCollector;
|
||||
QTimer m_updateDelay;
|
||||
bool m_updatingSemantic = false;
|
||||
|
||||
Reference in New Issue
Block a user