本文整理汇总了C++中vcsbase::VcsBasePluginState类的典型用法代码示例。如果您正苦于以下问题:C++ VcsBasePluginState类的具体用法?C++ VcsBasePluginState怎么用?C++ VcsBasePluginState使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了VcsBasePluginState类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: logCurrentFile
void BazaarPlugin::logCurrentFile()
{
const VcsBase::VcsBasePluginState state = currentState();
QTC_ASSERT(state.hasFile(), return);
m_client->log(state.currentFileTopLevel(), QStringList(state.relativeCurrentFile()),
QStringList(), true);
}
示例2: updateActions
void GerritPlugin::updateActions(const VcsBase::VcsBasePluginState &state)
{
const bool hasTopLevel = state.hasTopLevel();
m_gerritCommand->action()->setEnabled(hasTopLevel);
m_pushToGerritCommand->action()->setEnabled(hasTopLevel);
if (m_dialog && m_dialog->isVisible())
m_dialog->setCurrentPath(state.topLevel());
}
示例3: logRepository
void BazaarPlugin::logRepository()
{
const VcsBase::VcsBasePluginState state = currentState();
QTC_ASSERT(state.hasTopLevel(), return);
QStringList extraOptions;
extraOptions += QLatin1String("--limit=") + QString::number(settings().intValue(BazaarSettings::logCountKey));
m_client->log(state.topLevel(), QStringList(), extraOptions);
}
示例4: uncommit
void BazaarPlugin::uncommit()
{
const VcsBase::VcsBasePluginState state = currentState();
QTC_ASSERT(state.hasTopLevel(), return);
UnCommitDialog dialog(Core::ICore::dialogParent());
if (dialog.exec() == QDialog::Accepted)
m_client->synchronousUncommit(state.topLevel(), dialog.revision(), dialog.extraOptions());
}
示例5: revertAll
void BazaarPlugin::revertAll()
{
const VcsBase::VcsBasePluginState state = currentState();
QTC_ASSERT(state.hasTopLevel(), return);
QDialog dialog(Core::ICore::dialogParent());
Ui::RevertDialog revertUi;
revertUi.setupUi(&dialog);
if (dialog.exec() != QDialog::Accepted)
return;
m_client->revertAll(state.topLevel(), revertUi.revisionLineEdit->text());
}
示例6: update
void BazaarPlugin::update()
{
const VcsBase::VcsBasePluginState state = currentState();
QTC_ASSERT(state.hasTopLevel(), return);
QDialog dialog;
Ui::RevertDialog revertUi;
revertUi.setupUi(&dialog);
dialog.setWindowTitle(tr("Update"));
if (dialog.exec() != QDialog::Accepted)
return;
m_client->update(state.topLevel(), revertUi.revisionLineEdit->text());
}
示例7: revertCurrentFile
void BazaarPlugin::revertCurrentFile()
{
const VcsBase::VcsBasePluginState state = currentState();
QTC_ASSERT(state.hasFile(), return);
QDialog dialog;
Ui::RevertDialog revertUi;
revertUi.setupUi(&dialog);
if (dialog.exec() != QDialog::Accepted)
return;
m_client->revertFile(state.currentFileTopLevel(),
state.relativeCurrentFile(),
revertUi.revisionLineEdit->text());
}
示例8: commit
void BazaarPlugin::commit()
{
if (raiseSubmitEditor())
return;
const VcsBase::VcsBasePluginState state = currentState();
QTC_ASSERT(state.hasTopLevel(), return);
m_submitRepository = state.topLevel();
connect(m_client, SIGNAL(parsedStatus(QList<VcsBase::VcsBaseClient::StatusItem>)),
this, SLOT(showCommitWidget(QList<VcsBase::VcsBaseClient::StatusItem>)));
// The "--short" option allows to easily parse status output
m_client->emitParsedStatus(m_submitRepository, QStringList(QLatin1String("--short")));
}
示例9: pull
void BazaarPlugin::pull()
{
const VcsBase::VcsBasePluginState state = currentState();
QTC_ASSERT(state.hasTopLevel(), return);
PullOrPushDialog dialog(PullOrPushDialog::PullMode, Core::ICore::dialogParent());
if (dialog.exec() != QDialog::Accepted)
return;
QStringList extraOptions;
if (dialog.isRememberOptionEnabled())
extraOptions += QLatin1String("--remember");
if (dialog.isOverwriteOptionEnabled())
extraOptions += QLatin1String("--overwrite");
if (dialog.isLocalOptionEnabled())
extraOptions += QLatin1String("--local");
if (!dialog.revision().isEmpty())
extraOptions << QLatin1String("-r") << dialog.revision();
m_client->synchronousPull(state.topLevel(), dialog.branchLocation(), extraOptions);
}
示例10: push
void BazaarPlugin::push()
{
const VcsBase::VcsBasePluginState state = currentState();
QTC_ASSERT(state.hasTopLevel(), return);
PullOrPushDialog dialog(PullOrPushDialog::PushMode);
if (dialog.exec() != QDialog::Accepted)
return;
QStringList extraOptions;
if (dialog.isRememberOptionEnabled())
extraOptions += QLatin1String("--remember");
if (dialog.isOverwriteOptionEnabled())
extraOptions += QLatin1String("--overwrite");
if (dialog.isUseExistingDirectoryOptionEnabled())
extraOptions += QLatin1String("--use-existing-dir");
if (dialog.isCreatePrefixOptionEnabled())
extraOptions += QLatin1String("--create-prefix");
if (!dialog.revision().isEmpty())
extraOptions << QLatin1String("-r") << dialog.revision();
m_client->synchronousPush(state.topLevel(), dialog.branchLocation(), extraOptions);
}
示例11: statusMulti
void BazaarPlugin::statusMulti()
{
const VcsBase::VcsBasePluginState state = currentState();
QTC_ASSERT(state.hasTopLevel(), return);
m_client->status(state.topLevel());
}
示例12: diffRepository
void BazaarPlugin::diffRepository()
{
const VcsBase::VcsBasePluginState state = currentState();
QTC_ASSERT(state.hasTopLevel(), return);
m_client->diff(state.topLevel());
}
示例13: statusCurrentFile
void BazaarPlugin::statusCurrentFile()
{
const VcsBase::VcsBasePluginState state = currentState();
QTC_ASSERT(state.hasFile(), return);
m_client->status(state.currentFileTopLevel(), state.relativeCurrentFile());
}