dbhub: Add foce push option to push dialog

This commit is contained in:
Martin Kleusberg
2017-09-30 14:07:18 +02:00
parent b2ddcdd470
commit f926a67dba
6 changed files with 48 additions and 5 deletions

View File

@@ -43,6 +43,12 @@ void RemotePushDialog::checkInput()
else
ui->checkPublic->setText(tr("Database will be private. Only you have access to it."));
// Update the foce push check box text
if(ui->checkForce->isChecked())
ui->checkForce->setText(tr("Use with care. This can cause remote commits to be deleted."));
else
ui->checkForce->setText(" "); // The space character here is required to avoid annoying resizes when toggling the checkbox
// Check input
bool valid = true;
@@ -88,6 +94,11 @@ QString RemotePushDialog::branch() const
return ui->comboBranch->currentText();
}
bool RemotePushDialog::forcePush() const
{
return ui->checkForce->isChecked();
}
void RemotePushDialog::fillInLicences(const QMap<QString, QString>& licences)
{
// Clear licence list and add default item for unspecified licence