forked from qt-creator/qt-creator
Git: Hide obsolete branches by default in branches dialog
Task-number: QTCREATORBUG-15544 Change-Id: I411c7eacd2c154cad08234c0bd22e16dfecb961c Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
de127b1f5c
commit
5834769cbf
@@ -30,6 +30,7 @@
|
||||
#include "gitclient.h"
|
||||
#include "gitplugin.h"
|
||||
#include "gitutils.h"
|
||||
#include "gitconstants.h"
|
||||
#include "ui_branchdialog.h"
|
||||
#include "stashdialog.h" // Label helpers
|
||||
|
||||
@@ -61,6 +62,9 @@ BranchDialog::BranchDialog(QWidget *parent) :
|
||||
setAttribute(Qt::WA_DeleteOnClose, true); // Do not update unnecessarily
|
||||
|
||||
m_ui->setupUi(this);
|
||||
m_ui->includeOldCheckBox->setToolTip(
|
||||
tr("Include branches and tags that have not been active for %1 days.")
|
||||
.arg(Constants::OBSOLETE_COMMIT_AGE_IN_DAYS));
|
||||
|
||||
connect(m_ui->refreshButton, &QAbstractButton::clicked, this, &BranchDialog::refreshCurrentRepository);
|
||||
connect(m_ui->addButton, &QAbstractButton::clicked, this, &BranchDialog::add);
|
||||
@@ -74,8 +78,13 @@ BranchDialog::BranchDialog(QWidget *parent) :
|
||||
connect(m_ui->rebaseButton, &QAbstractButton::clicked, this, &BranchDialog::rebase);
|
||||
connect(m_ui->cherryPickButton, &QAbstractButton::clicked, this, &BranchDialog::cherryPick);
|
||||
connect(m_ui->trackButton, &QAbstractButton::clicked, this, &BranchDialog::setRemoteTracking);
|
||||
connect(m_ui->includeOldCheckBox, &QCheckBox::toggled, this, [this](bool value) {
|
||||
m_model->setOldBranchesIncluded(value);
|
||||
refreshCurrentRepository();
|
||||
});
|
||||
|
||||
m_ui->branchView->setModel(m_model);
|
||||
m_ui->branchView->setFocus();
|
||||
|
||||
connect(m_ui->branchView->selectionModel(), &QItemSelectionModel::selectionChanged,
|
||||
this, &BranchDialog::enableButtons);
|
||||
|
||||
Reference in New Issue
Block a user