summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@nokia.com>2010-07-13 11:07:30 (GMT)
committerMartin Smith <martin.smith@nokia.com>2010-07-13 11:07:30 (GMT)
commit83fa72df1ad059c6284aaf510d381cb7caed966a (patch)
tree45c79ab2a2ceaee733c54ae227964cd6b6b2998c
parent1199be3aa31bfe1d55799c6362b3e59601f99a8f (diff)
parentc25c7c9bdfade6b906f37ac8bad44f6f0de57597 (diff)
downloadQt-83fa72df1ad059c6284aaf510d381cb7caed966a.zip
Qt-83fa72df1ad059c6284aaf510d381cb7caed966a.tar.gz
Qt-83fa72df1ad059c6284aaf510d381cb7caed966a.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp7
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp14
2 files changed, 19 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index 91e9995..cd26472 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -494,7 +494,7 @@ public:
QSmoothedAnimation *highlightSizeAnimator;
QDeclarativeViewSection *sectionCriteria;
QString currentSection;
- static const int sectionCacheSize = 3;
+ static const int sectionCacheSize = 4;
QDeclarativeItem *sectionCache[sectionCacheSize];
qreal spacing;
qreal highlightMoveSpeed;
@@ -1029,6 +1029,11 @@ void QDeclarativeListViewPrivate::updateCurrent(int modelIndex)
}
currentItem->item->setFocus(true);
currentItem->attached->setIsCurrentItem(true);
+ // Avoid showing section delegate twice. We still need the section heading so that
+ // currentItem positioning works correctly.
+ // This is slightly sub-optimal, but section heading caching minimizes the impact.
+ if (currentItem->section)
+ currentItem->section->setVisible(false);
}
updateHighlight();
emit q->currentIndexChanged();
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index 8dc1743..c297eea 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -971,8 +971,20 @@ void QSslSocketBackendPrivate::transmit()
#endif
plainSocket->disconnectFromHost();
break;
+ case SSL_ERROR_SYSCALL: // some IO error
+ case SSL_ERROR_SSL: // error in the SSL library
+ // we do not know exactly what the error is, nor whether we can recover from it,
+ // so just return to prevent an endless loop in the outer "while" statement
+ q->setErrorString(QSslSocket::tr("Error while reading: %1").arg(SSL_ERRORSTR()));
+ q->setSocketError(QAbstractSocket::UnknownSocketError);
+ emit q->error(QAbstractSocket::UnknownSocketError);
+ return;
default:
- // ### Handle errors better.
+ // SSL_ERROR_WANT_CONNECT, SSL_ERROR_WANT_ACCEPT: can only happen with a
+ // BIO_s_connect() or BIO_s_accept(), which we do not call.
+ // SSL_ERROR_WANT_X509_LOOKUP: can only happen with a
+ // SSL_CTX_set_client_cert_cb(), which we do not call.
+ // So this default case should never be triggered.
q->setErrorString(QSslSocket::tr("Error while reading: %1").arg(SSL_ERRORSTR()));
q->setSocketError(QAbstractSocket::UnknownSocketError);
emit q->error(QAbstractSocket::UnknownSocketError);