From e90633a8faec13b65c31b445e699e1f194b9a2ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20Str=C3=B8mme?= <christian.stromme@digia.com>
Date: Thu, 29 Aug 2013 19:01:51 +0200
Subject: [PATCH] Android: Don't create a certificate if the alias field is
 empty.

We need to make sure that the user fills in the alias field before we
generate the certificate. If the certificate does not have an alias,
the package creation step will only create debug packages.

Task-number: QTCREATORBUG-10050
Change-Id: I247c7218a55ec86bdb1408c90f7f403b2ebbe2a4
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
---
 src/plugins/android/androidcreatekeystorecertificate.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/plugins/android/androidcreatekeystorecertificate.cpp b/src/plugins/android/androidcreatekeystorecertificate.cpp
index bcce983e236..6f006a2d816 100644
--- a/src/plugins/android/androidcreatekeystorecertificate.cpp
+++ b/src/plugins/android/androidcreatekeystorecertificate.cpp
@@ -137,8 +137,10 @@ void AndroidCreateKeystoreCertificate::on_buttonBox_accepted()
         break;
     }
 
-    if (!ui->aliasNameLineEdit->text().length())
+    if (!ui->aliasNameLineEdit->text().length()) {
         ui->aliasNameLineEdit->setFocus();
+        return;
+    }
 
     if (!ui->commonNameLineEdit->text().length())
         ui->commonNameLineEdit->setFocus();
-- 
GitLab