Git: Move msgRepositoryLabel from StashDialog to GitPlugin

It's being used by many dialogs.

Change-Id: I3ef484cf8b9cc56210be1de5b4f201eb2f96ef67
Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
Orgad Shaneh
2017-02-04 22:02:04 +02:00
committed by Orgad Shaneh
parent 5b50854e57
commit 67933e4c1f
6 changed files with 11 additions and 14 deletions

View File

@@ -151,20 +151,13 @@ StashDialog::~StashDialog()
delete ui;
}
QString StashDialog::msgRepositoryLabel(const QString &repository)
{
return repository.isEmpty() ?
tr("<No repository>") :
tr("Repository: %1").arg(QDir::toNativeSeparators(repository));
}
void StashDialog::refresh(const QString &repository, bool force)
{
if (m_repository == repository && !force)
return;
// Refresh
m_repository = repository;
ui->repositoryLabel->setText(msgRepositoryLabel(repository));
ui->repositoryLabel->setText(GitPlugin::msgRepositoryLabel(repository));
if (m_repository.isEmpty()) {
m_model->setStashes(QList<Stash>());
} else {