Commit d50e15f6 authored by BogDan Vatra's avatar BogDan Vatra
Browse files

Disable signing when using debug deployment method.



The debug deployment method can't be used to create APKs that can be
published on Android markets.

Change-Id: I0539e1e7bcbf5935d74f9ee93cadc8b296a94664
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 9f4322a3
......@@ -101,6 +101,9 @@ AndroidBuildApkWidget::AndroidBuildApkWidget(AndroidBuildApkStep *step)
connect(m_ui->ministroOption, SIGNAL(clicked()), SLOT(setMinistro()));
connect(m_ui->temporaryQtOption, SIGNAL(clicked()), SLOT(setDeployLocalQtLibs()));
connect(m_ui->bundleQtOption, SIGNAL(clicked()), SLOT(setBundleQtLibs()));
connect(m_ui->ministroOption, SIGNAL(clicked()), SLOT(updateDebugDeploySigningWarning()));
connect(m_ui->temporaryQtOption, SIGNAL(clicked()), SLOT(updateDebugDeploySigningWarning()));
connect(m_ui->bundleQtOption, SIGNAL(clicked()), SLOT(updateDebugDeploySigningWarning()));
connect(m_ui->openPackageLocationCheckBox, SIGNAL(toggled(bool)),
this, SLOT(openPackageLocationCheckBoxToggled(bool)));
......@@ -123,6 +126,7 @@ AndroidBuildApkWidget::AndroidBuildApkWidget(AndroidBuildApkStep *step)
this, SLOT(updateSigningWarning()));
updateSigningWarning();
updateDebugDeploySigningWarning();
QtSupport::BaseQtVersion *qt = QtSupport::QtKitInformation::qtVersion(step->target()->kit());
m_ui->temporaryQtOption->setVisible(qt->qtVersion() >= QtSupport::QtVersionNumber(5, 4, 0));
}
......@@ -236,3 +240,17 @@ void AndroidBuildApkWidget::updateSigningWarning()
}
}
void AndroidBuildApkWidget::updateDebugDeploySigningWarning()
{
if (m_step->deployAction() == AndroidBuildApkStep::DebugDeployment) {
m_ui->signingDebugDeployError->setVisible(true);
m_ui->signingDebugDeployErrorIcon->setVisible(true);
m_ui->signPackageCheckBox->setChecked(false);
m_ui->signPackageCheckBox->setEnabled(false);
} else {
m_ui->signingDebugDeployError->setVisible(false);
m_ui->signingDebugDeployErrorIcon->setVisible(false);
m_ui->signPackageCheckBox->setEnabled(true);
}
}
......@@ -63,6 +63,7 @@ private slots:
void certificatesAliasComboBoxCurrentIndexChanged(const QString &alias);
void certificatesAliasComboBoxActivated(const QString &alias);
void updateSigningWarning();
void updateDebugDeploySigningWarning();
void openPackageLocationCheckBoxToggled(bool checked);
void verboseOutputCheckBoxToggled(bool checked);
void updateKeyStorePath(const QString &path);
......
......@@ -123,6 +123,39 @@
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLabel" name="signingDebugDeployErrorIcon">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../coreplugin/core.qrc">:/core/images/error.png</pixmap>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="signingDebugDeployError">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Signing an APK that uses &quot;Deploy local Qt libraries&quot; is not allowed</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment