Changeset View
Changeset View
Standalone View
Standalone View
shell/problemmodel.cpp
Show First 20 Lines • Show All 88 Lines • ▼ Show 20 Line(s) | 78 | { | |||
---|---|---|---|---|---|
89 | connect(ICore::self()->languageController()->completionSettings(), &ICompletionSettings::settingsChanged, this, &ProblemModel::forceFullUpdate); | 89 | connect(ICore::self()->languageController()->completionSettings(), &ICompletionSettings::settingsChanged, this, &ProblemModel::forceFullUpdate); | ||
90 | 90 | | |||
91 | if (ICore::self()->documentController()->activeDocument()) { | 91 | if (ICore::self()->documentController()->activeDocument()) { | ||
92 | setCurrentDocument(ICore::self()->documentController()->activeDocument()); | 92 | setCurrentDocument(ICore::self()->documentController()->activeDocument()); | ||
93 | } | 93 | } | ||
94 | 94 | | |||
95 | connect(d->m_problems.data(), &ProblemStore::beginRebuild, this, &ProblemModel::onBeginRebuild); | 95 | connect(d->m_problems.data(), &ProblemStore::beginRebuild, this, &ProblemModel::onBeginRebuild); | ||
96 | connect(d->m_problems.data(), &ProblemStore::endRebuild, this, &ProblemModel::onEndRebuild); | 96 | connect(d->m_problems.data(), &ProblemStore::endRebuild, this, &ProblemModel::onEndRebuild); | ||
97 | | ||||
98 | connect(d->m_problems.data(), &ProblemStore::problemsChanged, this, &ProblemModel::problemsChanged); | ||||
97 | } | 99 | } | ||
98 | 100 | | |||
99 | ProblemModel::~ ProblemModel() | 101 | ProblemModel::~ ProblemModel() | ||
100 | { | 102 | { | ||
101 | } | 103 | } | ||
102 | 104 | | |||
103 | int ProblemModel::rowCount(const QModelIndex& parent) const | 105 | int ProblemModel::rowCount(const QModelIndex& parent) const | ||
104 | { | 106 | { | ||
▲ Show 20 Lines • Show All 143 Lines • ▼ Show 20 Line(s) | |||||
248 | 250 | | |||
249 | void ProblemModel::clearProblems() | 251 | void ProblemModel::clearProblems() | ||
250 | { | 252 | { | ||
251 | beginResetModel(); | 253 | beginResetModel(); | ||
252 | d->m_problems->clear(); | 254 | d->m_problems->clear(); | ||
253 | endResetModel(); | 255 | endResetModel(); | ||
254 | } | 256 | } | ||
255 | 257 | | |||
258 | QVector<IProblem::Ptr> ProblemModel::problems(const KDevelop::IndexedString& document) | ||||
259 | { | ||||
260 | return d->m_problems->problems(document); | ||||
261 | } | ||||
256 | 262 | | |||
257 | QVariant ProblemModel::headerData(int section, Qt::Orientation orientation, int role) const | 263 | QVariant ProblemModel::headerData(int section, Qt::Orientation orientation, int role) const | ||
258 | { | 264 | { | ||
259 | Q_UNUSED(orientation); | 265 | Q_UNUSED(orientation); | ||
260 | 266 | | |||
261 | if (role != Qt::DisplayRole) | 267 | if (role != Qt::DisplayRole) | ||
262 | return {}; | 268 | return {}; | ||
263 | 269 | | |||
▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines |