summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWater-Team <water@pad.test.qt.nokia.com>2011-11-13 00:00:12 (GMT)
committerWater-Team <water@pad.test.qt.nokia.com>2011-11-13 00:00:12 (GMT)
commitf8ca22cbd388c29dd507b74d3b409284df0ddd48 (patch)
tree2c1e5686bc3791270b623b4f98f0b1d9f9941cda
parent4fea304c18471ae4d13e2d172b5e6c3200bf4d58 (diff)
parentbc992fd8381697f57c6abb13b5fa17167d98867a (diff)
downloadQt-f8ca22cbd388c29dd507b74d3b409284df0ddd48.zip
Qt-f8ca22cbd388c29dd507b74d3b409284df0ddd48.tar.gz
Qt-f8ca22cbd388c29dd507b74d3b409284df0ddd48.tar.bz2
Merge branch '4.8-upstream' into master-water
-rw-r--r--src/3rdparty/webkit/.tag2
-rw-r--r--src/3rdparty/webkit/ChangeLog20
-rw-r--r--src/3rdparty/webkit/Source/WebKit.pri10
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/dbus/qdbuspendingcall.cpp9
-rw-r--r--src/gui/styles/qmacstyle_mac.mm10
-rw-r--r--src/gui/text/qtextcontrol.cpp7
-rw-r--r--src/gui/widgets/qgroupbox.cpp4
-rw-r--r--src/gui/widgets/qplaintextedit.cpp2
-rw-r--r--src/gui/widgets/qvalidator.cpp3
-rw-r--r--src/network/access/qhttpnetworkreply.cpp6
-rw-r--r--src/network/socket/qhttpsocketengine.cpp4
-rw-r--r--src/xml/sax/qxml.cpp3
-rw-r--r--tests/auto/qgroupbox/tst_qgroupbox.cpp23
-rw-r--r--tests/auto/qintvalidator/tst_qintvalidator.cpp9
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp23
-rw-r--r--translations/qt_ru.ts18
17 files changed, 122 insertions, 33 deletions
diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag
index a5f6423..12a28b8 100644
--- a/src/3rdparty/webkit/.tag
+++ b/src/3rdparty/webkit/.tag
@@ -1 +1 @@
-99371ddc1d61832131835964a753e1c5817f6916
+52a11cec052aa40d3bbc06861be1177b649b4a99
diff --git a/src/3rdparty/webkit/ChangeLog b/src/3rdparty/webkit/ChangeLog
index a661d6a..bbaf26d 100644
--- a/src/3rdparty/webkit/ChangeLog
+++ b/src/3rdparty/webkit/ChangeLog
@@ -1,3 +1,23 @@
+2011-11-09 Zeno Albisser <zeno.albisser@nokia.com>
+
+ [Qt] Unreviewed: Fix build on Mac.
+ https://bugreports.qt.nokia.com/browse/QTBUG-20619
+
+ This bug was introduced by the previous commit
+ for the same bugreport.
+
+ * Source/WebKit.pri:
+
+2011-11-09 Zeno Albisser <zeno.albisser@nokia.com>
+
+ [Qt] Unreviewed: Fix debug_and_release build on Windows.
+ https://bugreports.qt.nokia.com/browse/QTBUG-20619
+
+ This bug was introduced by the previous commit
+ for the same bugreport.
+
+ * Source/WebKit.pri:
+
2011-11-03 Zeno Albisser <zeno.albisser@nokia.com>
[Qt] Unreviewed: Fix universal binary build on Mac.
diff --git a/src/3rdparty/webkit/Source/WebKit.pri b/src/3rdparty/webkit/Source/WebKit.pri
index bc889d1..c469d1a 100644
--- a/src/3rdparty/webkit/Source/WebKit.pri
+++ b/src/3rdparty/webkit/Source/WebKit.pri
@@ -12,10 +12,12 @@ CONFIG(QTDIR_build) {
win32|mac:!macx-xcode:CONFIG += debug_and_release
# In case we are building a universal binary for Qt, building debug is not
# possible because we would exceed the maximum library size for 32bit.
- mac:CONFIG(QT_CONFIG, x86):CONFIG(QT_CONFIG, x86_64):debug|debug_and_release {
- message(Building a universal binary with debug symbols is not possible. Building release!)
- CONFIG -= debug_and_release debug
- CONFIG += release
+ mac:contains(QT_CONFIG, x86):contains(QT_CONFIG, x86_64) {
+ CONFIG(debug_and_release)|CONFIG(debug, debug|release) {
+ message(Building a universal binary with debug symbols is not possible. Building release!)
+ CONFIG -= debug_and_release debug
+ CONFIG += release
+ }
}
} else {
!CONFIG(release, debug|release) {
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index 19f5536..750e7e7 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -4,4 +4,4 @@ This is a snapshot of the Qt port of WebKit from
and has the sha1 checksum
- 99371ddc1d61832131835964a753e1c5817f6916
+ 52a11cec052aa40d3bbc06861be1177b649b4a99
diff --git a/src/dbus/qdbuspendingcall.cpp b/src/dbus/qdbuspendingcall.cpp
index ea84742..2278db4 100644
--- a/src/dbus/qdbuspendingcall.cpp
+++ b/src/dbus/qdbuspendingcall.cpp
@@ -180,9 +180,12 @@ bool QDBusPendingCallPrivate::setReplyCallback(QObject *target, const char *memb
if (metaTypes.at(count) == QDBusMetaTypeId::message)
--count;
- // QList<int> is actually a vector
- // kids, don't try this at home
- setMetaTypes(count, count ? &metaTypes.at(1) : 0);
+ if (count == 0) {
+ setMetaTypes(count, 0);
+ } else {
+ QVector<int> types = QVector<int>::fromList(metaTypes);
+ setMetaTypes(count, types.constData() + 1);
+ }
return true;
}
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index 1c1713c..8f0e602 100644
--- a/src/gui/styles/qmacstyle_mac.mm
+++ b/src/gui/styles/qmacstyle_mac.mm
@@ -2920,10 +2920,14 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai
QVector<QLineF> a(2);
a << QLineF(x1, y1, x2, y2);
a << QLineF(x2, y2, x3, y3);
- if (opt->palette.currentColorGroup() == QPalette::Active)
- p->setPen(QPen(Qt::white, 3));
- else
+ if (opt->palette.currentColorGroup() == QPalette::Active) {
+ if (opt->state & State_On)
+ p->setPen(QPen(opt->palette.highlightedText().color(), 3));
+ else
+ p->setPen(QPen(opt->palette.text().color(), 3));
+ } else {
p->setPen(QPen(QColor(100, 100, 100), 3));
+ }
p->save();
p->setRenderHint(QPainter::Antialiasing);
p->drawLines(a);
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp
index 5babbc2..ffcd90b 100644
--- a/src/gui/text/qtextcontrol.cpp
+++ b/src/gui/text/qtextcontrol.cpp
@@ -2029,10 +2029,7 @@ void QTextControlPrivate::focusEvent(QFocusEvent *e)
#endif
))) {
#endif
- cursorOn = (interactionFlags & Qt::TextSelectableByKeyboard);
- if (interactionFlags & Qt::TextEditable) {
- setBlinkingCursorEnabled(true);
- }
+ setBlinkingCursorEnabled(interactionFlags & (Qt::TextEditable | Qt::TextSelectableByKeyboard));
#ifdef QT_KEYPAD_NAVIGATION
}
#endif
@@ -2808,7 +2805,7 @@ void QTextControl::setTextInteractionFlags(Qt::TextInteractionFlags flags)
d->interactionFlags = flags;
if (d->hasFocus)
- d->setBlinkingCursorEnabled(flags & Qt::TextEditable);
+ d->setBlinkingCursorEnabled(flags & (Qt::TextEditable | Qt::TextSelectableByKeyboard));
}
Qt::TextInteractionFlags QTextControl::textInteractionFlags() const
diff --git a/src/gui/widgets/qgroupbox.cpp b/src/gui/widgets/qgroupbox.cpp
index 56fb2dd..db068cf 100644
--- a/src/gui/widgets/qgroupbox.cpp
+++ b/src/gui/widgets/qgroupbox.cpp
@@ -733,6 +733,10 @@ void QGroupBox::mouseReleaseEvent(QMouseEvent *event)
}
Q_D(QGroupBox);
+ if (!d->overCheckBox) {
+ event->ignore();
+ return;
+ }
QStyleOptionGroupBox box;
initStyleOption(&box);
QStyle::SubControl released = style()->hitTestComplexControl(QStyle::CC_GroupBox, &box,
diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp
index f2fca8f..3b2c8fd 100644
--- a/src/gui/widgets/qplaintextedit.cpp
+++ b/src/gui/widgets/qplaintextedit.cpp
@@ -1900,7 +1900,7 @@ void QPlainTextEdit::paintEvent(QPaintEvent *e)
}
}
- bool drawCursor = (editable
+ bool drawCursor = ((editable || (textInteractionFlags() & Qt::TextSelectableByKeyboard))
&& context.cursorPosition >= blpos
&& context.cursorPosition < blpos + bllen);
diff --git a/src/gui/widgets/qvalidator.cpp b/src/gui/widgets/qvalidator.cpp
index b32bea8..4362f2b 100644
--- a/src/gui/widgets/qvalidator.cpp
+++ b/src/gui/widgets/qvalidator.cpp
@@ -400,8 +400,9 @@ QValidator::State QIntValidator::validate(QString & input, int&) const
qlonglong entered = QLocalePrivate::bytearrayToLongLong(buff.constData(), 10, &ok, &overflow);
if (overflow || !ok)
return Invalid;
+
if (entered >= b && entered <= t) {
- locale().toInt(input, &ok);
+ locale().toInt(input, &ok, 10);
return ok ? Acceptable : Intermediate;
}
diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp
index 6173b39..3dc8b2f 100644
--- a/src/network/access/qhttpnetworkreply.cpp
+++ b/src/network/access/qhttpnetworkreply.cpp
@@ -472,8 +472,10 @@ int QHttpNetworkReplyPrivate::gunzipBodyPartially(QByteArray &compressed, QByteA
void QHttpNetworkReplyPrivate::gunzipBodyPartiallyEnd()
{
- inflateEnd(&inflateStrm);
- initInflate = false;
+ if (initInflate) {
+ inflateEnd(&inflateStrm);
+ initInflate = false;
+ }
}
#endif
diff --git a/src/network/socket/qhttpsocketengine.cpp b/src/network/socket/qhttpsocketengine.cpp
index 5c672ec..b62bc05 100644
--- a/src/network/socket/qhttpsocketengine.cpp
+++ b/src/network/socket/qhttpsocketengine.cpp
@@ -614,6 +614,10 @@ void QHttpSocketEngine::slotSocketReadNotification()
bool willClose;
QString proxyConnectionHeader = responseHeader.value(QLatin1String("Proxy-Connection"));
+ // Although most proxies use the unofficial Proxy-Connection header, the Connection header
+ // from http spec is also allowed.
+ if (proxyConnectionHeader.isEmpty())
+ proxyConnectionHeader = responseHeader.value(QLatin1String("Connection"));
proxyConnectionHeader = proxyConnectionHeader.toLower();
if (proxyConnectionHeader == QLatin1String("close")) {
willClose = true;
diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp
index 0c7f2ab..c4c5f0c 100644
--- a/src/xml/sax/qxml.cpp
+++ b/src/xml/sax/qxml.cpp
@@ -1321,7 +1321,8 @@ QXmlInputSource::QXmlInputSource(QIODevice *dev)
{
init();
d->inputDevice = dev;
- d->inputDevice->setTextModeEnabled(false);
+ if (dev->isOpen())
+ d->inputDevice->setTextModeEnabled(false);
}
#ifdef QT3_SUPPORT
diff --git a/tests/auto/qgroupbox/tst_qgroupbox.cpp b/tests/auto/qgroupbox/tst_qgroupbox.cpp
index f1388bc..f3d26ef 100644
--- a/tests/auto/qgroupbox/tst_qgroupbox.cpp
+++ b/tests/auto/qgroupbox/tst_qgroupbox.cpp
@@ -83,6 +83,7 @@ private slots:
void toggledVsClicked();
void childrenAreDisabled();
void propagateFocus();
+ void task_QTBUG_19170_ignoreMouseReleseEvent();
private:
bool checked;
@@ -473,5 +474,27 @@ void tst_QGroupBox::propagateFocus()
QTRY_COMPARE(qApp->focusWidget(), static_cast<QWidget*>(&lineEdit));
}
+void tst_QGroupBox::task_QTBUG_19170_ignoreMouseReleseEvent()
+{
+ QGroupBox box;
+ box.setCheckable(true);
+ box.setChecked(false);
+ box.setTitle("This is a test for QTBUG-19170");
+ box.show();
+
+ QStyleOptionGroupBox option;
+ option.initFrom(&box);
+ option.subControls = QStyle::SubControls(QStyle::SC_All);
+ QRect rect = box.style()->subControlRect(QStyle::CC_GroupBox, &option,
+ QStyle::SC_GroupBoxCheckBox, &box);
+
+ QTest::mouseClick(&box, Qt::LeftButton, 0, rect.center());
+ QCOMPARE(box.isChecked(), true);
+
+ box.setChecked(false);
+ QTest::mouseRelease(&box, Qt::LeftButton, 0, rect.center());
+ QCOMPARE(box.isChecked(), false);
+}
+
QTEST_MAIN(tst_QGroupBox)
#include "tst_qgroupbox.moc"
diff --git a/tests/auto/qintvalidator/tst_qintvalidator.cpp b/tests/auto/qintvalidator/tst_qintvalidator.cpp
index d537635..7e36093 100644
--- a/tests/auto/qintvalidator/tst_qintvalidator.cpp
+++ b/tests/auto/qintvalidator/tst_qintvalidator.cpp
@@ -168,6 +168,15 @@ void tst_QIntValidator::validate_data()
QTest::newRow("8.9") << -1 << 100 << QString("5") << ACC;
QTest::newRow("8.10") << -1 << 100 << QString("+") << INT;
QTest::newRow("8.11") << -1 << 100 << QString("+50") << ACC;
+
+ QTest::newRow("9.0") << -10 << 10 << QString("000") << ACC;
+ QTest::newRow("9.1") << -10 << 10 << QString("008") << ACC;
+ QTest::newRow("9.2") << -10 << 10 << QString("-008") << ACC;
+ QTest::newRow("9.3") << -10 << 10 << QString("00010") << ACC;
+ QTest::newRow("9.4") << -10 << 10 << QString("-00010") << ACC;
+ QTest::newRow("9.5") << -10 << 10 << QString("00020") << INV;
+ QTest::newRow("9.6") << -10 << 10 << QString("-00020") << INV;
+
}
void tst_QIntValidator::validateArabic()
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
index 9df820a..14ad6a9 100644
--- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
@@ -368,6 +368,7 @@ private Q_SLOTS:
void qtbug15311doubleContentLength();
void qtbug18232gzipContentLengthZero();
+ void nb279420gzipNoContentLengthEmptyContentDisconnect();
void synchronousRequest_data();
void synchronousRequest();
@@ -6139,6 +6140,28 @@ void tst_QNetworkReply::qtbug18232gzipContentLengthZero()
QCOMPARE(reply->readAll(), QByteArray());
}
+// Reproduced a crash in QHttpNetworkReplyPrivate::gunzipBodyPartiallyEnd
+// where zlib inflateEnd was called for uninitialized zlib stream
+void tst_QNetworkReply::nb279420gzipNoContentLengthEmptyContentDisconnect()
+{
+ // Response with no Content-Length in header and empty content
+ QByteArray response("HTTP/1.0 200 OK\r\nContent-Encoding: gzip\r\n\r\n");
+ MiniHttpServer server(response);
+ server.doClose = true;
+
+ QNetworkRequest request(QUrl("http://localhost:" + QString::number(server.serverPort())));
+ QNetworkReplyPtr reply = manager.get(request);
+
+ connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
+ QTestEventLoop::instance().enterLoop(10);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+ QVERIFY(reply->isFinished());
+ QCOMPARE(reply->error(), QNetworkReply::NoError);
+ QCOMPARE(reply->size(), qint64(0));
+ QVERIFY(!reply->header(QNetworkRequest::ContentLengthHeader).isValid());
+ QCOMPARE(reply->readAll(), QByteArray());
+}
+
void tst_QNetworkReply::synchronousRequest_data()
{
QTest::addColumn<QUrl>("url");
diff --git a/translations/qt_ru.ts b/translations/qt_ru.ts
index 348b1ce..aebbac2 100644
--- a/translations/qt_ru.ts
+++ b/translations/qt_ru.ts
@@ -1816,14 +1816,6 @@ to
<context>
<name>QDeclarativeImportDatabase</name>
<message>
- <source>cannot load module &quot;%1&quot;: File name case mismatch for &quot;%2&quot;</source>
- <translation>невозможно загрузить модуль «%1»: Регистр имени файла не соответствует «%2»</translation>
- </message>
- <message>
- <source>module &quot;%1&quot; definition &quot;%2&quot; not readable</source>
- <translation>невозможно прочитать определение «%2» модуля «%1»</translation>
- </message>
- <message>
<source>plugin cannot be loaded for module &quot;%1&quot;: %2</source>
<translation>не удалось загрузить плагин для модуля «%1»: %2</translation>
</message>
@@ -1876,8 +1868,8 @@ to
<translation>не является типом</translation>
</message>
<message>
- <source>File name case mismatch for &quot;%2&quot;</source>
- <translation>Регистр имени файла не соответствует «%2»</translation>
+ <source>File name case mismatch for &quot;%1&quot;</source>
+ <translation>Регистр имени файла не соответствует «%1»</translation>
</message>
</context>
<context>
@@ -4977,7 +4969,11 @@ Please choose a different file name.</source>
</message>
<message>
<source>bad lookahead syntax</source>
- <translation>неправильный предварительный синтаксис</translation>
+ <translation>неправильный синтаксис lookahead</translation>
+ </message>
+ <message>
+ <source>lookbehinds not supported, see QTBUG-2371</source>
+ <translation>lookbehind не поддерживается, см. QTBUG-2371</translation>
</message>
<message>
<source>bad repetition syntax</source>