diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qwidget_mac.mm | 8 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_win.cpp | 2 | ||||
-rw-r--r-- | src/network/ssl/qsslsocket_openssl.cpp | 16 |
3 files changed, 20 insertions, 6 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index a9bb691..e57ec77 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -2861,9 +2861,11 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f) } if (wasWindow) { oldToolbar = [oldWindow toolbar]; - [oldToolbar retain]; - oldToolbarVisible = [oldToolbar isVisible]; - [oldWindow setToolbar:nil]; + if (oldToolbar) { + [oldToolbar retain]; + oldToolbarVisible = [oldToolbar isVisible]; + [oldWindow setToolbar:nil]; + } } #endif } diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp index 9c65aa0..0f05c6b 100644 --- a/src/gui/kernel/qwidget_win.cpp +++ b/src/gui/kernel/qwidget_win.cpp @@ -1167,7 +1167,7 @@ void QWidgetPrivate::show_sys() // This is to resolve the problem where popups are opened from the // system tray and not being implicitly activated if (q->windowType() == Qt::Popup && - (!q->parentWidget() || !q->parentWidget()->isActiveWindow())) + !q->parentWidget() && !qApp->activeWindow()) q->activateWindow(); } diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index fa26fe8..30428ff 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -299,8 +299,20 @@ init_context: } // Add all our CAs to this store. - foreach (const QSslCertificate &caCertificate, q->caCertificates()) + QList<QSslCertificate> expiredCerts; + foreach (const QSslCertificate &caCertificate, q->caCertificates()) { + // add expired certs later, so that the + // valid ones are used before the expired ones + if (! caCertificate.isValid()) { + expiredCerts.append(caCertificate); + } else { + q_X509_STORE_add_cert(ctx->cert_store, (X509 *)caCertificate.handle()); + } + } + // now add the expired certs + foreach (const QSslCertificate &caCertificate, expiredCerts) { q_X509_STORE_add_cert(ctx->cert_store, (X509 *)caCertificate.handle()); + } // Register a custom callback to get all verification errors. X509_STORE_set_verify_cb_func(ctx->cert_store, q_X509Callback); @@ -597,7 +609,7 @@ QList<QSslCertificate> QSslSocketPrivate::systemCaCertificates() if(!pc) break; QByteArray der((const char *)(pc->pbCertEncoded), static_cast<int>(pc->cbCertEncoded)); - QSslCertificate cert(der,QSsl::Der); + QSslCertificate cert(der, QSsl::Der); systemCerts.append(cert); } ptrCertCloseStore(hSystemStore, 0); |