Commit 75bd87e0 authored by Pawel Polanski's avatar Pawel Polanski
Browse files

Some small fixes to cert management

parent d7e82677
......@@ -33,6 +33,9 @@
#include "s60certificateinfo.h"
using namespace Qt4ProjectManager;
using namespace Qt4ProjectManager::Internal;
CertificatePathChooser::CertificatePathChooser(QWidget *parent) :
Utils::PathChooser(parent)
{
......
......@@ -32,6 +32,9 @@
#include "utils/pathchooser.h"
namespace Qt4ProjectManager {
namespace Internal {
class CertificatePathChooser : public Utils::PathChooser
{
Q_DISABLE_COPY(CertificatePathChooser)
......@@ -42,4 +45,7 @@ public:
virtual bool validatePath(const QString &path, QString *errorMessage = 0);
};
} // namespace Internal
} // namespace Qt4ProjectManager
#endif // CERTIFICATEPATHCHOOSER_H
#include "s60certificatedetailsdialog.h"
#include "ui_s60certificatedetailsdialog.h"
using namespace Qt4ProjectManager;
using namespace Qt4ProjectManager::Internal;
struct S60CertificateDetailsDialogPrivate
{
S60CertificateDetailsDialogPrivate(){};
Ui::S60CertificateDetailsDialog m_ui;
};
S60CertificateDetailsDialog::S60CertificateDetailsDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::S60CertificateDetailsDialog)
m_d(new S60CertificateDetailsDialogPrivate)
{
ui->setupUi(this);
connect(ui->buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(close()));
m_d->m_ui.setupUi(this);
connect(m_d->m_ui.buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(close()));
}
S60CertificateDetailsDialog::~S60CertificateDetailsDialog()
{
delete ui;
delete m_d;
}
void S60CertificateDetailsDialog::setText(const QString &text)
{
ui->textBrowser->setText(text);
m_d->m_ui.textBrowser->setText(text);
}
......@@ -3,9 +3,10 @@
#include <QDialog>
namespace Ui {
class S60CertificateDetailsDialog;
}
struct S60CertificateDetailsDialogPrivate;
namespace Qt4ProjectManager {
namespace Internal {
class S60CertificateDetailsDialog : public QDialog
{
......@@ -18,7 +19,10 @@ public:
void setText(const QString &text);
private:
Ui::S60CertificateDetailsDialog *ui;
S60CertificateDetailsDialogPrivate *m_d;
};
} // namespace Internal
} // namespace Qt4ProjectManager
#endif // S60CERTIFICATEDETAILSDIALOG_H
......@@ -34,12 +34,11 @@
#include <QtCore/QStringList>
#include <QtCore/QtGlobal>
QT_FORWARD_DECLARE_CLASS(QString)
QT_FORWARD_DECLARE_CLASS(S60SymbianCertificate)
namespace Qt4ProjectManager {
namespace Internal {
class S60SymbianCertificate;
class S60CertificateInfo : public QObject
{
Q_OBJECT
......
......@@ -786,7 +786,9 @@ S60CreatePackageStepConfigWidget::S60CreatePackageStepConfigWidget(S60CreatePack
m_ui.keyFilePath->setExpectedKind(Utils::PathChooser::File);
updateUi();
m_ui.certificateDetails->setEnabled(m_ui.signaturePath->isValid());
bool enableCertDetails = m_signStep->signingMode() == S60CreatePackageStep::SignCustom
&& m_ui.signaturePath->isValid();
m_ui.certificateDetails->setEnabled(enableCertDetails);
connect(m_ui.certificateDetails, SIGNAL(clicked()),
this, SLOT(displayCertificateDetails()));
......@@ -841,16 +843,19 @@ void S60CreatePackageStepConfigWidget::updateUi()
m_ui.selfSignedButton->setChecked(false);
m_ui.customCertificateButton->setChecked(true);
m_ui.notSignedButton->setChecked(false);
m_ui.certificateDetails->setEnabled(m_ui.signaturePath->isValid());
break;
case S60CreatePackageStep::NotSigned:
m_ui.selfSignedButton->setChecked(false);
m_ui.customCertificateButton->setChecked(false);
m_ui.notSignedButton->setChecked(true);
m_ui.certificateDetails->setEnabled(false);
break;
default:
m_ui.selfSignedButton->setChecked(true);
m_ui.customCertificateButton->setChecked(false);
m_ui.notSignedButton->setChecked(false);
m_ui.certificateDetails->setEnabled(false);
break;
}
bool customSigned = m_signStep->signingMode() == S60CreatePackageStep::SignCustom;
......
......@@ -46,6 +46,8 @@
#include <memory>
using namespace Botan;
using namespace Qt4ProjectManager;
using namespace Qt4ProjectManager::Internal;
namespace {
const char * const CERT_IMEI_FIELD_NAME = "1.2.826.0.1.1796587.1.1.1.1";
......
......@@ -35,6 +35,9 @@
class S60SymbianCertificatePrivate;
namespace Qt4ProjectManager {
namespace Internal {
class S60SymbianCertificate
{
public:
......@@ -63,4 +66,7 @@ protected:
QString m_errorString;
};
} // namespace Internal
} // namespace Qt4ProjectManager
#endif // S60SYMBIANCERTIFICATE_H
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