Changeset View
Changeset View
Standalone View
Standalone View
analyzers/cppcheck/plugin.cpp
Show First 20 Lines • Show All 214 Lines • ▼ Show 20 Line(s) | 207 | } else { | |||
---|---|---|---|---|---|
215 | } | 215 | } | ||
216 | } | 216 | } | ||
217 | 217 | | |||
218 | m_job = nullptr; // job is automatically deleted later | 218 | m_job = nullptr; // job is automatically deleted later | ||
219 | 219 | | |||
220 | updateActions(); | 220 | updateActions(); | ||
221 | } | 221 | } | ||
222 | 222 | | |||
223 | KDevelop::ContextMenuExtension Plugin::contextMenuExtension(KDevelop::Context* context) | 223 | KDevelop::ContextMenuExtension Plugin::contextMenuExtension(KDevelop::Context* context, QWidget* parent) | ||
224 | { | 224 | { | ||
225 | KDevelop::ContextMenuExtension extension = KDevelop::IPlugin::contextMenuExtension(context); | 225 | KDevelop::ContextMenuExtension extension = KDevelop::IPlugin::contextMenuExtension(context, parent); | ||
226 | 226 | | |||
227 | if (context->hasType(KDevelop::Context::EditorContext) && m_currentProject && !isRunning()) { | 227 | if (context->hasType(KDevelop::Context::EditorContext) && m_currentProject && !isRunning()) { | ||
228 | auto eContext = static_cast<KDevelop::EditorContext*>(context); | 228 | auto eContext = static_cast<KDevelop::EditorContext*>(context); | ||
229 | QMimeDatabase db; | 229 | QMimeDatabase db; | ||
230 | const auto mime = db.mimeTypeForUrl(eContext->url()); | 230 | const auto mime = db.mimeTypeForUrl(eContext->url()); | ||
231 | 231 | | |||
232 | if (mime.name() == QLatin1String("text/x-c++src") || mime.name() == QLatin1String("text/x-c++hdr") || | 232 | if (mime.name() == QLatin1String("text/x-c++src") || mime.name() == QLatin1String("text/x-c++hdr") || | ||
233 | mime.name() == QLatin1String("text/x-chdr") || mime.name() == QLatin1String("text/x-csrc")) { | 233 | mime.name() == QLatin1String("text/x-chdr") || mime.name() == QLatin1String("text/x-csrc")) { | ||
▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines |