2
* Copyright 2007 Hamish Rodda <rodda@kde.org>
3
* Copyright 2015 Laszlo Kis-Adam <laszlo.kis-adam@kdemail.net>
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU Library General Public License as
7
* published by the Free Software Foundation; either version 2 of the
8
* License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public
16
* License along with this program; if not, write to the
17
* Free Software Foundation, Inc.,
18
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21
#ifndef PROBLEMREPORTERMODEL_H
22
#define PROBLEMREPORTERMODEL_H
24
#include <shell/problemmodel.h>
32
class WatchedDocumentSet;
36
* @brief ProblemModel subclass that retrieves the problems from DUChain.
38
* Provides a ProblemModel interface so these problems can be shown in the Problems toolview.
40
class ProblemReporterModel : public KDevelop::ProblemModel
44
explicit ProblemReporterModel(QObject* parent);
45
~ProblemReporterModel() override;
48
* Get merged list of problems for all @ref urls.
50
QVector<KDevelop::IProblem::Ptr> problems(const QSet<KDevelop::IndexedString>& urls) const;
54
* List of problems for @ref url has been updated
56
void problemsUpdated(const KDevelop::IndexedString& url);
58
void forceFullUpdate() override;
61
/// Triggered when the problemstore's problems have changed
62
void onProblemsChanged() override;
66
void setCurrentDocument(KDevelop::IDocument* doc) override;
69
void rebuildProblemList();
73
const static int MinTimeout;
74
const static int MaxTimeout;