From 984c931c4a7385281d0acbc22adb22e49ded768e Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Thu, 21 Jan 2010 09:40:24 +0100 Subject: Merge TRK client changes from upstream (QtCreator) commit 1b77161e7183cdd4b5493698b4cddc727468f0f5 Author: hjk Date: Fri Jan 15 12:01:26 2010 +0100 debugger: clean up verbosity settings in trk adapter commit 4d7341becac684f5feb908e45d8b1756b4823c20 Author: hjk Date: Wed Jan 13 14:48:29 2010 +0100 debugger: whitespace commit d3cdfe813444b6afca483c7d13ac80c4c8eda62b Author: hjk Date: Wed Jan 13 14:46:13 2010 +0100 debugger: add some debug output to trk device commit 7cd27f2eecd5f77bc35f6b705c6f0422b09e534d Author: hjk Date: Mon Jan 4 13:17:38 2010 +0100 debugger: add list of thread ids to TRK session state object Reviewed-by: Shane Kearns --- tools/runonphone/trk/trkdevice.cpp | 34 ++++++++++++++++++++++++++++++---- tools/runonphone/trk/trkutils.h | 7 ++++++- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/tools/runonphone/trk/trkdevice.cpp b/tools/runonphone/trk/trkdevice.cpp index 53f4490..fe3261b 100644 --- a/tools/runonphone/trk/trkdevice.cpp +++ b/tools/runonphone/trk/trkdevice.cpp @@ -99,6 +99,8 @@ QString winErrorMessage(unsigned long error) #endif +enum { verboseTrk = 0 }; + namespace trk { /////////////////////////////////////////////////////////////////////// @@ -128,6 +130,12 @@ TrkMessage::TrkMessage(byte c, byte t, TrkCallback cb) : { } +QDebug operator<<(QDebug d, const TrkMessage &msg) +{ + return d << "Message: Code: " << msg.code + << " Token: " << msg.token << " " << msg.data.toHex(); +} + } // namespace trk Q_DECLARE_METATYPE(trk::TrkMessage) @@ -204,6 +212,8 @@ byte TrkWriteQueue::nextTrkWriteToken() ++m_trkWriteToken; if (m_trkWriteToken == 0) ++m_trkWriteToken; + if (verboseTrk) + qDebug() << "Write token: " << m_trkWriteToken; return m_trkWriteToken; } @@ -334,7 +344,8 @@ DeviceContext::DeviceContext() : /////////////////////////////////////////////////////////////////////// -class WriterThread : public QThread { +class WriterThread : public QThread +{ Q_OBJECT Q_DISABLE_COPY(WriterThread) public: @@ -400,15 +411,18 @@ int WriterThread::writePendingMessage() m_waitMutex.unlock(); if (m_terminate) return 1; + // Send off message m_dataMutex.lock(); TrkMessage message; const TrkWriteQueue::PendingMessageResult pr = m_queue.pendingMessage(&message); m_dataMutex.unlock(); + switch (pr) { case TrkWriteQueue::NoMessage: break; case TrkWriteQueue::PendingMessage: { + //qDebug() << "Write pending message " << message; // Untested: try to re-send a few times bool success = false; for (int r = 0; !success && (r < MaxAttempts); r++) { @@ -428,6 +442,8 @@ int WriterThread::writePendingMessage() break; case TrkWriteQueue::NoopMessageDequeued: // Sync with thread that owns us via a blocking signal + if (verboseTrk) + qDebug() << "Noop message dequeued" << message; emit internalNoopMessageDequeued(message); break; } // switch @@ -499,6 +515,8 @@ static inline bool overlappedSyncWrite(HANDLE file, bool WriterThread::write(const QByteArray &data, QString *errorMessage) { + if (verboseTrk) + qDebug() << "Write raw data: " << data.toHex(); QMutexLocker locker(&m_context->mutex); #ifdef Q_OS_WIN DWORD charsWritten; @@ -557,6 +575,7 @@ void WriterThread::slotHandleResult(const TrkResult &result) tryWrite(); // Have messages been enqueued in-between? } + /////////////////////////////////////////////////////////////////////// // // ReaderThreadBase: Base class for a thread that reads data from @@ -566,7 +585,8 @@ void WriterThread::slotHandleResult(const TrkResult &result) // /////////////////////////////////////////////////////////////////////// -class ReaderThreadBase : public QThread { +class ReaderThreadBase : public QThread +{ Q_OBJECT Q_DISABLE_COPY(ReaderThreadBase) public: @@ -625,7 +645,8 @@ void ReaderThreadBase::readMessages() // /////////////////////////////////////////////////////////////////////// -class WinReaderThread : public ReaderThreadBase { +class WinReaderThread : public ReaderThreadBase +{ Q_OBJECT Q_DISABLE_COPY(WinReaderThread) public: @@ -835,7 +856,8 @@ void UnixReaderThread::terminate() { // Trigger select() by writing to the pipe char c = 0; - write(m_terminatePipeFileDescriptors[1], &c, 1); + int written = write(m_terminatePipeFileDescriptors[1], &c, 1); + // FIXME: Use result. wait(); } @@ -1021,6 +1043,8 @@ void TrkDevice::setVerbose(int b) void TrkDevice::slotMessageReceived(const trk::TrkResult &result, const QByteArray &rawData) { d->writerThread->slotHandleResult(result); + if (d->verbose > 1) + qDebug() << "Received: " << result.toString(); emit messageReceived(result); if (!rawData.isEmpty()) emit rawDataReceived(rawData); @@ -1057,6 +1081,8 @@ bool TrkDevice::sendTrkAck(byte token) TrkMessage msg(0x80, token); msg.token = token; msg.data.append('\0'); + if (verboseTrk) + qDebug() << "Write synchroneous message: " << msg; return d->writerThread->trkWriteRawMessage(msg); // 01 90 00 07 7e 80 01 00 7d 5e 7e } diff --git a/tools/runonphone/trk/trkutils.h b/tools/runonphone/trk/trkutils.h index c636ac0..328dd2b 100644 --- a/tools/runonphone/trk/trkutils.h +++ b/tools/runonphone/trk/trkutils.h @@ -119,7 +119,8 @@ struct Library uint dataseg; }; -struct TrkAppVersion { +struct TrkAppVersion +{ TrkAppVersion(); void reset(); @@ -153,6 +154,10 @@ struct Session typedef QList Libraries; Libraries libraries; + typedef uint Thread; + typedef QList Threads; + Threads threads; + // Gdb request uint currentThread; QStringList modules; -- cgit v0.12 From d83e82e5c8a7fa0f6b1dcc4b1ab56f22afd942f6 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Thu, 21 Jan 2010 11:10:36 +0100 Subject: Fix pro file error affecting windows builds Reviewed-by: axis --- tools/runonphone/runonphone.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/runonphone/runonphone.pro b/tools/runonphone/runonphone.pro index cb27d1b..2c1be98 100644 --- a/tools/runonphone/runonphone.pro +++ b/tools/runonphone/runonphone.pro @@ -18,7 +18,7 @@ windows { -luuid \ -ladvapi32 } -unix:!symbian { +else:unix:!symbian { SOURCES += serenum_unix.cpp } else { -- cgit v0.12 From a6165c5ec3b16d3f778a2da38d90a8afe8d58cd8 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Thu, 21 Jan 2010 11:26:14 +0100 Subject: Fix missing focus rect for check and radio buttons in some GTK+ themes Some themes such as Nodoka does not draw a focus rect but instead reads the focus flag on the widget itself. Hence we have to set this flag before drawing. Task-number: QTBUG-7504 Reviewed-by: thorbjorn --- src/gui/styles/qgtkstyle.cpp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index 211f4ce..b5f052b 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -1106,8 +1106,14 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, // ### Note: Ubuntulooks breaks when the proper widget is passed // Murrine engine requires a widget not to get RGBA check - warnings GtkWidget *gtkCheckButton = d->gtkWidget(QLS("GtkCheckButton")); - gtkPainter.paintOption(gtkCheckButton , buttonRect, state, shadow, gtkRadioButton->style, QLS("radiobutton")); - + QString key(QLS("radiobutton")); + if (option->state & State_HasFocus) { // Themes such as Nodoka check this flag + key += QLatin1Char('f'); + GTK_WIDGET_SET_FLAGS(gtkCheckButton, GTK_HAS_FOCUS); + } + gtkPainter.paintOption(gtkCheckButton , buttonRect, state, shadow, gtkRadioButton->style, key); + if (option->state & State_HasFocus) + GTK_WIDGET_UNSET_FLAGS(gtkCheckButton, GTK_HAS_FOCUS); } break; @@ -1128,6 +1134,11 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, int spacing; GtkWidget *gtkCheckButton = d->gtkWidget(QLS("GtkCheckButton")); + QString key(QLS("checkbutton")); + if (option->state & State_HasFocus) { // Themes such as Nodoka checks this flag + key += QLatin1Char('f'); + GTK_WIDGET_SET_FLAGS(gtkCheckButton, GTK_HAS_FOCUS); + } // Some styles such as aero-clone assume they can paint in the spacing area gtkPainter.setClipRect(option->rect); @@ -1137,7 +1148,10 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, QRect checkRect = option->rect.adjusted(spacing, spacing, -spacing, -spacing); gtkPainter.paintCheckbox(gtkCheckButton, checkRect, state, shadow, gtkCheckButton->style, - QLS("checkbutton")); + key); + if (option->state & State_HasFocus) + GTK_WIDGET_UNSET_FLAGS(gtkCheckButton, GTK_HAS_FOCUS); + } break; -- cgit v0.12 From 967b6980372b3a3b988d2284bdd10b8154482680 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Thu, 21 Jan 2010 12:30:31 +0100 Subject: Add qttracereplay.exe to gitignore Reviewed-by: TrustMe --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 2069ad5..c8153fc 100644 --- a/.gitignore +++ b/.gitignore @@ -57,6 +57,7 @@ bin/qmake* bin/qdoc3* bin/qt3to4* bin/qtdemo* +bin/qttracereplay* bin/rcc* bin/uic* bin/patternist* -- cgit v0.12 From 694be5a31be7e24761753ab9eccd87e8d08607e0 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Thu, 21 Jan 2010 11:28:00 +0100 Subject: qUncompress: Fix terminating \0 Task-number: 6666 Reviewed-by: Harald Fernengel --- src/corelib/tools/qbytearray.cpp | 1 + tests/auto/qbytearray/tst_qbytearray.cpp | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index 4049925..556093f 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -561,6 +561,7 @@ QByteArray qUncompress(const uchar* data, int nbytes) d->ref = 1; d->alloc = d->size = len; d->data = d->array; + d->array[len] = 0; return QByteArray(d.take(), 0, 0); diff --git a/tests/auto/qbytearray/tst_qbytearray.cpp b/tests/auto/qbytearray/tst_qbytearray.cpp index 35e4463..5c72c7a 100644 --- a/tests/auto/qbytearray/tst_qbytearray.cpp +++ b/tests/auto/qbytearray/tst_qbytearray.cpp @@ -76,6 +76,7 @@ private slots: void qCompress(); void qUncompress_data(); void qUncompress(); + void qCompressionZeroTermination(); #endif void constByteArray(); void leftJustified(); @@ -261,6 +262,14 @@ void tst_QByteArray::qUncompress() } QCOMPARE(res, out); } + +void tst_QByteArray::qCompressionZeroTermination() +{ + QString s = "Hello, I'm a string."; + QByteArray ba = ::qUncompress(::qCompress(s.toLocal8Bit())); + QVERIFY((int) *(ba.data() + ba.size()) == 0); +} + #endif void tst_QByteArray::constByteArray() -- cgit v0.12 From 0a9e29a58bd501af2e52f868386b27b29ebb1a72 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 20 Jan 2010 22:37:03 +0100 Subject: QNAM HTTP: make it give some better error messages in case of socket failure. Reviewed-By: Peter Hartmann --- src/network/access/qhttpnetworkconnection.cpp | 7 ++++--- src/network/access/qhttpnetworkconnection_p.h | 3 ++- src/network/access/qhttpnetworkconnectionchannel.cpp | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index 20baac8..fff7097 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -564,7 +564,8 @@ bool QHttpNetworkConnectionPrivate::fillPipeline(QList &queue, } -QString QHttpNetworkConnectionPrivate::errorDetail(QNetworkReply::NetworkError errorCode, QAbstractSocket* socket) +QString QHttpNetworkConnectionPrivate::errorDetail(QNetworkReply::NetworkError errorCode, QAbstractSocket* socket, + const QString &extraDetail) { Q_ASSERT(socket); @@ -581,7 +582,7 @@ QString QHttpNetworkConnectionPrivate::errorDetail(QNetworkReply::NetworkError e errorString = QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Connection closed")); break; case QNetworkReply::TimeoutError: - errorString = QLatin1String(QT_TRANSLATE_NOOP("QHttp", "HTTP request failed")); + errorString = QLatin1String(QT_TRANSLATE_NOOP("QAbstractSocket", "Socket operation timed out")); break; case QNetworkReply::ProxyAuthenticationRequiredError: errorString = QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Proxy requires authentication")); @@ -600,7 +601,7 @@ QString QHttpNetworkConnectionPrivate::errorDetail(QNetworkReply::NetworkError e break; default: // all other errors are treated as QNetworkReply::UnknownNetworkError - errorString = QLatin1String(QT_TRANSLATE_NOOP("QHttp", "HTTP request failed")); + errorString = extraDetail; break; } return errorString; diff --git a/src/network/access/qhttpnetworkconnection_p.h b/src/network/access/qhttpnetworkconnection_p.h index 76da883..03cf09c 100644 --- a/src/network/access/qhttpnetworkconnection_p.h +++ b/src/network/access/qhttpnetworkconnection_p.h @@ -185,7 +185,8 @@ public: void createAuthorization(QAbstractSocket *socket, QHttpNetworkRequest &request); - QString errorDetail(QNetworkReply::NetworkError errorCode, QAbstractSocket *socket); + QString errorDetail(QNetworkReply::NetworkError errorCode, QAbstractSocket *socket, + const QString &extraDetail = QString()); #ifndef QT_NO_COMPRESS bool expand(QAbstractSocket *socket, QHttpNetworkReply *reply, bool dataComplete); diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index 1955dba..b80ae9a 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -872,7 +872,7 @@ void QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socket break; } QPointer that = connection; - QString errorString = connection->d_func()->errorDetail(errorCode, socket); + QString errorString = connection->d_func()->errorDetail(errorCode, socket, socket->errorString()); if (send2Reply) { if (reply) { reply->d_func()->errorString = errorString; -- cgit v0.12 From b9ef8332db374ef22ebd1045560c4cca1301e2c3 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 21 Jan 2010 14:03:43 +0100 Subject: doc: Documented the return value for QDomNode::appendChild(). Task-number: QTBUG-7498 --- src/xml/dom/qdom.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp index 657c79a..cae959b 100644 --- a/src/xml/dom/qdom.cpp +++ b/src/xml/dom/qdom.cpp @@ -2596,11 +2596,15 @@ QDomNode QDomNode::removeChild(const QDomNode& oldChild) already has an element node as a child, \a newChild is not added as a child and a null node is returned. - Calling this function on a null node(created, for example, with the - default constructor) does nothing. + Returns a new reference to \a newChild on success or a \link + isNull() null node\endlink on failure. - The DOM specification disallow inserting attribute nodes, but due - to historical reasons QDom accept them nevertheless. + Calling this function on a null node(created, for example, with + the default constructor) does nothing and returns a \link isNull() + null node\endlink. + + The DOM specification disallow inserting attribute nodes, but for + historical reasons, QDom accepts them anyway. \sa insertBefore() insertAfter() replaceChild() removeChild() */ -- cgit v0.12 From c86ab3fcedd3bcfa195d42d45fb732cb8315319d Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 20 Jan 2010 21:06:32 +0100 Subject: SSL Certificate: don't crash when the END CERTIFICATE line ends without CRLF If the file/data ends in the END CERTIFICATE line without a newline, the certificate is still valid. If it's followed by anything other than a newline, then it's no longer valid. Also add another test for the BEGIN CERTIFICATE ending without newline, to ensure we don't crash there either. Reviewed-By: Peter Hartmann --- src/network/ssl/qsslcertificate.cpp | 8 ++++---- .../more-certificates/malformed-just-begin-no-newline.pem | 1 + .../more-certificates/malformed-just-begin.pem | 1 + .../qsslcertificate/more-certificates/no-ending-newline.pem | 13 +++++++++++++ tests/auto/qsslcertificate/tst_qsslcertificate.cpp | 3 +++ 5 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 tests/auto/qsslcertificate/more-certificates/malformed-just-begin-no-newline.pem create mode 100644 tests/auto/qsslcertificate/more-certificates/malformed-just-begin.pem create mode 100644 tests/auto/qsslcertificate/more-certificates/no-ending-newline.pem diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp index 8993e72..9a9b1b5 100644 --- a/src/network/ssl/qsslcertificate.cpp +++ b/src/network/ssl/qsslcertificate.cpp @@ -696,11 +696,11 @@ QSslCertificate QSslCertificatePrivate::QSslCertificate_from_X509(X509 *x509) static bool matchLineFeed(const QByteArray &pem, int *offset) { - char ch = pem.at(*offset); + char ch; // ignore extra whitespace at the end of the line - while (ch == ' ' && *offset < pem.size()) - ch = pem.at(++*offset); + while (*offset < pem.size() && (ch = pem.at(*offset)) == ' ') + ++*offset; if (ch == '\n') { *offset += 1; @@ -732,7 +732,7 @@ QList QSslCertificatePrivate::certificatesFromPem(const QByteAr break; offset = endPos + sizeof(ENDCERTSTRING) - 1; - if (!matchLineFeed(pem, &offset)) + if (offset < pem.size() && !matchLineFeed(pem, &offset)) break; QByteArray decoded = QByteArray::fromBase64( diff --git a/tests/auto/qsslcertificate/more-certificates/malformed-just-begin-no-newline.pem b/tests/auto/qsslcertificate/more-certificates/malformed-just-begin-no-newline.pem new file mode 100644 index 0000000..75f3c32 --- /dev/null +++ b/tests/auto/qsslcertificate/more-certificates/malformed-just-begin-no-newline.pem @@ -0,0 +1 @@ +-----BEGIN CERTIFICATE----- \ No newline at end of file diff --git a/tests/auto/qsslcertificate/more-certificates/malformed-just-begin.pem b/tests/auto/qsslcertificate/more-certificates/malformed-just-begin.pem new file mode 100644 index 0000000..a71aecf --- /dev/null +++ b/tests/auto/qsslcertificate/more-certificates/malformed-just-begin.pem @@ -0,0 +1 @@ +-----BEGIN CERTIFICATE----- diff --git a/tests/auto/qsslcertificate/more-certificates/no-ending-newline.pem b/tests/auto/qsslcertificate/more-certificates/no-ending-newline.pem new file mode 100644 index 0000000..f8056c7 --- /dev/null +++ b/tests/auto/qsslcertificate/more-certificates/no-ending-newline.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIIB8zCCAVwCAREwDQYJKoZIhvcNAQEFBQAwWzELMAkGA1UEBhMCQVUxEzARBgNV +BAgTClF1ZWVuc2xhbmQxGjAYBgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRswGQYD +VQQDExJUZXN0IENBICgxMDI0IGJpdCkwHhcNMDcwNDE3MDc0MDI2WhcNMDcwNTE3 +MDc0MDI2WjApMRowGAYDVQQDExFuYW1lL3dpdGgvc2xhc2hlczELMAkGA1UEBhMC +Tk8wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOud6QOsME+pWANExxgmL0iT +1ayg++hTxHsqAYnm/FoMxfUh+NdKkgJn2/GfNppinfPOSI667VqonU+7JBZDTLV5 +CPbZIo9fFQpDJQN6naev4yaxU1VeYFfI7S8c8zYKeGSR+RenNNeLvfH80YxPpZZ1 +snv8IfDH2V8MVxiyr7lLAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAleaU4pgzV6KY ++q9QuXapUYMsC2GiNtDmkG3k+MTHUO8XlE4hqPrIM6rRf7zKQdZ950R2wL9FSnYl +Qm1Tdv38dCka6ivMBqvRuOt9axH3m0G7nzHL7U3zaCbtEx3yVln+b3yYtiVpTuq0 +3MLrt7tQGAW6ra8ISf6YY1W65/uVXZE= +-----END CERTIFICATE----- \ No newline at end of file diff --git a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp index 44f8522..c76c11f 100644 --- a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp +++ b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp @@ -543,6 +543,9 @@ void tst_QSslCertificate::fromPath_data() QTest::newRow("\"d.*/c.*.pem\" wildcard der") << QString("d.*/c.*.pem") << int(QRegExp::Wildcard) << false << 0; QTest::newRow("trailing-whitespace") << QString("more-certificates/trailing-whitespace.pem") << int(QRegExp::FixedString) << true << 1; + QTest::newRow("no-ending-newline") << QString("more-certificates/no-ending-newline.pem") << int(QRegExp::FixedString) << true << 1; + QTest::newRow("malformed-just-begin") << QString("more-certificates/malformed-just-begin.pem") << int(QRegExp::FixedString) << true << 0; + QTest::newRow("malformed-just-begin-no-newline") << QString("more-certificates/malformed-just-begin-no-newline.pem") << int(QRegExp::FixedString) << true << 0; } void tst_QSslCertificate::fromPath() -- cgit v0.12 From e96c1d6ea945c12fb5de929709ab33c476a63cb5 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 21 Jan 2010 11:57:42 +0100 Subject: Revert "Make an empty QUrl also be considered non-detached (d == 0)." as agreed with Warwick. This reverts commit 089ee7094eabb2058b478f5d2f306a69f6c0b3bf. --- src/corelib/io/qurl.cpp | 2 +- tests/auto/qurl/tst_qurl.cpp | 20 -------------------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 74e5f74..a131d6c 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -5932,7 +5932,7 @@ void QUrl::detach() */ bool QUrl::isDetached() const { - return d && d->ref == 1; + return !d || d->ref == 1; } diff --git a/tests/auto/qurl/tst_qurl.cpp b/tests/auto/qurl/tst_qurl.cpp index ecd6f09..33812fe 100644 --- a/tests/auto/qurl/tst_qurl.cpp +++ b/tests/auto/qurl/tst_qurl.cpp @@ -90,7 +90,6 @@ public slots: private slots: void getSetCheck(); void constructing(); - void isDetached(); void assignment(); void comparison(); void copying(); @@ -319,25 +318,6 @@ void tst_QUrl::constructing() QVERIFY(!buildUNC.isEmpty()); } -void tst_QUrl::isDetached() -{ - QUrl url; - QVERIFY(!url.isDetached()); - - url = "http://qt.nokia.com/"; - QVERIFY(url.isDetached()); - - url.clear(); - QVERIFY(!url.isDetached()); - - url.setHost("qt.nokia.com"); - QVERIFY(url.isDetached()); - - QUrl url2 = url; - QVERIFY(!url.isDetached()); - QVERIFY(!url2.isDetached()); -} - void tst_QUrl::assignment() { QUrl url("http://qt.nokia.com/"); -- cgit v0.12 From c2573f74fb8a09484b385e4469d887bb0fea8cb9 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 21 Jan 2010 14:48:34 +0100 Subject: Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( 8f5ca3ba5da63a47d4f90bbd867d3e8453443dd3 ) Changes in WebKit/qt since the last update: * Girish: Fix positioning of ComboBox popup in QGraphicsWebView. -- https://bugs.webkit.org/show_bug.cgi?id=33887 --- src/3rdparty/webkit/VERSION | 2 +- src/3rdparty/webkit/WebCore/platform/PopupMenu.h | 2 ++ .../webkit/WebCore/platform/qt/PopupMenuQt.cpp | 21 +++++++++++++++++++-- .../webkit/WebCore/platform/qt/QWebPopup.cpp | 5 +++++ 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index 9dd9377..6fe71d6 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -8,4 +8,4 @@ The commit imported was from the and has the sha1 checksum - e15bd5454732bab9ffff4e1e5a755f41fd4e2eff + 8f5ca3ba5da63a47d4f90bbd867d3e8453443dd3 diff --git a/src/3rdparty/webkit/WebCore/platform/PopupMenu.h b/src/3rdparty/webkit/WebCore/platform/PopupMenu.h index 2315f02..f2fffb5 100644 --- a/src/3rdparty/webkit/WebCore/platform/PopupMenu.h +++ b/src/3rdparty/webkit/WebCore/platform/PopupMenu.h @@ -44,6 +44,7 @@ typedef struct HBITMAP__* HBITMAP; namespace WebCore { class QWebPopup; } +class QGraphicsProxyWidget; #elif PLATFORM(GTK) typedef struct _GtkMenu GtkMenu; typedef struct _GtkMenuItem GtkMenuItem; @@ -147,6 +148,7 @@ private: void clear(); void populate(const IntRect&); QWebPopup* m_popup; + QGraphicsProxyWidget* m_proxy; #elif PLATFORM(WIN) // ScrollBarClient virtual void valueChanged(Scrollbar*); diff --git a/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp index f6ec4f7..989b34c 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp @@ -1,6 +1,7 @@ /* * This file is part of the popup menu implementation for