From fdf463ba74b2e00ba5f9db10f43585e8b15054f7 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 12 Jan 2010 17:39:25 +0100 Subject: Remove erroneous warning in QFileInfo::absolutePath() --- src/corelib/io/qfileinfo.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp index b4437db..e90529e 100644 --- a/src/corelib/io/qfileinfo.cpp +++ b/src/corelib/io/qfileinfo.cpp @@ -573,10 +573,13 @@ QString QFileInfo::canonicalFilePath() const QString QFileInfo::absolutePath() const { Q_D(const QFileInfo); - if (d->data->fileName.isEmpty()) + + if (!d->data->fileEngine) { + return QLatin1String(""); + } else if (d->data->fileName.isEmpty()) { qWarning("QFileInfo::absolutePath: Constructed with empty filename"); - if(!d->data->fileEngine) return QLatin1String(""); + } return d->getFileName(QAbstractFileEngine::AbsolutePathName); } -- cgit v0.12 From d5a3866d20507967e14ed34930f08ce6248000e5 Mon Sep 17 00:00:00 2001 From: Carlos Manuel Duclos Vergara Date: Wed, 3 Feb 2010 10:14:26 +0100 Subject: Adding my changes. --- dist/changes-4.6.2 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index 4f46a1f..0548e98 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -128,7 +128,10 @@ Qt for Windows Qt for Mac OS X --------------- - - + - [QTBUG-7312]: Menubar and dock disappear after hiding a fullscreen widget on Cocoa. + - [QTBUG-7522]: Drawing fake buttons using QMacStyle+QStyleOptionViewItemV4 lead to crash. + - [QTBUG-7625]: Calling showFullScreen() then showNormal() on a widget results in top menu hiding. + Qt for Embedded Linux --------------------- -- cgit v0.12 From 4f97685cef49fea0ea0614b6972241c497b4b1a2 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Fri, 29 Jan 2010 11:12:48 +0100 Subject: QNAM HTTP: Fix bug related to re-sending a request Thanks Nils Jeisecke for report and proposed fix. Task-number: QTBUG-7713 Reviewed-by: thiago --- src/network/access/qhttpnetworkconnection.cpp | 8 ++++++- .../access/qhttpnetworkconnectionchannel.cpp | 27 ++++++++++++++-------- .../access/qhttpnetworkconnectionchannel_p.h | 2 ++ 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index fff7097..cc6a1c8 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -688,8 +688,14 @@ void QHttpNetworkConnectionPrivate::_q_startNextRequest() if (channels[i].resendCurrent) { channels[i].resendCurrent = false; channels[i].state = QHttpNetworkConnectionChannel::IdleState; - if (channels[i].reply) + if (channels[i].reply) { + + // if this is not possible, error will be emitted and connection terminated + if (!channels[i].resetUploadData()) + continue; + channels[i].sendRequest(); + } } } diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index b80ae9a..70a301d 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -674,15 +674,8 @@ void QHttpNetworkConnectionChannel::handleStatus() case 407: // proxy auth required if (connection->d_func()->handleAuthenticateChallenge(socket, reply, (statusCode == 407), resend)) { if (resend) { - QNonContiguousByteDevice* uploadByteDevice = request.uploadByteDevice(); - if (uploadByteDevice) { - if (uploadByteDevice->reset()) { - written = 0; - } else { - connection->d_func()->emitReplyError(socket, reply, QNetworkReply::ContentReSendError); - break; - } - } + if (!resetUploadData()) + break; reply->d_func()->eraseData(); @@ -712,6 +705,22 @@ void QHttpNetworkConnectionChannel::handleStatus() } } +bool QHttpNetworkConnectionChannel::resetUploadData() +{ + QNonContiguousByteDevice* uploadByteDevice = request.uploadByteDevice(); + if (!uploadByteDevice) + return true; + + if (uploadByteDevice->reset()) { + written = 0; + return true; + } else { + connection->d_func()->emitReplyError(socket, reply, QNetworkReply::ContentReSendError); + return false; + } +} + + void QHttpNetworkConnectionChannel::pipelineInto(HttpMessagePair &pair) { // this is only called for simple GET diff --git a/src/network/access/qhttpnetworkconnectionchannel_p.h b/src/network/access/qhttpnetworkconnectionchannel_p.h index c30c236..75ab50d 100644 --- a/src/network/access/qhttpnetworkconnectionchannel_p.h +++ b/src/network/access/qhttpnetworkconnectionchannel_p.h @@ -151,6 +151,8 @@ public: void allDone(); // reply header + body have been read void handleStatus(); // called from allDone() + bool resetUploadData(); // return true if resetting worked or there is no upload data + void pipelineInto(HttpMessagePair &pair); void requeueCurrentlyPipelinedRequests(); void detectPipeliningSupport(); -- cgit v0.12 From a9ffa944f8599db0559e9d07509a3778f49bbc2a Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Wed, 3 Feb 2010 11:36:14 +0100 Subject: Updated my changelog entry Reviewed-by: trustme --- dist/changes-4.6.2 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2 index 0548e98..d768988 100644 --- a/dist/changes-4.6.2 +++ b/dist/changes-4.6.2 @@ -40,8 +40,8 @@ Optimizations QtCore ------ - - foo - * bar + - QXmlStreamWriter + * [QTBUG-6893] Fixed adding extra Byte Order Marks when writing to a xml file. QtGui ----- @@ -49,6 +49,9 @@ QtGui - foo * bar + * [QTBUG-7029] Fixed a crash when re-creating QApplication object due to a + dangling gesture manager pointer. + QtDBus ------ @@ -118,7 +121,9 @@ Qt for Linux/X11 ---------------- * Fix a bug where QPixmap::serialNumber was not set on a transformed pixmap in Qt/X11. - - + + * Fixed a crash when an input method tries to create a widget after the + application is destroyed. Qt for Windows -------------- -- cgit v0.12 From 48d040b3536dbce06f54c90da489a5308bee3870 Mon Sep 17 00:00:00 2001 From: Bastian Bense Date: Wed, 3 Feb 2010 11:57:38 +0100 Subject: Cleared up QEvent documentation for QGraphicsSceneDragDropEvent events. Added the "(QGraphicsSceneDragDropEvent)" behind the documentation of the QGraphicsSceneDrag*-type events. Without this hint it gives the impression that you can't access the data being dragged within eventFilter()s. Task-number: QTBUG-7547 Reviewed-by: Benjamin Poulain --- src/corelib/kernel/qcoreevent.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/corelib/kernel/qcoreevent.cpp b/src/corelib/kernel/qcoreevent.cpp index 3f69b4f..3500b63 100644 --- a/src/corelib/kernel/qcoreevent.cpp +++ b/src/corelib/kernel/qcoreevent.cpp @@ -133,10 +133,10 @@ QT_BEGIN_NAMESPACE \value GrabKeyboard Item gains keyboard grab (QGraphicsItem only). \value GrabMouse Item gains mouse grab (QGraphicsItem only). \value GraphicsSceneContextMenu Context popup menu over a graphics scene (QGraphicsSceneContextMenuEvent). - \value GraphicsSceneDragEnter The cursor enters a graphics scene during a drag and drop operation. - \value GraphicsSceneDragLeave The cursor leaves a graphics scene during a drag and drop operation. - \value GraphicsSceneDragMove A drag and drop operation is in progress over a scene. - \value GraphicsSceneDrop A drag and drop operation is completed over a scene. + \value GraphicsSceneDragEnter The cursor enters a graphics scene during a drag and drop operation (QGraphicsSceneDragDropEvent). + \value GraphicsSceneDragLeave The cursor leaves a graphics scene during a drag and drop operation (QGraphicsSceneDragDropEvent). + \value GraphicsSceneDragMove A drag and drop operation is in progress over a scene (QGraphicsSceneDragDropEvent). + \value GraphicsSceneDrop A drag and drop operation is completed over a scene (QGraphicsSceneDragDropEvent). \value GraphicsSceneHelp The user requests help for a graphics scene (QHelpEvent). \value GraphicsSceneHoverEnter The mouse cursor enters a hover item in a graphics scene (QGraphicsSceneHoverEvent). \value GraphicsSceneHoverLeave The mouse cursor leaves a hover item in a graphics scene (QGraphicsSceneHoverEvent). -- cgit v0.12 From 7cfece145418864b415a91d5b872e65660eb3090 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Wed, 3 Feb 2010 10:34:46 +0100 Subject: QTcpServer: Clarify thread affinity of incoming QTcpSocket We had some bugreports and support requests related to misunderstandings about this. Reviewed-by: Peter Hartmann Reviewed-by: David Boddie --- src/network/socket/qtcpserver.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/network/socket/qtcpserver.cpp b/src/network/socket/qtcpserver.cpp index 47a998c..404eee7 100644 --- a/src/network/socket/qtcpserver.cpp +++ b/src/network/socket/qtcpserver.cpp @@ -513,6 +513,10 @@ bool QTcpServer::hasPendingConnections() const 0 is returned if this function is called when there are no pending connections. + \note The returned QTcpSocket object cannot be used from another + thread. If you want to use an incoming connection from another thread, + you need to override incomingConnection(). + \sa hasPendingConnections() */ QTcpSocket *QTcpServer::nextPendingConnection() @@ -543,6 +547,11 @@ QTcpSocket *QTcpServer::nextPendingConnection() may not be usable with native socket functions, and should only be used with QTcpSocket::setSocketDescriptor(). + \note If you want to handle an incoming connection as a new QTcpSocket + object in another thread you have to pass the socketDescriptor + to the other thread and create the QTcpSocket object there and + use its setSocketDescriptor() method. + \sa newConnection(), nextPendingConnection() */ void QTcpServer::incomingConnection(int socketDescriptor) -- cgit v0.12 From 05a1573eddc6dc404631c9d16474c81aa4cea569 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 3 Feb 2010 14:56:15 +0100 Subject: Fixed QFileInfo::absolutePath() warning when running "qmake -project" Task-number: QTBUG-7176 Reviewed-by: Benjamin Poulain --- qmake/project.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmake/project.cpp b/qmake/project.cpp index c2e033e..4ce8ba4 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -3067,7 +3067,7 @@ QStringList &QMakeProject::values(const QString &_var, QMap