From 0748751c9f097d9d866605306bbdd4b96e2a5c4e Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 27 Apr 2011 19:16:41 +0200 Subject: Squashed commit of the changes from the mobile-examples repository (4.7-generated-declarative branch). --- .../network/securesocketclient/certificateinfo.cpp | 4 +- .../network/securesocketclient/certificateinfo.ui | 68 ++++--- examples/network/securesocketclient/main.cpp | 4 + .../securesocketclient/securesocketclient.pro | 3 + examples/network/securesocketclient/sslclient.cpp | 7 +- examples/network/securesocketclient/sslclient.ui | 223 +++++++++++---------- examples/network/securesocketclient/sslerrors.ui | 57 +++--- 7 files changed, 201 insertions(+), 165 deletions(-) (limited to 'examples/network/securesocketclient') diff --git a/examples/network/securesocketclient/certificateinfo.cpp b/examples/network/securesocketclient/certificateinfo.cpp index ff3a4d2f3c..b1a9acb0b2 100644 --- a/examples/network/securesocketclient/certificateinfo.cpp +++ b/examples/network/securesocketclient/certificateinfo.cpp @@ -47,7 +47,7 @@ CertificateInfo::CertificateInfo(QWidget *parent) form = new Ui_CertificateInfo; form->setupUi(this); - connect(form->certificationPathView, SIGNAL(currentRowChanged(int)), + connect(form->certificationPathView, SIGNAL(currentIndexChanged(int)), this, SLOT(updateCertificateInfo(int))); } @@ -69,7 +69,7 @@ void CertificateInfo::setCertificateChain(const QList &chain) .arg(cert.subjectInfo(QSslCertificate::CommonName))); } - form->certificationPathView->setCurrentRow(0); + form->certificationPathView->setCurrentIndex(0); } void CertificateInfo::updateCertificateInfo(int index) diff --git a/examples/network/securesocketclient/certificateinfo.ui b/examples/network/securesocketclient/certificateinfo.ui index 3761fe8f50..c5238eb3e1 100644 --- a/examples/network/securesocketclient/certificateinfo.ui +++ b/examples/network/securesocketclient/certificateinfo.ui @@ -1,7 +1,8 @@ - + + CertificateInfo - - + + 0 0 @@ -9,42 +10,57 @@ 397 - + Display Certificate Information - + + + QLayout::SetDefaultConstraint + - - + + Certification Path - - - - - - - + + + 3 + + + + + + Certificate Information - - - - - - + + + + 8 + + + + true + + + + + + + QLayout::SetDefaultConstraint + - + Qt::Horizontal - + 40 20 @@ -53,8 +69,8 @@ - - + + QDialogButtonBox::Close @@ -71,11 +87,11 @@ CertificateInfo accept() - + 343 374 - + 352 422 diff --git a/examples/network/securesocketclient/main.cpp b/examples/network/securesocketclient/main.cpp index c15534b523..ca50f31dcf 100644 --- a/examples/network/securesocketclient/main.cpp +++ b/examples/network/securesocketclient/main.cpp @@ -56,7 +56,11 @@ int main(int argc, char **argv) } SslClient client; +#ifdef Q_OS_SYMBIAN + client.showMaximized(); +#else client.show(); +#endif return app.exec(); } diff --git a/examples/network/securesocketclient/securesocketclient.pro b/examples/network/securesocketclient/securesocketclient.pro index f6276dd0bf..ae4b15ffbe 100644 --- a/examples/network/securesocketclient/securesocketclient.pro +++ b/examples/network/securesocketclient/securesocketclient.pro @@ -18,4 +18,7 @@ INSTALLS += target sources symbian { TARGET.UID3 = 0xA000CF67 CONFIG += qt_example + TARGET.CAPABILITY = NetworkServices } +maemo5: CONFIG += qt_example + diff --git a/examples/network/securesocketclient/sslclient.cpp b/examples/network/securesocketclient/sslclient.cpp index 43b81cd984..11e6ffd537 100644 --- a/examples/network/securesocketclient/sslclient.cpp +++ b/examples/network/securesocketclient/sslclient.cpp @@ -82,7 +82,6 @@ void SslClient::updateEnabledState() form->connectButton->setEnabled(unconnected && !form->hostNameEdit->text().isEmpty()); bool connected = socket && socket->state() == QAbstractSocket::ConnectedState; - form->sessionBox->setEnabled(connected); form->sessionOutput->setEnabled(connected); form->sessionInput->setEnabled(connected); form->sessionInputLabel->setEnabled(connected); @@ -193,6 +192,9 @@ void SslClient::sslErrors(const QList &errors) ui.sslErrorList->addItem(error.errorString()); executingDialog = true; +#ifdef Q_OS_SYMBIAN + errorDialog.showMaximized(); +#endif if (errorDialog.exec() == QDialog::Accepted) socket->ignoreSslErrors(); executingDialog = false; @@ -206,6 +208,9 @@ void SslClient::displayCertificateInfo() { CertificateInfo *info = new CertificateInfo(this); info->setCertificateChain(socket->peerCertificateChain()); +#ifdef Q_OS_SYMBIAN + info->showMaximized(); +#endif info->exec(); info->deleteLater(); } diff --git a/examples/network/securesocketclient/sslclient.ui b/examples/network/securesocketclient/sslclient.ui index 5a24751168..4b81fe46eb 100644 --- a/examples/network/securesocketclient/sslclient.ui +++ b/examples/network/securesocketclient/sslclient.ui @@ -1,7 +1,8 @@ - + + Form - - + + 0 0 @@ -9,147 +10,149 @@ 320 - + Secure Socket Client - - - - - - + + + + + + Host name: - - - + + + imap.example.com - - - + + + Port: - - - + + + 1 - + 65535 - + 993 - - - + + + + Active session + + + + + + true - + Connect to host - + true - - - + + + + + + Cryptographic Cipher: + + + true + + + + + + + <none> + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + + + + + + false - - Active session + + Qt::StrongFocus - - - - - - - Cryptographic Cipher: - - - - - - - <none> - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - false - - - Qt::NoFocus - - - true - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + + true + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html> - - - - - - - - - Input: - - - - - - - false - - - - - - - false - - - Qt::TabFocus - - - &Send - - - true - - - - - - +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:9pt;"></p></body></html> + + + + + + + Input: + + + + + + + false + + + + + + + false + + + Qt::TabFocus + + + &Send + + + true + + + + + @@ -160,11 +163,11 @@ p, li { white-space: pre-wrap; } connectButton animateClick() - + 126 20 - + 142 78 @@ -176,11 +179,11 @@ p, li { white-space: pre-wrap; } sendButton animateClick() - + 142 241 - + 297 234 diff --git a/examples/network/securesocketclient/sslerrors.ui b/examples/network/securesocketclient/sslerrors.ui index 4aac18cddb..1aadbfeca5 100644 --- a/examples/network/securesocketclient/sslerrors.ui +++ b/examples/network/securesocketclient/sslerrors.ui @@ -1,7 +1,8 @@ - + + SslErrors - - + + 0 0 @@ -9,44 +10,48 @@ 216 - + Unable To Validate The Connection - + - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; color:#ff0000;">Warning</span><span style=" color:#ff0000;">:</span><span style=" color:#000000;"> One or more errors with this connection prevent validating the authenticity of the host you are connecting to. Please review the following list of errors, and click </span><span style=" color:#000000;">Ignore</span><span style=" color:#000000;"> to continue, or </span><span style=" color:#000000;">Cancel</span><span style=" color:#000000;"> to abort the connection.</span></p></body></html> +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; color:#ff0000;">Warning</span><span style=" color:#ff0000;">:</span><span style=" color:#000000;"> One or more errors with this connection prevent validating the authenticity of the host you are connecting to. Please review the following list of errors, and click </span><span style=" color:#000000;">Ignore</span><span style=" color:#000000;"> to continue, or </span><span style=" color:#000000;">Cancel</span><span style=" color:#000000;"> to abort the connection.</span></p></body></html> - + true - + + + true + + - + - - + + View Certificate Chain - + false - + Qt::Horizontal - + 40 20 @@ -55,15 +60,15 @@ p, li { white-space: pre-wrap; } - - + + Ignore - - + + Cancel @@ -80,11 +85,11 @@ p, li { white-space: pre-wrap; } SslErrors accept() - + 235 185 - + 228 287 @@ -96,11 +101,11 @@ p, li { white-space: pre-wrap; } SslErrors reject() - + 325 192 - + 333 231 -- cgit v1.2.3