Changeset 60419 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Apr 11, 2016 10:56:08 AM (9 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic2.cpp
r60395 r60419 40 40 41 41 /********************************************************************************************************************************* 42 * Class UIAppliance CertificateViewer.*42 * Class UIApplianceUnverifiedCertificateViewer implementation. * 43 43 *********************************************************************************************************************************/ 44 44 45 UIApplianceUnverifiedCertificate ::UIApplianceUnverifiedCertificate(QWidget *pParent, const CCertificate &certificate)45 UIApplianceUnverifiedCertificateViewer::UIApplianceUnverifiedCertificateViewer(QWidget *pParent, const CCertificate &certificate) 46 46 : QIWithRetranslateUI<QIDialog>(pParent) 47 47 , m_certificate(certificate) 48 , m_pTextLabel( NULL)49 , m_pTextBrowser( NULL)48 , m_pTextLabel(0) 49 , m_pTextBrowser(0) 50 50 { 51 51 /* Prepare: */ … … 53 53 } 54 54 55 void UIApplianceUnverifiedCertificate ::prepare()55 void UIApplianceUnverifiedCertificateViewer::prepare() 56 56 { 57 57 /* Create layout: */ … … 85 85 /* Configure button-box: */ 86 86 pButtonBox->setStandardButtons(QDialogButtonBox::Yes | QDialogButtonBox::No); 87 88 87 pButtonBox->button(QDialogButtonBox::Yes)->setShortcut(Qt::Key_Enter); 88 //pButtonBox->button(QDialogButtonBox::No)->setShortcut(Qt::Key_Esc); 89 89 connect(pButtonBox, SIGNAL(accepted()), this, SLOT(accept())); 90 91 //pButtonBox->button(QDialogButtonBox::No)->setShortcut(Qt::Key_Esc);92 90 connect(pButtonBox, SIGNAL(rejected()), this, SLOT(reject())); 93 94 91 /* Add button-box into layout: */ 95 92 pLayout->addWidget(pButtonBox); … … 100 97 } 101 98 102 void UIApplianceUnverifiedCertificate ::retranslateUi()99 void UIApplianceUnverifiedCertificateViewer::retranslateUi() 103 100 { 104 101 /* Translate dialog title: */ … … 223 220 m_strSignedBy = certificate.GetFriendlyName(); 224 221 225 /* 226 * If trusted, just select the right message. 227 */ 222 /* If trusted, just select the right message: */ 228 223 if (certificate.GetTrusted()) 229 224 { … … 235 230 else 236 231 { 237 /* 238 * Not trusted! Must ask the user whether to continue in this case. 239 */ 232 /* Not trusted! Must ask the user whether to continue in this case: */ 240 233 m_enmCertText = !certificate.GetExpired() ? kCertText_SelfSignedUnverified : kCertText_SelfSignedUnverified; 234 235 /* Translate page early: */ 241 236 retranslateUi(); 242 237 243 238 /* Instantiate the dialog: */ 244 QPointer<UIApplianceUnverifiedCertificate > pDialog = new UIApplianceUnverifiedCertificate(this, certificate);239 QPointer<UIApplianceUnverifiedCertificateViewer> pDialog = new UIApplianceUnverifiedCertificateViewer(this, certificate); 245 240 AssertPtrReturnVoid(pDialog.data()); 246 241 … … 250 245 /* Leave if destroyed prematurely: */ 251 246 if (!pDialog) 252 return; /** @todo r=bird: what happened to this dialog in that case??, will check this case later. */247 return; 253 248 /* Delete viewer: */ 254 249 if (pDialog) 255 250 { 256 251 delete pDialog; 257 pDialog = NULL;252 pDialog = 0; 258 253 } 259 254 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic2.h
r60341 r60419 82 82 }; 83 83 84 /** 85 * Dialog for asking consent to continue with unverifiable certificate. 86 */ 87 class UIApplianceUnverifiedCertificate : public QIWithRetranslateUI<QIDialog> 84 /** QIDialog extension 85 * asking for consent to continue with unverifiable certificate. */ 86 class UIApplianceUnverifiedCertificateViewer : public QIWithRetranslateUI<QIDialog> 88 87 { 89 88 Q_OBJECT; 90 89 91 90 public: 91 92 92 /** Constructs appliance @a certificate viewer for passed @a pParent. */ 93 UIApplianceUnverifiedCertificate (QWidget *pParent, const CCertificate &certificate);93 UIApplianceUnverifiedCertificateViewer(QWidget *pParent, const CCertificate &certificate); 94 94 95 95 protected: 96 96 97 /** Prepares all. */ 97 98 void prepare(); … … 101 102 102 103 private: 104 103 105 /** Holds the certificate reference. */ 104 106 const CCertificate &m_certificate;
Note:
See TracChangeset
for help on using the changeset viewer.