| 89 | }; |
| 90 | |
| 91 | ProblemReporterPlugin::ProblemReporterPlugin(QObject* parent, const KPluginMetaData& metaData, const QVariantList&) |
| 92 | : KDevelop::IPlugin(QStringLiteral("kdevproblemreporter"), parent, metaData) |
| 93 | , m_factory(new ProblemReporterFactory) |
| 94 | , m_model(new ProblemReporterModel(this)) |
| 95 | { |
| 96 | KDevelop::ProblemModelSet* pms = core()->languageController()->problemModelSet(); |
| 97 | pms->addModel(QStringLiteral("Parser"), i18n("Parser"), m_model); |
| 98 | core()->uiController()->addToolView(i18nc("@title:window", "Problems"), m_factory); |
| 99 | setXMLFile(QStringLiteral("kdevproblemreporter.rc")); |
| 100 | |
| 101 | connect(ICore::self()->documentController(), &IDocumentController::documentClosed, this, |
| 102 | &ProblemReporterPlugin::documentClosed); |
| 103 | connect(ICore::self()->documentController(), &IDocumentController::textDocumentCreated, this, |
| 104 | &ProblemReporterPlugin::textDocumentCreated); |
| 105 | connect(ICore::self()->documentController(), &IDocumentController::documentUrlChanged, this, |
| 106 | &ProblemReporterPlugin::documentUrlChanged); |
| 107 | connect(ICore::self()->documentController(), &IDocumentController::documentActivated, this, |
| 108 | &ProblemReporterPlugin::documentActivated); |
| 109 | connect(DUChain::self(), &DUChain::updateReady, |
| 110 | this, &ProblemReporterPlugin::updateReady); |
| 111 | connect(ICore::self()->languageController()->staticAssistantsManager(), &StaticAssistantsManager::problemsChanged, |
| 112 | this, &ProblemReporterPlugin::updateHighlight); |
| 113 | connect(pms, &ProblemModelSet::showRequested, this, &ProblemReporterPlugin::showModel); |
| 114 | connect(pms, &ProblemModelSet::problemsChanged, this, &ProblemReporterPlugin::updateOpenedDocumentsHighlight); |
| 115 | } |
| 116 | |
| 117 | ProblemReporterPlugin::~ProblemReporterPlugin() |
| 118 | { |
nothing calls this directly
no test coverage detected