Commit Graph

286 Commits

Author SHA1 Message Date
Jake Petroules
f125fa5541 Further followup to Q_OS_MACX changes.
Flip !Q_OS_IOS conditions to Q_OS_MACX where it seems appropriate,
remove a redundant condition in qtextcodec_p.h.

Change-Id: I21c8c0c490f1eb4a9337a7f2f3e907c125489438
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-06-24 15:49:31 +02:00
Friedemann Kleint
a1c8c581ce tst_qnetworkproxyfactory: Fix warnings about unused variables.
Change-Id: I6fa08353ebea5cdd7fc7a0c982bf1b9d34bbc077
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-06-07 14:54:33 +02:00
Thiago Macieira
24c52bd44b Update the DNS and name-resolver tests to the official zone
Change-Id: I02feb8029461383f38bcbdca138789b119a58b5a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-06-07 05:31:31 +02:00
Thiago Macieira
db15341d27 QDnsLookup: test multiple TXT answers too
The TXT record is particular because each RR can contain multiple text
strings. So we need to join each RR's texts too.

To make it easy, I've made everything be QStrings.

Change-Id: Ia0506544b913585e7be860c81077cff8e0dab547
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-06-04 02:22:47 +02:00
Thiago Macieira
0c8061f608 QDnsLookup: test MX and SRV records that can change order
The DNS protocol changes the order of the RRs in each reply it sends,
in an effort to balance the load in servers. For most tests, to ensure
that we get always the same result, we simply sort it back.

For MX and SRV, we can't sort because we also need to test that
QDnsLookup sorted correctly according to priority. So instead allow
that test to have multiple alternatives.

Change-Id: I5c119f907b31789de5c9cf2471cc82ecd140d06f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-06-04 02:22:47 +02:00
Thiago Macieira
cd5d1524a0 Autotest: Use the new test zone in all name-lookup unit tests
I also modified tst_QDnsLookup the test to use ';' as a separator as
opposed to spaces because I added MX and SRV records with multiple
RRs.

Change-Id: I62c7b6ad342c1bb23c4d9ac9730e35ab422e3ea2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-05-07 02:53:50 +02:00
Peter Hartmann
e145b67fbd SSL internals: do not write after shutting down the socket
... but rather throw an error, so the HTTP layer can recover from a SSL
shutdown gracefully. In case the other side sent us a shutdown, we should
not send one as well, as it results in an error.

Change-Id: Ie7a56cf3008b6ead912aade18dbec67846e2a87e
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-04-23 23:22:43 +02:00
Thomas McGuire
e0cf3fcd8f Fix retrieving of the generic system proxy via environment variables
ignoreProxyFor() always returned true if the no_proxy was not set,
which resulted in the first token being an empty QByteArray, causing
the endsWith() check to always evaluate to true.

Add a unit test that is enabled for those platforms that use the generic
system proxy.

Change-Id: I6081ad5e0b8e2c3fee1568835907c32bde5b7772
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2013-04-23 21:02:50 +02:00
Peter Hartmann
b96e8ff1d2 QNetworkInterface auto test: do not abort without session
... but only if the QNetworkConfiguration manager requires one.

Change-Id: I1c69c43438f1df9080d207c8598a42201f759c5b
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2013-03-26 10:18:02 +01:00
Samuel Rødal
2ab9b747fc Merge remote-tracking branch 'gerrit/release' into stable
Conflicts:
	configure
	mkspecs/features/qt_module_headers.prf
	mkspecs/features/qt_tool.prf
	src/angle/angle.pro
	src/tools/bootstrap/bootstrap.pro
	tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp

Change-Id: Ide5759fe419a50f1c944211a48f7c66f662684e0
2013-03-21 08:49:01 +01:00
Samuel Rødal
678320788e Skip unstable tst_QSslSocket test case.
The connection to qt-project.org seems to be the one that causes this
particular test case to fail.

Task-number: QTBUG-29941
Change-Id: Ie5e430646997e86e3acb04132cd90a1773a091da
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2013-03-20 16:11:40 +01:00
Oswald Buddenhagen
76c0be34cd Merge branch 'dev' into stable
This starts Qt 5.1 release cycle

Conflicts:
	src/gui/text/qfontdatabase.cpp
	src/gui/text/qharfbuzz_copy_p.h
	src/widgets/kernel/qapplication.cpp
	src/widgets/kernel/qcoreapplication.cpp

