Skip to content
Snippets Groups Projects
gitplugin.cpp 41 KiB
Newer Older
        repositoryAction->setEnabled(repositoryEnabled);
    // Prompts for repo.
    m_showAction->setEnabled(true);
con's avatar
con committed
}

void GitPlugin::showCommit()
{
    const VCSBase::VCSBasePluginState state = currentState();

con's avatar
con committed
    if (!m_changeSelectionDialog)
        m_changeSelectionDialog = new ChangeSelectionDialog();

    if (state.hasTopLevel())
        m_changeSelectionDialog->setRepository(state.topLevel());
con's avatar
con committed

    if (m_changeSelectionDialog->exec() != QDialog::Accepted)
        return;
    const QString change = m_changeSelectionDialog->change();
con's avatar
con committed
        return;

    m_gitClient->show(m_changeSelectionDialog->repository(), change);
con's avatar
con committed
}

GitSettings GitPlugin::settings() const
{
    return m_gitClient->settings();
}

void GitPlugin::setSettings(const GitSettings &s)
{
    m_gitClient->setSettings(s);
}

GitClient *GitPlugin::gitClient() const
{
    return m_gitClient;
}

con's avatar
con committed
Q_EXPORT_PLUGIN(GitPlugin)