forked from qt-creator/qt-creator
Bazaar: Cleanups
Clean up whitespaces and coding style issues.
This commit is contained in:
@@ -113,12 +113,15 @@ QString BazaarClient::findTopLevelForFile(const QFileInfo &file) const
|
||||
QString BazaarClient::vcsEditorKind(VCSCommand cmd) const
|
||||
{
|
||||
switch(cmd) {
|
||||
case AnnotateCommand : return QLatin1String(Constants::ANNOTATELOG);
|
||||
case DiffCommand : return QLatin1String(Constants::DIFFLOG);
|
||||
case LogCommand : return QLatin1String(Constants::FILELOG);
|
||||
default : return QLatin1String("");
|
||||
case AnnotateCommand:
|
||||
return QLatin1String(Constants::ANNOTATELOG);
|
||||
case DiffCommand:
|
||||
return QLatin1String(Constants::DIFFLOG);
|
||||
case LogCommand:
|
||||
return QLatin1String(Constants::FILELOG);
|
||||
default:
|
||||
return QString();
|
||||
}
|
||||
return QLatin1String("");
|
||||
}
|
||||
|
||||
QStringList BazaarClient::cloneArguments(const QString &srcLocation,
|
||||
|
@@ -290,28 +290,28 @@ void BazaarPlugin::createFileActions(const Core::Context &context)
|
||||
void BazaarPlugin::addCurrentFile()
|
||||
{
|
||||
const VCSBase::VCSBasePluginState state = currentState();
|
||||
QTC_ASSERT(state.hasFile(), return)
|
||||
QTC_ASSERT(state.hasFile(), return);
|
||||
m_client->synchronousAdd(state.currentFileTopLevel(), state.relativeCurrentFile());
|
||||
}
|
||||
|
||||
void BazaarPlugin::annotateCurrentFile()
|
||||
{
|
||||
const VCSBase::VCSBasePluginState state = currentState();
|
||||
QTC_ASSERT(state.hasFile(), return)
|
||||
QTC_ASSERT(state.hasFile(), return);
|
||||
m_client->annotate(state.currentFileTopLevel(), state.relativeCurrentFile());
|
||||
}
|
||||
|
||||
void BazaarPlugin::diffCurrentFile()
|
||||
{
|
||||
const VCSBase::VCSBasePluginState state = currentState();
|
||||
QTC_ASSERT(state.hasFile(), return)
|
||||
QTC_ASSERT(state.hasFile(), return);
|
||||
m_client->diff(state.currentFileTopLevel(), QStringList(state.relativeCurrentFile()));
|
||||
}
|
||||
|
||||
void BazaarPlugin::logCurrentFile()
|
||||
{
|
||||
const VCSBase::VCSBasePluginState state = currentState();
|
||||
QTC_ASSERT(state.hasFile(), return)
|
||||
QTC_ASSERT(state.hasFile(), return);
|
||||
m_client->log(state.currentFileTopLevel(), QStringList(state.relativeCurrentFile()), true);
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ void BazaarPlugin::revertCurrentFile()
|
||||
void BazaarPlugin::statusCurrentFile()
|
||||
{
|
||||
const VCSBase::VCSBasePluginState state = currentState();
|
||||
QTC_ASSERT(state.hasFile(), return)
|
||||
QTC_ASSERT(state.hasFile(), return);
|
||||
m_client->status(state.currentFileTopLevel(), state.relativeCurrentFile());
|
||||
}
|
||||
|
||||
@@ -375,14 +375,14 @@ void BazaarPlugin::createDirectoryActions(const Core::Context &context)
|
||||
void BazaarPlugin::diffRepository()
|
||||
{
|
||||
const VCSBase::VCSBasePluginState state = currentState();
|
||||
QTC_ASSERT(state.hasTopLevel(), return)
|
||||
QTC_ASSERT(state.hasTopLevel(), return);
|
||||
m_client->diff(state.topLevel());
|
||||
}
|
||||
|
||||
void BazaarPlugin::logRepository()
|
||||
{
|
||||
const VCSBase::VCSBasePluginState state = currentState();
|
||||
QTC_ASSERT(state.hasTopLevel(), return)
|
||||
QTC_ASSERT(state.hasTopLevel(), return);
|
||||
m_client->log(state.topLevel());
|
||||
}
|
||||
|
||||
|
@@ -60,11 +60,9 @@ QString CloneWizardPage::directoryFromRepository(const QString &repository) cons
|
||||
QString repo = repository.trimmed();
|
||||
if (repo.startsWith(QLatin1String("lp:")))
|
||||
return repo.mid(3);
|
||||
else {
|
||||
const QChar slash = QLatin1Char('/');
|
||||
if (repo.endsWith(slash))
|
||||
repo.truncate(repo.size() - 1);
|
||||
// Take the basename or the repository url
|
||||
return repo.mid(repo.lastIndexOf(slash) + 1);
|
||||
}
|
||||
}
|
||||
|
@@ -44,14 +44,11 @@ PullOrPushDialog::PullOrPushDialog(Mode mode, QWidget *parent) :
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
m_ui->localPathChooser->setExpectedKind(Utils::PathChooser::Directory);
|
||||
if (m_mode == PullMode)
|
||||
{
|
||||
if (m_mode == PullMode) {
|
||||
this->setWindowTitle(tr("Pull source"));
|
||||
m_ui->useExistingDirCheckBox->setVisible(false);
|
||||
m_ui->createPrefixCheckBox->setVisible(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
this->setWindowTitle(tr("Push destination"));
|
||||
m_ui->localCheckBox->setVisible(false);
|
||||
}
|
||||
@@ -67,9 +64,8 @@ QString PullOrPushDialog::branchLocation() const
|
||||
{
|
||||
if (m_ui->defaultButton->isChecked())
|
||||
return QString();
|
||||
else if (m_ui->localButton->isChecked())
|
||||
if (m_ui->localButton->isChecked())
|
||||
return m_ui->localPathChooser->path();
|
||||
else
|
||||
return m_ui->urlLineEdit->text();
|
||||
}
|
||||
|
||||
@@ -77,7 +73,6 @@ bool PullOrPushDialog::isRememberOptionEnabled() const
|
||||
{
|
||||
if (m_ui->defaultButton->isChecked())
|
||||
return false;
|
||||
else
|
||||
return m_ui->rememberCheckBox->isChecked();
|
||||
}
|
||||
|
||||
|
@@ -351,7 +351,7 @@ QString VCSBaseClient::vcsCommandString(VCSCommand cmd) const
|
||||
case LogCommand: return QLatin1String("log");
|
||||
case StatusCommand: return QLatin1String("status");
|
||||
}
|
||||
return QLatin1String("");
|
||||
return QString();
|
||||
}
|
||||
|
||||
void VCSBaseClient::statusParser(const QByteArray &data)
|
||||
|
Reference in New Issue
Block a user