forked from qt-creator/qt-creator
Git: Fix validation in GerritPushDialog
Change-Id: I1764ccd4950d5d5fee3cbd00515716ef5f524bf0 Reviewed-by: Petar Perisin <petar.perisin@gmail.com> Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
20625d5498
commit
002fa92a34
@@ -366,11 +366,17 @@ void GerritPlugin::push()
|
||||
QPointer<GerritPushDialog> dialog = new GerritPushDialog(topLevel, Core::ICore::mainWindow());
|
||||
|
||||
if (!dialog->localChangesFound()) {
|
||||
QMessageBox::critical(Core::ICore::mainWindow(), tr("No Local Changes"),
|
||||
QMessageBox::warning(Core::ICore::mainWindow(), tr("No Local Changes"),
|
||||
tr("Change from HEAD appears to be in remote branch already. Aborting."));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!dialog->valid()) {
|
||||
QMessageBox::warning(Core::ICore::mainWindow(), tr("Initialization Failed"),
|
||||
tr("Failed to initialize dialog. Aborting."));
|
||||
return;
|
||||
}
|
||||
|
||||
if (dialog->exec() == QDialog::Rejected)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user