Commit 7f5166f3 authored by Rafael Roquetto's avatar Rafael Roquetto

BlackBerry: do not load certificate automatically

To prevent the certificate password dialog from appearing when the
BlackBerryKeysWidget is shown(), only request the password and open the
certificate when the user clicks "Open certificate" button.

Task-number: QTCREATORBUG-10948
Change-Id: Ieb4f11735e726be892fbb3cf4e09afe1b9067b04
Reviewed-by: default avatarDavid Kaspar <dkaspar@blackberry.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent f93d7629
......@@ -68,6 +68,8 @@ void BlackBerryKeysWidget::certificateLoaded(int status)
switch (status) {
case BlackBerryCertificate::Success:
m_ui->certificateAuthor->setText(m_utils.defaultCertificate()->author());
m_ui->certificateAuthor->setVisible(true);
m_ui->authorLabel->setVisible(true);
m_ui->openCertificateButton->setVisible(false);
break;
case BlackBerryCertificate::WrongPassword:
......@@ -130,9 +132,18 @@ void BlackBerryKeysWidget::updateCertificateSection()
BlackBerryConfigurationManager &configManager = BlackBerryConfigurationManager::instance();
m_ui->certificatePath->setText(configManager.defaultKeystorePath());
m_ui->certificateAuthor->setText(tr("Loading..."));
loadDefaultCertificate();
const BlackBerryCertificate *certificate = m_utils.defaultCertificate();
if (certificate) {
m_ui->certificateAuthor->setText(certificate->author());
m_ui->openCertificateButton->setVisible(false);
return;
}
m_ui->openCertificateButton->setVisible(true);
m_ui->certificateAuthor->setVisible(false);
m_ui->authorLabel->setVisible(false);
} else {
setCreateCertificateVisible(true);
}
......@@ -157,14 +168,6 @@ void BlackBerryKeysWidget::updateKeysSection()
void BlackBerryKeysWidget::loadDefaultCertificate()
{
const BlackBerryCertificate *certificate = m_utils.defaultCertificate();
if (certificate) {
m_ui->certificateAuthor->setText(certificate->author());
m_ui->openCertificateButton->setVisible(false);
return;
}
connect(&m_utils, SIGNAL(defaultCertificateLoaded(int)), this, SLOT(certificateLoaded(int)));
m_utils.openDefaultCertificate();
}
......
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