| 47 | }; |
| 48 | |
| 49 | VcsProjectIntegrationPlugin::VcsProjectIntegrationPlugin(QObject* parent, const KPluginMetaData& metaData, |
| 50 | const QVariantList&) |
| 51 | : KDevelop::IPlugin(QStringLiteral("kdevvcsprojectintegration"), parent, metaData) |
| 52 | , m_factory(new VCSProjectToolViewFactory(this)) |
| 53 | { |
| 54 | core()->uiController()->addToolView(i18nc("@title:window", "Project Changes"), m_factory); |
| 55 | |
| 56 | QAction* synaction = actionCollection()->addAction(QStringLiteral("locate_document")); |
| 57 | synaction->setText(i18nc("@action", "Locate Current Document")); |
| 58 | synaction->setIcon(QIcon::fromTheme(QStringLiteral("dirsync"))); |
| 59 | synaction->setToolTip(i18nc("@info:tooltip", "Locate the current document and select it")); |
| 60 | |
| 61 | QAction* reloadaction = actionCollection()->addAction(QStringLiteral("reload_view")); |
| 62 | reloadaction->setText(i18nc("@action", "Reload View")); |
| 63 | reloadaction->setIcon(QIcon::fromTheme(QStringLiteral("view-refresh"))); |
| 64 | reloadaction->setToolTip(i18nc("@info:tooltip", "Refresh the view for all projects, in case anything changed")); |
| 65 | connect(reloadaction, &QAction::triggered, this, [this] { |
| 66 | if (const auto model = core()->projectController()->changesModel()) { |
| 67 | model->reloadAll(); |
| 68 | } |
| 69 | }); |
| 70 | } |
| 71 | |
| 72 | void VcsProjectIntegrationPlugin::unload() |
| 73 | { |
nothing calls this directly
no test coverage detected