Change-Id: I72fbf83ab3c2206aeea1b089428b0fc2a89bd62b
2013-03-20 13:49:28 +01:00
Axel Waggershauser
b11317a643 Whitespace cleanup: remove trailing whitespace
Remove all trailing whitespace from the following list of files:
*.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README
excluding 3rdparty, test-data and auto generated code.

Note A): the only non 3rdparty c++-files that still
have trailing whitespace after this change are:
* src/corelib/codecs/cp949codetbl_p.h
* src/corelib/codecs/qjpunicode.cpp
* src/corelib/codecs/qbig5codec.cpp
* src/corelib/xml/qxmlstream_p.h
* src/tools/qdoc/qmlparser/qqmljsgrammar.cpp
* src/tools/uic/ui4.cpp
* tests/auto/other/qtokenautomaton/tokenizers/*
* tests/benchmarks/corelib/tools/qstring/data.cpp
* util/lexgen/tokenizer.cpp

Note B): in about 30 files some overlapping 'leading tab' and
'TAB character in non-leading whitespace' issues have been fixed
to make the sanity bot happy. Plus some general ws-fixes here
and there as asked for during review.

Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-16 20:22:50 +01:00
Stephen Kelly
ff84d2258f Don't fail on tst_QSslSocket::setReadBufferSize_task_250027
It is flakey and often blocks integration.

Task-number: QTBUG-29730

Change-Id: I8acfc243ec6a6782b7f7d78fc27827f3fdc1ce52
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-03-15 10:04:03 +01:00
Friedemann Kleint
62fe32b37c Fix warning about unused function result in tst_qnetworkproxyfactory.
Change-Id: I1f996c208e05e456d374726c91a5f52ed64f784c
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-12 09:16:42 +01:00
Friedemann Kleint
eccef8c936 Fix warnings about overloaded virtuals in tests (CLANG).
Change-Id: I2f96073c4aaf4b11221b98cc6c7031b253a3b45c
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-03-12 09:16:42 +01:00
Friedemann Kleint
d8e767e928 Fix warnings about unused field variables (CLANG).
Change-Id: I488ad18eb0389d1e9b8b695b7a02eca47bee687e
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-03-06 21:50:28 +01:00
Frederik Gladhorn
49a2ec05b4 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/plugins/platforms/qnx/qqnxscreen.cpp
	src/plugins/platforms/windows/qwindowsdialoghelpers.cpp

Change-Id: Ib64f21c077b54f2291d19187590bfe869b98477a
2013-03-06 14:38:07 +01:00
Laszlo Papp
80af204297 Return -1 as the API documents it for socket issues
Task-number: QTBUG-30024
Change-Id: I51498e6d74ab139134abfb94f35647e995319ee8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-05 12:19:08 +01:00
Richard Moore
5ebc8d3663 Add an encrypted() signal to QNetworkAccessManager and QNetworkReply.
Add an encrypted signal to QNAM and QNetworkReply to allow applications
to perform additional checks on the certificate chain beyond those done
as part of the standard SSL validation. This allows things like
certificate change notification to be implemented for QNAM as they can
be for QSSLSocket currently.

Change-Id: I693e3e6fec8b7040379b7e7f1f819550e6b2617f
Reviewed-by: Peter Hartmann <phartmann@rim.com>
2013-02-19 21:37:32 +01:00
Richard Moore
7898080ca7 Add support for intermediate certificates to server sockets.
Add intermediate certificates to our server sockets, and to our client
certs.

Change-Id: Ib5aa575473f9e84f337bebe35099506dd7d7e2ba
Task-Number: QTBUG-19825
Task-Number: QTBUG-13281
Reviewed-by: Peter Hartmann <phartmann@rim.com>
2013-02-19 21:37:24 +01:00
Richard Moore
4a07519877 Store the local certificate in a QList.
Instead of storing a single QSslCertificate for a the local cert, store
a list of them. This will allow us to handle server sockets that use a
certificate that is not issued directly from the CA root in future.

Change-Id: I9a36b9a99daa9c0bdd17f61b4ce1a7da746f2e96
Reviewed-by: Peter Hartmann <phartmann@rim.com>
2013-02-19 21:37:14 +01:00
Peter Hartmann
165926c3ae SSL session sharing auto test: Retrieve smaller file for testing
The "mediumfile" is actually 9.6 MB large, and makes the test slow and
even fail on mobile platforms.

Change-Id: I694d9d38e4d09c8e90a03c1141320fe2a757fdd9
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-02-19 10:35:06 +01:00
Frederik Gladhorn
f4900d340a Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/widgets/styles/qmacstyle_mac.mm

Change-Id: If8326db9e7da3cbf45dbf7475fdff9915c7723b1
2013-02-18 16:14:52 +01:00
Giuseppe D'Angelo
e88011357e Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-02-17 20:31:38 +01:00
Tor Arne Vestbø
2df8884bc6 Skip tst_QSslSocket::setReadBufferSize_task_250027()
It's flakey and is blocking integration. Tracked in QTBUG-29730.

Change-Id: Ia5b8f952314bf2e1aa6dbb5c5c0a97e32e68d0f6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-17 20:31:31 +01:00
Frederik Gladhorn
e65cd6f379 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/concurrent/doc/qtconcurrent.qdocconf
	src/corelib/doc/qtcore.qdocconf
	src/corelib/global/qglobal.h
	src/dbus/doc/qtdbus.qdocconf
	src/dbus/qdbusmessage.h
	src/gui/doc/qtgui.qdocconf
	src/gui/image/qimagereader.cpp
	src/network/doc/qtnetwork.qdocconf
	src/opengl/doc/qtopengl.qdocconf
	src/opengl/qgl.h
	src/plugins/platforms/windows/qwindowswindow.cpp
	src/printsupport/doc/qtprintsupport.qdocconf
	src/sql/doc/qtsql.qdocconf
	src/testlib/doc/qttestlib.qdocconf
	src/tools/qdoc/doc/config/qt-cpp-ignore.qdocconf
	src/widgets/doc/qtwidgets.qdocconf
	src/xml/doc/qtxml.qdocconf

Change-Id: Ie9a1fa2cc44bec22a0b942e817a1095ca3414629
2013-02-14 14:24:57 +01:00
Frederik Gladhorn
e432d53883 Only compile SSL tests when openssl is available.
Change-Id: I79fc705f30fb84e86bd7d674d90fbbe2d1a124ba
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-02-13 23:56:41 +01:00
Friedemann Kleint
9a74bbf34f Fix developer-build of qsslsocket_onDemandCertificates_member.
Do not include qsslsocket_p.h unless SSL is present.

Change-Id: I7e56b7758729907892d85f97d5a9d3ccaf7a3314
Reviewed-by: Peter Hartmann <phartmann@rim.com>
2013-02-12 17:56:10 +01:00
Peter Hartmann
916f0ff663 QUrl effective TLDs: update table and split into chunks of 64K
The table is there to know which domains are allowed to set cookies
and which are not. There are more than 2000 new entries since the
list has last been generated.
The split to 64K chunks was made because this is the hard limit for
strings in Visual Studio.

Change-Id: I511aec062af673555e9a69442c055f75bdcd1606
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-09 10:12:44 +01:00
BogDan Vatra
934afb5c57 Fix loading of SSL certificate of DER files.
DER certificates should not be opened as text files, so we
only pass the QIODevice::Text flag when the format is
QSsl::Pem.

Change-Id: I4bad98023c397b967d5beeec0aaa6c414e06fd9c
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-02-08 17:37:51 +01:00
Peter Hartmann
b5652df775 SSL: Implement session sharing and use it from QNetworkAccessManager
This improves performance since a network round trip can be avoided.

Change-Id: I1aaff7e48ef9638cb137de0f43942c3a4dd2884a
Initial-patch-by: Markus Goetz <markus@woboq.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-02-06 23:24:44 +01:00
Sergio Ahumada
d011f64524 tests: Fix some more old references and links to Nokia
Task-number: QTBUG-28156
Change-Id: Ifb768b167203c901c5e42ce58c9aaf3db2739320
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-02-01 15:27:37 +01:00
Peter Hartmann
7d757fc8fe QSslSocket tests: use qt-project.org as test server instd of codereview
Change-Id: I1f3a860bf1ab24c30001059b7bcbb19fba7cbc1d
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-01-29 13:00:38 +01:00
Sze Howe Koh
7bb43454b8 Fix minor typos in docs, printed messages & comments
Missing apostrophes

Change-Id: I3ef5e9d494fb7a37f8e6075f24cd3a274e572c23
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-01-28 18:12:41 +01:00
Pasi Petäjäjärvi
f3fc2078b8 Check existence of QProcess feature before using it on Qt autotests.
VxWorks does not have QProcess support.

Change-Id: I917b769f967e9d71ec5025aae788f3e237b07aeb
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
(cherry picked from commit 416e73a0fc)
2013-01-28 16:06:15 +01:00
Frederik Gladhorn
627d9cbd3c Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/plugins/platforms/windows/qwindowsdialoghelpers.cpp

Change-Id: I4ca87d44129fa5c1d8541cd58b8d62bc69080688
2013-01-24 16:02:55 +01:00
Frederik Gladhorn
7df08a8b63 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-01-23 22:12:54 +01:00
Peter Hartmann
ce35c0db0d QSslConfiguration: toggle on demand loading of root certs properly
make sure we keep track of when we can load root certs and when we
cannot (we cannot when the developer set the certs explicitly). This is
implemented the same way for QSslSocket already, and needs to be
duplicated because we have 2 methods for setting CA certificates: one in
QSslSocket and one in QSslConfiguration.
In addition, adapt the auto test which checks whether setting a default
QSslConfiguration works: There is no way to set on demand loading
through the API, so it should be enabled by default.

Task-number: QTBUG-29103
Change-Id: I5146128aaa385dfcc0ad1e0ef81a92d9350ec5f2
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-01-23 19:36:07 +01:00
Pasi Petäjäjärvi
416e73a0fc Check existence of QProcess feature before using it on Qt autotests.
VxWorks does not have QProcess support.

Change-Id: I20ed479125097d468a1aa50afb18c3749f0fbb98
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-23 10:38:59 +01:00
Peter Hartmann
5bc5be22e8 QNetworkReply auto test: also test uploading data via HTTPS
... and not only HTTP.

Change-Id: I1190e07fdacd9bdfb218c8932e0e5e2c0c6fc6ab
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-01-18 17:58:48 +01:00
Sergio Ahumada
48e0c4df23 Update copyright year in Digia's license headers
Change-Id: Ic804938fc352291d011800d21e549c10acac66fb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-18 09:07:35 +01:00
Shane Kearns
7e91b5a2bc Fix incorrectly disabled autotest
One of the IPv6 autotests was always disabled instead of being disabled
only when the system has no IPv6 support.

Change-Id: I34dffbeae6ba85a706bfeb0cc4750a4514b73a65
Reviewed-by: Peter Hartmann <phartmann@rim.com>
2013-01-11 14:01:10 +01:00
Michael Brüning
41acb58f23 Add auto test for HTTP cache fix for QTBUG-28035.
Adds an auto test that verifies that the replies to POST and PUT
requests are not cached even though they contain a max-age header and
that subsequent GET requests are reloaded from the server.

Change-Id: I188ae1200cb5551e164722c0f479719be8d11bfb
Reviewed-by: Peter Hartmann <phartmann@rim.com>
2013-01-08 11:13:27 +01:00
Peter Hartmann
bf5e7fb265 SSL certificates: blacklist mis-issued Turktrust certificates
Those certificates have erroneously set the CA attribute to true,
meaning everybody in possesion of their keys can issue certificates on
their own.

Task-number: QTBUG-28937

Change-Id: Iff351e590ad3e6ab802e6fa1d65a9a9a9f7683de
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2013-01-04 15:19:17 +01:00
Stephen Kelly
330ad41b7d Network: Remove declaration of built-in and automatic metatypes.
These types are either built-in or 'automatically declared' and so
don't need to be explicitly declared as metatypes.

Change-Id: Ifdce72af844901665c4ebab11507216ba5f00fc1
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-01-03 18:19:28 +01:00
Peter Kümmel
8e3d4f5e87 Don't read from deleted member variable
QNetworkProxy::setApplicationProxy deletes factory set by
QNetworkProxyFactory::setApplicationProxyFactory.

Change-Id: Iaafd62d1cdb2045d69c7359cacc513056216826c
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2013-01-03 18:19:28 +01:00
Stephen Kelly
4319f698c8 Remove metatype registration of built-in types.
As they are built-in, they are effectively registered at compile-time
already.

Change-Id: I7ae6ba16088eab5d19213fa7b07c2a7760988a86
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-01-03 16:15:37 +01:00
Sergio Ahumada
83188c6499 test: Change trolltech.com:443 to qt-project.org:443
trolltech.com seems to be shut down already

Change-Id: Ic90ce01aeb51b6f154b9bbf4762c365a398c9e3d
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-01-03 11:32:17 +01:00
Sergio Ahumada
7706c31eaa Fix some typos
Change-Id: I4e8d9bd8ea66ec810e4f1fbfd8ddbf25c4b3d980
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2012-12-21 19:05:02 +01:00