Commit Graph

871 Commits

Author SHA1 Message Date
Friedemann Kleint
49cdf51ac9 Fix some warnings in tests
../tst_qfile.cpp: In member function 'void tst_QFile::handle()':
../tst_qfile.cpp:2661:38: warning: ignoring return value of 'ssize_t read(int, void*, size_t)', declared with attribute warn_unused_result [-Wunused-result]
tst_qstatictext.cpp:862:58: warning: unused parameter 'textItem' [-Wunused-parameter]
../tst_qtcpsocket.cpp: In member function 'void tst_QTcpSocket::abortiveClose()':
../tst_qtcpsocket.cpp:2254:90: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
Test.cpp: In member function 'void My4Socket::read()':
Test.cpp:66:20: warning: 'reply' may be used uninitialized in this function [-Wmaybe-uninitialized]
../tst_qlocalsocket.cpp: In lambda function:
../tst_qlocalsocket.cpp:701:51: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
../tst_qtcpserver.cpp: In member function 'void tst_QTcpServer::linkLocal()':
../tst_qtcpserver.cpp:935:92: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
../tst_qtcpserver.cpp:940:92: warning: suggest parentheses around assignment used as truth value [-Wparentheses]

Change-Id: Ic315069768bcb63a6b333c28ac65b0b992b0d43f
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2016-11-28 13:10:43 +00:00
Friedemann Kleint
7920cfe46a Fix SCTP API according to Qt conventions
inDatagramMode() -> isInDatagramMode()
maxChannelCount -> maximumChannelCount

Change-Id: Ib64bf52cc3b40354927ee11e3f41d47e84c6d9c4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-22 07:13:01 +00:00
Liang Qi
d7e4980132 Merge remote-tracking branch 'origin/5.8' into dev
Blacklist tst_QMenuBar::taskQTBUG46812_doNotLeaveMenubarHighlighted() on macOS.

Conflicts:
	mkspecs/features/mac/default_post.prf
	mkspecs/features/mac/sdk.prf
	mkspecs/features/uikit/default_post.prf
	mkspecs/features/uikit/sdk.prf
	src/angle/src/libEGL/libEGL.pro
	src/platformsupport/fontdatabases/fontdatabases.pro
	src/platformsupport/platformsupport.pro
	src/plugins/platforms/cocoa/qnswindowdelegate.mm
	src/plugins/platforms/direct2d/qwindowsdirect2dintegration.cpp
	src/plugins/platforms/ios/ios.pro
	src/plugins/platforms/ios/kernel.pro
	tests/auto/widgets/widgets/qmenubar/BLACKLIST
	tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp

Task-number: QTBUG-56853
Change-Id: If58785210feee3550892fc7768cce90e75a2416c
2016-11-02 09:24:11 +01:00
Liang Qi
a732576a66 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	config.tests/win/msvc_version.cpp
	configure.pri
	mkspecs/macx-ios-clang/features/default_post.prf
	mkspecs/macx-ios-clang/features/resolve_config.prf
	mkspecs/features/uikit/default_post.prf
	mkspecs/features/uikit/resolve_config.prf
	src/corelib/io/qsettings_mac.cpp
	src/corelib/json/qjsondocument.cpp
	src/plugins/platforms/cocoa/qcocoawindow.h
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/cocoa/qnswindowdelegate.h
	src/plugins/platforms/cocoa/qnswindowdelegate.mm
	src/plugins/platforms/ios/ios.pro
	src/plugins/platforms/ios/kernel.pro
	src/plugins/platforms/ios/qiosintegration.h
	src/plugins/platforms/minimalegl/qminimaleglintegration.cpp
	tests/auto/gui/painting/qpainter/tst_qpainter.cpp
	tools/configure/environment.cpp

Change-Id: I654845e54e40f5951fb78aab349ca667e9f27843
2016-11-01 06:02:55 +01:00
Tor Arne Vestbø
7437ede145 macOS: Don't build auto-tests as application bundles unless explicitly requested
Consistent with other Unix platforms, and internally consistent between tests,
as a lot of tests were already applying CONFIG -= app_bundle manually.

Change-Id: Icd2b7e1c08015b26137af60ff82fddbc753f0ff4
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-23 10:39:56 +00:00
Liang Qi
28628a5d5e Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/plugins/platforms/eglfs/qeglfshooks.cpp

Change-Id: I483f0dbd876943b184803f0fe65a0c686ad75db2
2016-10-22 21:19:57 +02:00
Timur Pocheptsov
512934f7e7 HTTP/2 - fix the handling of PUSH_PROMISE
HTTP/2 allows a server to pre-emptively send (or "push") responses (along
with corresponding "promised" requests) to a client in association with a
previous client-initiated request. This can be useful when the server
knows the client will need to have those responses available in order
to fully process the response to the original request.

Server push is semantically equivalent to a server responding to a request;
however, in this case, that request is also sent by the server, as a
PUSH_PROMISE frame.

The PUSH_PROMISE frame includes a header block that contains a complete set
of request header fields that the server attributes to the request.

After sending the PUSH_PROMISE frame, the server can begin delivering the
pushed response as a response on a server-initiated stream that uses the
promised stream identifier.

This patch:
- fixes the HPACK decompression of PUSH_PROMISE frames;
- allows a user to enable PUSH_PROMISE;
- processes and caches pushed data for promised streams;
- updates auto-test - emulates a simple PUSH_PROMISE
  scenario.

Change-Id: Ic4850863a5e3895320baac3871a723fc091b4aca
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-10-21 14:27:06 +00:00
Kai Koehne
557abfc327 QUrl effective TLDs: update table
There are more than 1000 new entries since the table has been
generated the last time. The autotest needs to be tweaked
because the rules for the .mz domains have changed; use the
.ck domain instead.

Change-Id: Ife692afd46ac41a66604e966e5e8cb57c7aa649c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-10-21 06:29:53 +00:00
Liang Qi
dfc177e3a9 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	qmake/library/qmakeevaluator.cpp
	(cherry picked from commit 1af6dc2c8fb4d91400fddc5050166f972ae57c9a in qttools)
	src/corelib/kernel/qcore_mac_objc.mm
	src/gui/painting/qcolor.h
	src/plugins/platforms/cocoa/qcocoawindow.mm

Change-Id: I5b3ec468a5a9a73911b528d3d24ff8e19f339f31
2016-10-13 09:49:38 +02:00
Liang Qi
ef25620ac1 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	mkspecs/features/mac/default_pre.prf
	mkspecs/features/qpa/genericunixfontdatabase.prf
	mkspecs/features/uikit/default_post.prf
	mkspecs/features/uikit/resolve_config.prf
	mkspecs/macx-ios-clang/features/default_post.prf
	mkspecs/macx-ios-clang/features/resolve_config.prf
	src/corelib/io/qiodevice.cpp

Change-Id: I6f210f71f177a3c3278a4f380542195e14e4b491
2016-10-06 20:12:27 +02:00
Liang Qi
6feec9da93 Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I34b5e290233d0869fbafac094a939aec2bf83fd5
2016-10-05 19:33:26 +02:00
Frederik Schwarzer
c3605980d9 Fix some typos and minor sentence structure issues in docs
Change-Id: Ibede1aeb046e2df6723e3041152bfae22a9fde32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-10-05 15:00:24 +00:00
Oswald Buddenhagen
4a561c6baf remove redundant conditionals regarding ssl
this actually fixes the build when ssl is not enabled, as the openssl
features are in the not included network-private module.

Change-Id: Ibafae9867af493da184a45cf3981628d475d37a6
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-04 08:25:24 +00:00
Marc Mutz
c35eff2ace Add qtest_network.h
... and move toString() implementations there which were repeated in
network tests, or #ifdef'ed in qtest.h.

Since the functions moved from network tests are now in a public header,
had to massage them a bit to pass headersclean:

- replace Q_FOREACH with C++11 range-for
- avoid implicit conversion from QByteArray -> const char* (done by
  re-using toString(QByteArray) instead of calling strdup() manually)

Also made the functions overloads instead of specializations. This
allows to pass the enum by value instead of by const-&.

Like the existing QHostAddress, the newly-added toString() overloads are
marked as \internal. We can decide later whether to turn them into
public API.

Change-Id: I8c23db7a0a6575273567017d42d7b2a957acece8
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-09-29 21:46:19 +00:00
Liang Qi
e66d181e65 Merge remote-tracking branch 'origin/5.8' into dev
Change-Id: I3b51bb706e401edfda09a433c67aa58e44f33e83
2016-09-29 12:58:41 +02:00
Liang Qi
cdb56c42fc Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	mkspecs/features/uikit/xcodebuild.mk
	tests/auto/other/lancelot/tst_lancelot.cpp
	tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
	tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp

Change-Id: Ia0ae2de86094120281abd445138877c2cc3e882c
2016-09-29 00:38:01 +02:00
Liang Qi
e918334045 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/widgets/dialogs/qcolordialog.cpp
	src/widgets/dialogs/qfiledialog.cpp
	tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp

Change-Id: I34bc8a990f8f526889a95a5c7099ef557b9681ad
2016-09-28 11:51:35 +02:00
Timur Pocheptsov
158781ff25 QSslSocket: respect read buffer's max size (SecureTransport)
1. QSslSocketBackendPrivate::transmit was ignoring 'readBufferMaxSize';
as a result, we can have a user trying to set read buffer's size
to a small value (and more important - reading slowly in a small
chunks from this socket), but SSL itself socket reading 'too fast',
potentially growing its internal buffer to a huge size. This also
results in auto-tests failing - whenever we're trying to limit read
rate in some test.

2. Update qsslsocket auto-test.

Task-number: QTBUG-43388
Task-number: QTBUG-55170
Change-Id: Iedece26df0ac5b3b7cad62cc8c98aedc28e7ca5b
Reviewed-by: Richard J. Moore <rich@kde.org>
2016-09-27 10:27:58 +00:00
Liang Qi
eaec2b664a Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	src/gui/painting/qcoregraphics.mm
	src/network/access/qnetworkrequest.h
	src/plugins/platforms/cocoa/qcocoahelpers.mm

Change-Id: I81266414c06ea2edf63cbc7e93a86bd5d66a31a5
2016-09-21 09:11:02 +02:00
Liang Qi
40a1f69e86 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	configure.json
	mkspecs/macx-tvos-clang/qmake.conf
	mkspecs/macx-watchos-clang/qmake.conf

Change-Id: Iaf32339ace59dff9ed344972472744c55d75025c
2016-09-15 19:47:57 +02:00
Lars Knoll
2d3c73fcfe Modularize configure.json/.pri
Move the different parts of configure.json/.pri into the libraries where
they belong.

Gui is not yet fully modularized, and contains many things related to
the different QPA plugins.

Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: I6659bb29354ed1f36b95b8c69e7fce58f642053f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-09-15 08:23:53 +00:00
Edward Welbourne
fdca8cb09e HTTP/2 tests: Remove execute permissions from source files
Source (.cpp and .h) files should not be executable.

Change-Id: I021d8733185d73d071fcaf3df7e529862a490b63
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-09-06 18:33:26 +00:00
Edward Welbourne
02af515528 tst_qnetworkreply: use preprocessor rather than "commenting out"
Debug code is suppressed; let someone investigating a problem be able
to turn it on/off by just editing one byte instead of each line of the
block of debug code.

Change-Id: Iba06df4042d9126d3a5d0873e524ef504c19d3de
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-08-25 08:00:01 +00:00
Edward Welbourne
fc3346cba8 tst_qnetworkreply: use .left(...) in place of .mid(0, ...)
Change-Id: Iaa150788011552e19b239e675862c0224dbcefc9
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-08-25 07:59:54 +00:00
Edward Welbourne
558cb8e6ec tst_qnetworkreply: ditch fatuous 1* on a constant
Change-Id: I0960fccaaf1316b822c26c5c8be1504469a63ddc
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-08-25 07:59:47 +00:00
Edward Welbourne
99d2e0f861 tst_qnetworkreply: condition dereferencing on non-null
The (event) loop member spends most of its time NULL, so make sure
slots that dereference it can't trip up if called asynchronously when
it is.

Change-Id: If634df0ecf9650b52621bdb5a3e9f151abbc18fc
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-08-25 07:59:41 +00:00
Edward Welbourne
2f865adb16 tst_qnetworkreply: purge stray space inside parenthesis
Change-Id: I82c382b4678c3bd8517221c85febdd174f7058d4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-08-25 07:59:34 +00:00
Edward Welbourne
06c7d67e13 tst_qnetworkreply: linearise a succession of checks
Restructure an if { if/else} else chain so that it reads more logically.

Change-Id: I0d9a68451147d2b7e6a6d01cf7bee1a64b9902a7
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-08-25 07:59:28 +00:00
Edward Welbourne
32fbcf71ee tst_qnetworkreply: restructure #if-ery round a condition
If SSL was unavailable but requested (should never happen)
MiniHttpServer::incomingConnection() would have crashed on
dereferencing unset member client.  Rework the run-time conditioning
on SSL to sit entirely inside the #if-ery on SSL support, so that
client is at least set in each code-path.

Change-Id: I9a8ee8e4186e16dd0d00b7f9cc9b988f0b4c62ff
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-08-25 07:59:21 +00:00
Edward Welbourne
0b3509d85d tst_qnetworkreply: deduplicate some code
Moved a line of code that appeared after each call to setupSslServer()
into that function and replaced a copy of its code with a call to it.
Moved a line from the end of both branches of an if/else to after it.

Change-Id: I74ef3e643e41ce0279a6de7f4828baea4423f267
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-08-25 07:59:16 +00:00
Edward Welbourne
d037cb7821 tst_qnetworkreply, coding style: fixes to brace-placement
Many struct, class and function bodies had their open braces on the
declaring line rather than on a line of their own.  Split some lines
up and joined others in the course of resolving.  Removed a stray
semicolon after a constructor body.

Change-Id: I492233ca8c499f13ebe4b7d63349382e5eaa1e19
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-08-25 07:59:10 +00:00
Edward Welbourne
0971a46e50 tst_qnetworkreply: drop semicolon from end of do-while macro body
The whole point of this pattern is that the macro can be used with a
semi-colon after it and be a single statement; if it has a semicolon
in it, that makes it two (so, e.g., using it as the body of an if,
without braces, won't let you follow it with an else).

Change-Id: I57aca35898711ca24e10ddab73e075d361ef7eb8
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-08-25 07:59:04 +00:00
Marc Mutz
2f108fafe9 tst_QSslSocket: clean up
- port Q_FOREACH to C++11 range-for
- port use of inefficient QLists to QVector
- port from QSharedPointer to auto variables except where the
  payload is returned from a function (there ported to
  QSharedPointer::create())

Fixes errors pointed out by my tree's static checks.

In sslErrors(), fixed an unwanted double-detach problem by
adding a strategic qAsConst().

Change-Id: I8148e23b73337f6f1a721e009f2974536d8447cc
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-08-19 19:03:54 +00:00
Timur Pocheptsov
4c27221295 Refactor Http2::FrameReader/Http2::FrameWriter
Introduce  new entity: class Http2::Frame with accessors like
payloadSize/type/flags/streamID etc. (they actually read
/interpret raw bytes from a frame's buffer) instead of
duplicating this functionality in reader/writer classes.
Delete defaulted members and remove explicitly defined
move ctors/operators (not needed actually).

Update auto-test ('HTTP/2 server') to use these new classes.

Change-Id: Ie3516efbd095704e212142eef9e792323678ccfa
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-08-19 16:26:36 +00:00
Lars Knoll
60985aa42b Use qtConfig throughout in qtbase
Use the new qtConfig macro in all pro/pri files.

This required adding some feature entries, and adding
{private,public}Feature to every referenced already existing entry.

Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:28:05 +00:00
Timur Pocheptsov
2e4e73d8d3 HTTP/2 - fix invalid read (auto-test)
Since headersFrame is a reference to a vector's element, clearing this
vector before accessing headersFrame.flags is not a good idea, must be
done later.

Change-Id: I80eee0761ac1cad580e979be9371ec7588a694ac
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-08-17 20:23:59 +00:00
Liang Qi
17198e03ab Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	qmake/doc/src/qmake-manual.qdoc
	src/corelib/global/qglobal.cpp
	src/corelib/tools/qstring.cpp
	src/network/socket/qabstractsocket.cpp
	src/network/socket/qnativesocketengine_unix.cpp
	src/plugins/platforms/eglfs/api/qeglfsglobal.h

Change-Id: Id5dfdbd30fa996f9b4b66a0b030b7d3b8c0ef288
2016-08-16 07:58:32 +02:00
Timur Pocheptsov
bdc16cce79 HTTP/2 - fix QT_NO_SSL build
Recently enabled cleartext fails to build with QT_NO_SSL - fix
test and QNAM.

Change-Id: I467edab8e4eb5113715ad2d3b3022e0d8c027de8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-08-15 07:59:32 +00:00
Liang Qi
6b8f422c5e Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/corelib/global/qglobal.cpp
	src/corelib/io/qsettings.cpp
	src/corelib/itemmodels/qstringlistmodel.cpp
	tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp

Change-Id: I1c6c306ef42c3c0234b19907914b19da706b4a03
2016-08-13 01:05:02 +02:00
Marc Mutz
033ebfae21 QSslDiffieHellmanParameters: make fit for release
- add missing \since 5.8 on free functions
- fix \relates of qHash to point to QSslDHP, not QHash, which is in another module
- API fix: use named instead of unnamed ctors
- share code between ctors
- API fix: add inline move ctor (for now, this requires using a naked d pointer,
  which isn't much of a problem, since the class is immutable).

Change-Id: Ic30f9c3c03b8a3798e0676e38991ead85c587214
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-08-12 12:33:07 +00:00
Timur Pocheptsov
69ff49e8f1 Enable cleartext HTTP/2 and bring the auto-test back to life
HTTP/2 does not require TLS connection, it can work in a cleartext mode.
Plus at the moment only OpenSSL backend  allows HTTP/2 negotiation
via ALPN/NPN (and none of our CI configurations with OpenSSL supports
these extensions, rendering HTTP/2 auto-test useless). This patch
implements cleartext HTTP/2 ('h2c') in 'direct' mode - this is
allowed if a client has a prior knowledge that HTTP/2 is supported by
a server.

Change-Id: I4978775e9732c40bc77f549b83bb4a5d1761887e
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-08-11 15:38:20 +00:00
Marc Mutz
3b0ea78603 tst_QSslSocket::setLocalCertificateChain(): fix resource leak when test fail
The deleteLater() call wasn't reliably reached when tests fail,
so use a QScopedPointer with QScopedPointerDeleteLater deleter.

Change-Id: Ica73bc73c2a0ac1e9b77e4804f2aedcad9b662a0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2016-08-11 04:34:19 +00:00
Liang Qi
8ba384a564 Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I1a63523de158757964b6fb5ea026cf69a6c5ddcf
2016-08-10 17:43:13 +02:00
Liang Qi
22e96c4d34 Merge remote-tracking branch 'origin/5.7' into dev
Change-Id: I36e6b890b65d12bf6931757540bcc9c553b5eb8f
2016-08-09 17:59:51 +02:00
Alex Trotsenko
eb4bcdd8ce QNativeSocketEngine::option(): return a correct value on invalid call
Instead of 'true', it should be '-1'.

Change-Id: I5e8f99153da68d34b37477ef4cedbc447fba347f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-08-05 08:30:18 +00:00
Liang Qi
69ef0481fc Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp

Change-Id: I6f3878b204464313aa2f9d988d3b35121d4d9867
2016-08-05 08:58:48 +02:00
Alex Trotsenko
595c6abf9d QLocalSocket/Tcp: open device before making a connection
According to QLocalSocket's documentation, connectToServer() must
initiate a connection attempt after opening the device. Otherwise, if
a connection succeeds immediately, connected() signal will be emitted
on closed device. So, this patch ensures that TCP-based implementation
behaves correctly.

Change-Id: I4cc9474815e091a1491a429a6dc17f9cf0154f58
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-08-04 15:25:39 +00:00
Alex Trotsenko
733c4de36e Fix some syntax issues in SCTP implementation
Change-Id: I718fd060e313d544a5470fa20183db04ef89b1ca
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-08-03 06:21:47 +00:00
Edward Welbourne
f6fc34294f Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	configure
5.7 now supports clang on android; but dev re-worked configure

	src/gui/kernel/qevent.h
One side renamed a parameter of a constructor; the other added an
alternate constructor on the next line.  Applied the rename to both
for consistency.

	tests/auto/tools/moc/tst_moc.cpp
Each side added a new test at the end.

	.qmake.conf
Ignored 5.7's change to MODULE_VERSION.

	configure.json
No conflict noticed by git; but changes in 5.7 were needed for the
re-worked configure to accommodate 5.7's stricter handling of C++11.

Change-Id: I9cda53836a32d7bf83828212c7ea00b1de3e09d2
2016-08-01 18:20:00 +02:00
Lars Schmertmann
7f77dc84fb Store QSslKey in specific key format to provide more details for key
In a TLS handshake the ephemeral server key is saved in the ssl
configuration. Clients who want to get the length or algorithm of the
key only get "Opaque" and "-1" as a result because the key is always
stored as "Opaque". This change converts the key to specific type so
more details are available and the client don't need to convert the
handle by hand.

Change-Id: I60f90fc2c1805e528640d391b20c676b6eeeb49e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-07-28 14:32:05 +00:00
Alex Trotsenko
75a9bd2a4f Introduce SCTP sockets support
Add protocol-specific code and the QSctpServer, QSctpSocket classes.

Change-Id: Ie9a1d87bd1fda866a2405043d1c15c12ded5a96e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-07-27 06:37:24 +00:00
Alex Trotsenko
aeb36d5292 QAbstractSocket: ensure bind()+connect() works on delayed close
While connecting, the socket goes through the HostLookupState. In
this state, the socket engine is not yet created, unless the socket
had previously been bound. When it has been bound, we should keep
the socket engine even if the user initiates a delayed close by
using the write()+close() sequence.

Change-Id: Iefebcb33cd72cb49617acbac8e02af9d8209c869
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-07-20 11:36:38 +00:00
Edward Welbourne
782ebeada1 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	qmake/library/qmakebuiltins.cpp
	qmake/library/qmakeevaluator.cpp
	qmake/library/qmakeevaluator.h
	qmake/project.h
QMakeEvaluator:
* evaluateConditional(): one side changed return type, the other
  changed a parameter type.
* split_value_list(): one side changed a parameter adjacent to where ...
* expandVariableReferences(): ... the other killed one overload and
  changed the survivor

	src/corelib/io/qlockfile_unix.cpp
One side changed a #if condition, the other moved NETBSD's part of
what it controlled.

	src/corelib/tools/qdatetime.cpp
One side fixed a reachable Q_UNREACHABLE in toMSecsSinceEpoch(), the
other moved it from the private class to the public one, in the midst
of the "short date-time" optimization, which confused diff entirely.
One side changed a QStringLiteral to QLatin1String, the other rewrote
adjoining code.

	src/network/kernel/qauthenticator.cpp
Both rewrote a line, equivalently; kept the dev version.

	src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
	src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
One side changed #if-ery that the other removed.

	tools/configure/configureapp.cpp
One side added a check to -target parsing; the other killed -target.

	tests/auto/testlib/selftests/expected_cmptest.lightxml
	tests/auto/testlib/selftests/expected_cmptest.teamcity
	tests/auto/testlib/selftests/expected_cmptest.txt
	tests/auto/testlib/selftests/expected_cmptest.xml
	tests/auto/testlib/selftests/expected_cmptest.xunitxml
Regenerated using generate_expected_output.py
I note that quite a few other expected_* come out changed, now.

There was no git-conflict in
	src/widgets/kernel/qformlayout.cpp
but it didn't compile; one side removed some unused methods; the other
found uses for one of them.  Put FixedColumnMatrix<>::removeRow(int)
back for its new user.

Change-Id: I8cc2a71add48c0a848e13cfc47b5a7754e8ca584
2016-07-19 20:14:40 +02:00
Jędrzej Nowacki
493d4a0b65 Do not spin cpu unnecessarily in qhttpnetworkconnection test
QTRY_VERIFY seems to be a better solution.

Change-Id: I92f9d11c393d9a464716b9224da1fd9c2be956a7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-07-15 08:57:26 +00:00
Timur Pocheptsov
205ff27260 HTTP2 - autotest
Add autotest for QHttp2ProtocolHandler. This patch contains  a very simplistic
"in-process HTTP2 server" for testing the protocol's basic logic/flow control/error
handling and emulating possible scenarios.

Task-number: QTBUG-50956
Change-Id: Ie02d3329c5182277a3c7c84f1bae8d02308e945d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-07-14 10:20:36 +00:00
Jędrzej Nowacki
aeb64c3e24 Avoid busy wait in qnetworkreply test
Change-Id: Ie45d298cbb2ec3854d3ca3d416b9ebeff6d363f1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-07-13 07:11:36 +00:00
Alex Trotsenko
cddb344f3e QSslSocket: reset connection parameters on disconnect
Otherwise socketDescriptor(), localPort(), localAddress(), peerPort(),
peerAddress(), and peerName() remain uncleared until close() is called.

This could take place when the connection is closed by the remote
endpoint or the user calls disconnectFromHost(). After disconnecting,
connection parameters are no longer valid, while I/O device is still
opened and may have pending data for reading. Usually, the user reads
all incoming data and closes the device independently.

Change-Id: Ic898851c39137faf64019949910f0d94ebb79df7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-07-05 19:21:06 +00:00
Edward Welbourne
b5695bd5be Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: Ibd81cd1df4a0650d93fcb556a57be90be2e1f569
2016-07-04 15:58:39 +02:00
Friedemann Kleint
2714d94ff4 Fix tst_QNetworkReply::qtbug45581WrongReplyStatusCode() on Windows
The file is read using CRLF line convention on Windows.

Task-number: QTBUG-24226
Change-Id: Ie08fa603e29c80a42de4bfbfd1f4237f53c22b98
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-06-30 07:07:11 +00:00
Timur Pocheptsov
72adb7f00c tst_qsslsocket::protocolServerSide - try to fix failing ssl3-* *-ssl3
Test is strangely failing on Ubuntu 16.04 with OpenSSL 1.0.2g-fips.

Change-Id: I1498dee4c1d6db0702da3d3689787aed1e3a633f
Reviewed-by: Richard J. Moore <rich@kde.org>
2016-06-24 18:29:48 +00:00
Liang Qi
b3100fbadd Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/dev 2016-06-21 14:07:10 +00:00
Liang Qi
ea438b2508 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	src/corelib/global/qglobal.cpp
	src/corelib/global/qsysinfo.h
	src/corelib/kernel/qcoreapplication_win.cpp
	src/gui/text/qdistancefield.cpp
	src/gui/text/qdistancefield_p.h
	src/plugins/platforms/windows/qwindowsglcontext.cpp
	src/plugins/platforms/windows/qwindowsglcontext.h

Change-Id: Ib3500acc2b28553bde06758cd9a2e19eb7fe2978
2016-06-21 08:39:41 +02:00
Thiago Macieira
4da2dda2aa Long live QNetworkDatagram!
This commit adds a new class called QNetworkDatagram that encapsulates
the IP packet header and UDP/IP stack metadata along with the actual
payload data. It can be used for both receiving as well as sending data.

It's called QNetworkDatagram so it can be used by QSctpSocket too, when
that lands.

[ChangeLog][QtNetwork] Added QNetworkDatagram class, along with new
function receiveDatagram in QUdpSocket that returns it and an overload
to writeDatagram that can accept it.

Change-Id: Iee8cbc07c4434ce9b560ffff13ca467f425ddc3d
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2016-06-20 16:11:35 +00:00
Liang Qi
e32f1a4d61 Merge remote-tracking branch 'origin/5.6' into 5.7
And blacklisted a few tests in tst_QUdpSocket.

Conflicts:
	src/android/jar/src/org/qtproject/qt5/android/QtNative.java
	src/corelib/global/qglobal.cpp
	src/corelib/global/qsystemdetection.h
	src/corelib/io/qfileselector.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp
	tests/auto/network/socket/qudpsocket/BLACKLIST

Task-number: QTBUG-54205
Change-Id: I11dd1c90186eb1b847d45be87a26041f61d89ef6
2016-06-20 08:00:26 +02:00
Timur Pocheptsov
71f507788b HPACK implementation
Static Huffman coding + HPACK encode/decode algorithm (for HTTP2)
+ auto test.

Change-Id: I85d6269076cc1d586d17c87bcdee49c21522ef78
Task-number: QTBUG-50946
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2016-06-15 11:26:45 +00:00
Timur Pocheptsov
17143bf47c tst_QUdpSocket - remove insignificance
This is the second attempt to remove 'insignificant' from UDP socket test to:
- make changes ending up in regressions more difficult (hopefully impossible)  to merge
- switch to BLACKLIST if needed
- make flaky tests more visible.

For now this 'back to significant' will be accompanied by extended BLACKLIST.
New in BLACKLIST:
* OS X - datagram size-related problems (fixed in 5.7)
* OS X - multicastLeaveAfterClose - will probably stay BLACKLISTED,
  seems to be a Darwin's quirk, can be fixed in OS X >=  10.10.
* windows ...

tst_QUdpSocket::echo seems to fail randomly on OS X/linux and
it looks like it fails at the same time on different machines,
should be something server-related (a guess only).

Change-Id: Ib344348ffab03fab1b9309b80449a04d8ce247c6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-06-14 11:13:50 +00:00
Timur Pocheptsov
23173c725c QSslSocket (OpenSSL) - handle abort/close on sslErrors emitted
If a user's code, attached to sslErrors signal, calls abort/close
or disconnectFromHost but our SSL socket was configured not to verify a peer,
no need to continue handshake after calling checkSslErrors
(and finally crashing on invalid 'ssl' pointer).

Task-number: QTBUG-53906
Change-Id: I7f185511d278f9d6f16e7d6c5ba424707141459c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-06-14 07:29:01 +00:00
Liang Qi
511790fd1a Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	config_help.txt
	configure
	mkspecs/features/uikit/sdk.prf
	src/corelib/global/qhooks.cpp
	src/corelib/io/qfilesystemwatcher.cpp
	src/corelib/io/qlockfile_unix.cpp
	src/corelib/tools/qalgorithms.h
	src/gui/kernel/qwindowsysteminterface.h
	src/gui/text/qtextdocument_p.cpp
	src/network/access/access.pri
	src/network/access/qnetworkaccessmanager.cpp
	src/network/access/qnetworkreplynsurlconnectionimpl.mm
	src/src.pro
	src/testlib/qtestcase.cpp
	src/widgets/kernel/qwidgetbackingstore_p.h
	src/widgets/styles/qwindowscestyle.cpp
	src/widgets/styles/qwindowsmobilestyle.cpp
	tests/auto/corelib/io/qdiriterator/qdiriterator.pro
	tests/auto/corelib/io/qfileinfo/qfileinfo.pro
	tests/auto/gui/kernel/qwindow/BLACKLIST
	tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
	tools/configure/configureapp.cpp

Change-Id: Ibf7fb9c8cf263a810ade82f821345d0725c57c67
2016-06-13 12:46:46 +02:00
Friedemann Kleint
caa4e44937 tst_QTcpSocket: Replace insignification on Windows by BLACKLIST.
Partially reverts f3939d943e.

Task-number: QTBUG-52714
Task-number: QTBUG-49332
Task-number: QTBUG-49333
Change-Id: I1f1b3278134b1e6156c0cb7006d396154c776a46
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-06-10 21:48:54 +00:00
André Klitzing
9466d0e633 Disable QSslDiffieHellmanParameters tests for QT_NO_SSL builds
Change-Id: Ie0b7e9c819ddd1627709f64c30c8d2374bf50c9b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-06-10 13:18:03 +00:00
Liang Qi
57057f76ad Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	.qmake.conf
	config.tests/unix/nis/nis.cpp
	mkspecs/unsupported/freebsd-g++/qplatformdefs.h
	src/corelib/tools/qdatetime.cpp
	src/corelib/tools/qsimd.cpp
	src/corelib/tools/qsimd_p.h
	src/network/access/access.pri
	src/network/access/qnetworkreplynsurlconnectionimpl.mm
	src/network/access/qnetworkreplynsurlconnectionimpl_p.h
	src/plugins/platforms/cocoa/qnsview.mm
	src/plugins/printsupport/windows/qwindowsprintdevice.cpp
	tests/auto/corelib/kernel/qobject/tst_qobject.cpp
	tests/auto/network/access/qnetworkreply/BLACKLIST
	tests/auto/widgets/widgets/qopenglwidget/BLACKLIST

Change-Id: I4b32055bbf922392ef0264fd403405416fffee57
2016-06-06 09:04:55 +02:00
Jake Petroules
95ea1b1aa8 Remove all code paths related to unsupported Apple platforms.
Now that the minimum deployment target (and thus SDK) is 10.9 for OS X
and 7.0 for iOS, all code paths affecting platform versions lower than
the aforementioned are removed.

Change-Id: Id985c7259c4ac069319d88f2c29c9559ae9e8641
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-06-04 09:24:33 +00:00
Timur Pocheptsov
f9b7385e24 tst_qsslsocket::protocolServerSide - blacklist on RHEL 7.2
protocolServerSide test fails with 'ssl3-any' and 'tls1.0-any' combo
on RHEL 7.2 with OpenSSL v1.0.1e-fips, it would work as OPENSSL_NO_SSL2
code-path, but OPENSSL_NO_SSL2 is not defined, so socket is in state
connected while it's expected to be unconnected.

Task-number: QTBUG-53608
Change-Id: Ib321b95129a6ab5b0691b40cb4acc612125633b2
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2016-05-26 10:47:42 +00:00
Timur Pocheptsov
84f8203e38 tst_qsslsocket - re-structure the code
setEmptyDefaultConfiguration - this test (and this was stated explicitly
in comments!) must be the last test to run, otherwise, it can make subsequent
tests fail.

-exitLoop must be in 'protected slots' section not to be executed as a test,
since ... it's aux function, not a test.

Task-number: QTBUG-53608
Task-number: QTBUG-53603
Change-Id: I49d6d57ba927ecc4f20ae2d9325ad02fa46b0922
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2016-05-26 09:40:08 +00:00
Mikkel Krautz
2cf63c71eb Add settable QSslDiffieHellmanParameters for QSslSocket-based servers.
Only the OpenSSL backend is supported right now.

[ChangeLog][QtNetwork][SSL/TLS support] It is now possible to
set custom Diffie-Hellman parameters for QSslSocket-based servers.

Change-Id: I50148873132cd0ec7e414250b107b6b4cbde02ea
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-05-25 20:00:12 +00:00
Edward Welbourne
07667b4390 tst_QNetworkReply: Un-blacklist recently fixed test.
A recent fix now makes
authenticationCacheAfterCancel(http+socksauth)
work again, so un-blacklist it.
Added a helpful comment while I was at it.

Change-Id: I2d7eae8d80c12957d22659a82e5072301735c41f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-05-25 11:12:00 +00:00
Liang Qi
56d6e000f7 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	mkspecs/wince80colibri-armv7-msvc2012/qmake.conf
	qmake/generators/win32/msvc_vcproj.cpp
	src/corelib/global/qnamespace.h
	src/corelib/global/qnamespace.qdoc
	src/corelib/io/qfsfileengine_win.cpp
	src/corelib/tools/tools.pri
	src/network/ssl/qsslconfiguration_p.h
	src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
	src/plugins/platforms/windows/windows.pri
	src/src.pro
	src/tools/bootstrap/bootstrap.pro
	src/tools/uic/cpp/cppwriteinitialization.cpp
	src/widgets/dialogs/qfilesystemmodel.cpp
	tests/auto/testlib/selftests/expected_cmptest.teamcity
	tests/auto/testlib/selftests/expected_cmptest.txt

Change-Id: I4d2ac78f0dcc97f008186bbbc769c6fe588ab0e5
2016-05-23 21:09:46 +02:00
Liang Qi
818014b449 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	configure
	src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
	src/network/access/qnetworkaccessmanager.cpp
	src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h
	src/widgets/widgets/qlineedit_p.cpp
	src/widgets/widgets/qlineedit_p.h
	src/winmain/winmain.pro
	tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp
	tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
	tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h
	tests/auto/testlib/selftests/expected_cmptest.teamcity
	tests/auto/testlib/selftests/expected_cmptest.txt
	tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
	tools/configure/configureapp.cpp

Change-Id: Ib9997b0d0f91946e4081d36c0c6b696c5c983b2a
2016-05-19 12:55:27 +02:00
Timur Pocheptsov
ae975859f9 Revert "tst_qudpsocket - remove insignificant"
This reverts commit 11ad50074b.
Unfortunately, udpsocket strikes back this time on OS X < 10.10 -
never seens these test failing before. Since this prevents 5.6->5.7
merge, I have to revert it until the problem investigated/fixed on OS X.
Alas :(

Change-Id: I52f6512d88c25d2e3071cb845e91faefbd455e27
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-05-13 19:07:56 +00:00
Jesus Fernandez
2ac3fab45f Fixed crash in QAuthenticator::operator==
[ChangeLog][QtNetwork][QAuthenticator] Fixed crash when
comparing a initialized QAuthenticator with an uninitialized
QAuthenticator.

Task-number: QTBUG-53338
Change-Id: Ib8b732b9c65c02ee542885e5d6fe9bd1589a6b1a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-05-13 03:58:06 +00:00
Liang Qi
990969655c Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	config_help.txt
	configure
	src/corelib/io/qprocess_wince.cpp
	src/plugins/platforms/windows/qwindowstheme.cpp
	src/plugins/platforms/xcb/qxcbbackingstore.cpp
	tests/auto/corelib/tools/qtimezone/BLACKLIST
	tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
	tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp

Change-Id: I26644d1cb3b78412c8ff285e2a55bea1bd641c01
2016-05-12 08:33:08 +02:00
Liang Qi
dbef41f43e Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	examples/qtestlib/tutorial5/containers.cpp
	examples/widgets/tools/tools.pro
	src/corelib/io/qprocess.cpp
	src/corelib/io/qprocess_unix.cpp
	src/corelib/io/qprocess_win.cpp
	src/network/kernel/qdnslookup_unix.cpp
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/testlib/qtestcase.cpp
	tools/configure/configureapp.cpp

Change-Id: I838ae7f082535a67a4a53aa13a21ba5580758be8
2016-05-06 15:36:44 +02:00
Timur Pocheptsov
11ad50074b tst_qudpsocket - remove insignificant
BLACKLIST should make it, recent regression in QUdpSocket went unnoticed
(first) because of 'insignificant'. We'd like to avoid such regressions
in future (again, using BLACKLIST if needed and fixig the real problem then).

NB: BLACKLIST in this patch was extended to deal with previously unnoticed failures on
Windows and OS X. 'multicast' and related family of of functions on OS X
will probably stay like this (seems to be a Darwin's quirk), datagram
size related tests - fixed in dev or 5.7 (change is in nativesocket engine,
'bytesAvailable').

Task-number: QTBUG-52714
Change-Id: I039b05935a02983ce1648de449907dfa765f7db7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-05-06 11:59:03 +00:00
Liang Qi
6357813207 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	configure
	src/3rdparty/double-conversion/include/double-conversion/utils.h
	src/corelib/global/qnamespace.qdoc
	src/corelib/tools/qsimd_p.h
	tests/auto/corelib/io/qfile/tst_qfile.cpp

Change-Id: I3ca1007bab5355d251c13002a18e93d81c254d34
2016-05-03 15:49:15 +02:00
André Klitzing
0eaac0a3a9 Add support for PSK on server side
[ChangeLog][QtNetwork][QSslSocket] TLS PSK ciphers are possible in server sockets.

Task-number: QTBUG-39077
Change-Id: Iaa854a6f50242deae5492f2e4759c727488995f5
Reviewed-by: Richard J. Moore <rich@kde.org>
2016-05-02 20:33:00 +00:00
Friedemann Kleint
22a7edd816 tst_QTcpSocket, tst_QUdpSocket: Improve diagnostics.
Add more error messages on failures.

Task-number: QTBUG-25367
Task-number: QTBUG-25368
Change-Id: I064143a058b7b98d9d5eecab8b5da49f5307e1eb
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2016-05-02 19:20:33 +00:00
Alex Trotsenko
a4d26cf522 QWindowsPipeWriter: ensure validity of the write buffer
QWindowsPipeWriter uses asynchronous API to perform writing. Once a cycle
has been started, the write buffer must remain valid until the write
operation is completed.

To avoid data corruption and possibly undefined behavior, this patch
makes QWindowsPipeWriter::write() take a QByteArray, which it keeps alive
for the duration of the write cycle.

Autotest-by: Thomas Hartmann
Task-number: QTBUG-52401
Change-Id: Ia35faee735c4e684267daa1f6bd689512b670cd2
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-04-30 13:13:26 +00:00
Felix Braun
cedc554321 QHostAddress: comparator with flexible conversion rules
Add a named comparison method that allows the caller to
specify in how far a translation between IPv4 and IPv6 should be
performed before comparing.

Change-Id: I9aeffcd4539a6c0537c083c4553357b22167df3f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-04-29 16:25:08 +00:00
Liang Qi
23a36fd2bf Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/corelib/io/qprocess_win.cpp
	src/widgets/itemviews/qheaderview.cpp

Change-Id: I0a59ade9cd6e91f770fdf298a7d72a41e79fd761
2016-04-27 09:18:05 +02:00
Friedemann Kleint
84a49594d0 Windows/tst_QTcpServer: Suppress crash notification of crashingServer.
Suppress message dialog of the test helper as does QTestlib.

Task-number: QTBUG-52714
Change-Id: I5efd7d72f77c7689500ecaccf46f1f9dfb312140
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-04-23 06:09:44 +00:00
Milla Pohjanheimo
dfe8a85e7c Blacklisting autotests that fail on RHEL 7.1 also on RHEL 7.2
Blacklisting those autotests that prevent us to get RHEL 7.2 in the CI.
The same tests have already been blacklisted for RHEL 7.1.

Change-Id: I2aa62647f7bd75681ea9e1d69bc62f9542fda5e2
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
2016-04-15 05:57:02 +00:00
Liang Qi
b94773c9c8 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	config.tests/unix/compile.test
	src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
	src/testlib/qtestcase.cpp
	src/testlib/qtestcase.qdoc

Change-Id: Ied3c471dbc9a076c8de33d673bd557e88575609d
2016-04-13 06:55:37 +02:00
Edward Welbourne
541c9d4d2a tst_QNetworkReply: Commentary fixes on test server workarounds.
Follow-up to commit 6fd205d5: document which version of danted shall
make one work-around redundant, document that another work-around is
still needed even with that v1.1.19; and remove a comment that
referred back to an XFAIL that commit 6fd205d5 removed.

Change-Id: I270b662528127c82184bff20b3cecea4f0c41b41
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-04-12 13:51:58 +00:00
Edward Welbourne
949aaffb4f tst_QNetworkReply: fix mis-guided use of QSKIP().
QSKIP() causes the whole test to be skipped, where this work-around
for a known quirk of the test server only requires skipping a single
Q_COMPARE(); the rest of the test passes fine without it.

Change-Id: Ie4612bd428f4cb4b342fad908cc2784fbadf069c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-04-12 13:25:30 +00:00
Joerg Bornemann
7b4c02d527 Fix finding a helper executable in tst_QLocalSocket
Use QFINDTESTDATA to find the socketprocess helper executable.
Now tst_QLocalSocket::processConnection() passes when started from Qt
Creator without adjusting the working directory.

Change-Id: I97ca3334a381b3cd646647487529bcd90b969528
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-04-11 10:47:26 +00:00
Liang Qi
f34e73a16a Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	src/corelib/kernel/qobject.cpp
	src/gui/painting/qpaintengine_raster.cpp

Change-Id: I74e1779832f43d033708dcfd6b666c7b4f0111fb
2016-04-11 09:12:36 +02:00
Thiago Macieira
8c427e5bdf Autotest: confirm that QHostAddress obeys RFC 5952 recommendations
Change-Id: I0c94a5c2846b48c8aea7ffff1435b8a7ccbd4d9e
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
2016-04-09 05:16:40 +00:00
Liang Qi
ee0951d69b Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/network/access/qftp.cpp
	src/widgets/itemviews/qheaderview.cpp
	src/widgets/itemviews/qlistview.cpp
	tests/auto/network/access/qftp/tst_qftp.cpp

Change-Id: I9f928f25d45d8944dd60bb583f649fc1615bc5d9
2016-04-07 10:47:20 +02:00
Friedemann Kleint
d37239aa41 QFtp: Use UTF-8 encoding.
According to RFC 2640, FTP uses UTF-8 encoding. Fix the conversions
accordingly.

Task-number: QTBUG-52303
Change-Id: I615199b3d074fc3861f25df113dda672525766b6
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2016-04-07 04:25:57 +00:00
Liang Qi
f285687584 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	examples/corelib/ipc/ipc.pro
	src/plugins/platforms/xcb/qxcbbackingstore.cpp
	tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp

Change-Id: Ia006e10ff1732fe78f90138c41f05b59b49486cf
2016-04-05 14:22:45 +02:00
Liang Qi
216f57ef86 Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I35ca979395620e104e50b06366d0869433a4ffc2
2016-04-04 08:59:18 +02:00
Friedemann Kleint
04aa760711 QtNetwork: Remove Windows CE.
Remove #ifdef sections for Q_OS_WINCE and wince .pro file clauses in library,
examples and tests.

Task-number: QTBUG-51673
Change-Id: I3706336395620522ceda414d7437295d9ec64f16
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-03-29 20:28:18 +00:00
Joerg Bornemann
1534297323 Update comment in tst_QLocalSocket::readBufferOverflow
QWindowsPipeWriter doesn't write in a separate thread
anymore.

Change-Id: Id978bfdfa2531be91cce94476ab9b0dff237bd61
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2016-03-24 20:35:18 +00:00
Simon Hausmann
487844fc62 Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I13c7ea6a74eb98606cf45702ae068101943bec6a
2016-03-24 20:37:33 +01:00
Joerg Bornemann
24411e9743 Add a write buffer to QLocalSocket/Win
Commit 0307c008 removed the buffering of data-to-be-written from
QWindowsPipeWriter, because it was assumed that users of this class
(QProcess and QLocalSocket) already buffer data internally.

This assumption was wrong for QLocalSocket. The following sequence
    localSocket->write(someData);
    localSocket->write(someMoreData);
would not write anything on the second write.

Add a write buffer to the Windows implementation of QLocalSocket.

Task-number: QTBUG-52073
Change-Id: I6d0f03a722ec48138cbde3e2f69aae7dafe790d3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-03-24 16:12:46 +00:00
Liang Qi
a02863234d Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	configure
	mkspecs/common/wince/qplatformdefs.h
	src/plugins/platforms/directfb/qdirectfbbackingstore.cpp
	src/plugins/platforms/xcb/qxcbbackingstore.cpp

Change-Id: Ied4d31264a9afca9514b51a7eb1494c28712793c
2016-03-22 07:28:42 +01:00
Timur Pocheptsov
765eab5103 qsslsocket/qsslcontext - add ALPN (OpenSSL only)
Application-Layer Protocol Negotiation (ALPN) - is a reworked revision
of Next Protocol Negotiation (NPN) we have in our OpenSSL code.
Can be used as a part of HTTP2 negotiation during TLS handshake.

Change-Id: I484ec528c81d4887a64749095ec292dfaec18330
Reviewed-by: Richard J. Moore <rich@kde.org>
2016-03-21 15:01:12 +00:00
Liang Qi
6cb8121a44 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/widgets/styles/qgtkstyle_p.cpp
	tests/auto/corelib/io/qtextstream/test/test.pro
	tests/auto/corelib/plugin/plugin.pro

Change-Id: I512bc1b36acf3933ed2b96c00f476ee3819c1f4b
2016-03-21 09:02:57 +01:00
Alex Trotsenko
bec47545dc QAbstractSocket: do not fail writing on read buffer overflow
canReadNotification() could return 'false' if either the socket has
been closed, or the read buffer has reached the maximum size. Because of
this duality, waitForBytesWritten() should not fail as a result of a
canReadNotification() call.

Change-Id: I9a15fa174a3b982a7ce404913caa38fc19f64622
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
2016-03-18 13:05:42 +00:00
Liang Qi
50d0f57b77 Merge remote-tracking branch 'origin/5.6' into 5.7
This change partially reverts 1bfc7f68 about QT_HAS_BUILTIN define
and undef in src/corelib/tools/qsimd_p.h.

This change is also squashed with "Fall back to c++11 standard
compiler flag for host builds" which is done by Peter Seiderer.

Conflicts:
	mkspecs/features/default_post.prf
	src/3rdparty/sqlite/0001-Fixing-the-SQLite3-build-for-WEC2013-again.patch
	src/3rdparty/sqlite/sqlite3.c
	src/corelib/tools/qsimd_p.h
	src/gui/kernel/qevent.cpp
	src/gui/kernel/qwindowsysteminterface.cpp
	src/gui/kernel/qwindowsysteminterface_p.h
	src/plugins/bearer/blackberry/blackberry.pro
	src/plugins/platforms/cocoa/qcocoasystemsettings.mm
	src/plugins/platformthemes/gtk2/gtk2.pro
	src/plugins/styles/bb10style/bb10style.pro
	src/sql/drivers/sqlite2/qsql_sqlite2.cpp
	tools/configure/configureapp.cpp

Task-number: QTBUG-51644
Done-with: Peter Seiderer <ps.report@gmx.net>
Change-Id: I6100d6ace31b2e8d41a95f0b5d5ebf8f1fd88b44
2016-03-11 20:08:50 +01:00
Joerg Bornemann
ac8dae8b5e QLocalServer/Win: Fix race condition in listen().
Suppose a client connects while the QLocalServer is still in the loop
that calls addListener. The connection would SetEvent(eventHandle),
but every call to ConnectNamedPipe would ResetEvent(eventHandle).
Thus, the connection is never detected by the notifier on eventHandle.
  Callers of addListener must check the connection state of every
listener to make sure that no client connected while setting up
listeners.

Task-number: QTBUG-49254
Change-Id: Ia961927ea76973708e6e3f73510695eb5d6a0e4c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-03-10 17:32:49 +00:00
Joerg Bornemann
39efe3c84d Fix glitch in tst_QLocalSocket::sendData
In one code path the test checked for the emission of a readyRead()
signal without waiting for it.
This code path was never hit, neither on Windows nor on Unix platforms.

Change-Id: Ifbe464400a2a1ba8eab49bd60315289040e6bbde
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-03-10 15:03:37 +00:00
Dyami Caliri
f8f1bac3f0 Accept LFCRLF to mark end of HTTP Headers
Some embedded servers use LF to mark the end of an individual header,
but use CRLF to mark the end of all the headers. The GoPro WiFi
interface does this, as an example.

Change-Id: I227ab73622c84f439a6cf8703d020393c4d8bf69
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
2016-03-09 15:47:18 +00:00
Jesus Fernandez
8c86d57e32 Async open file support in QNetworkAccessManager
This change adds support for BackgroundRequestAttribute to local file request. It is useful
when opening files located in network drives where the file open operation could take several
seconds to complete. When this attribute is activated the QNetworkAccessManager::get call
returns the reply immediately and the user has to wait until QNetworkReply::finished signal
is emitted or QNetworkReply::isFinished function returns true.

Task-number: QTBUG-45925
Change-Id: Ie2019dd94fe04253d1ef6874811d7e749a5aad93
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-03-07 18:07:37 +00:00
Fredrik de Vibe
95ea7552a1 Rename test to comply with coding conventions.
Test was inappropriately named according to
https://wiki.qt.io/Writing_Unit_Tests#Naming_of_test_functions_is_important

Task-number: QTBUG-51288
Change-Id: I1c97cee80b5fbf41182b9472ba683862a576b83c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-03-07 15:02:23 +00:00
Fredrik de Vibe
48f25caac4 Check if socketEngine is set before accessing it.
QTcpServer::addPendingConnection() is protected, so it is possible to
add pending connections from a class derived from QTcpServer. This
derived class can get a QTcpSocket from somewhere else, in which case
d->socketEngine will not be set (or used). Given that it is possible to
add pending connections in this scenario, it would make sense to be able
to retrieve them as well.

[ChangeLog][QtNetwork][QTcpServer] Permit using a QTcpServer with
externally created QTcpSocket.

Task-number: QTBUG-51288
Change-Id: I830c10f1a881e2bca4e4ad716d8be865e1c27a9f
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-03-04 08:11:54 +00:00
Tony Sarajärvi
43e535dd6f Blacklist tst_qnetworkreply tests that fail in RHEL 7.1
Task-number: QTBUG-51545
Change-Id: I0f5fdef315f87401ca5e638bce5dd2dbe85bcb83
Reviewed-by: Akseli Salovaara <akseli.salovaara@theqtcompany.com>
2016-03-03 09:17:44 +00:00
Joerg Bornemann
2b2232b5ea Speed up tst_QLocalSocket::sendData
The data function for this test re-used listenAndConnect_data that
has an additional column "connections" which was never used in sendData.
Thus sendData executed three times the same code which is just uselessly
burned CI time.
Copied the actually needed code of listenAndConnect_data to sendData_data.

Change-Id: I6cdb1c1b72cb4ce7be7c13e90eea30ac09a14914
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-03-03 08:25:04 +00:00
Alex Trotsenko
4d0672ed42 Integrate network sockets into the multichannel infrastructure
Change-Id: I96974a7460c29b46cae8a28aadb3e50cdcdb7beb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
2016-03-01 15:35:36 +00:00
Liang Qi
f3060312c8 Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/dev 2016-01-26 19:40:45 +00:00
Liang Qi
a15c3d086d Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
	src/dbus/qdbusconnection_p.h
	src/dbus/qdbusintegrator.cpp
	src/dbus/qdbusintegrator_p.h
	tests/auto/corelib/io/qdir/qdir.pro
	tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp

Change-Id: I3d3fd07aed015c74b1f545f1327aa73d5f365fcc
2016-01-26 16:27:28 +01:00
Timur Pocheptsov
1272bd4d4a qabstractnetworkcache - enable several tests
Remove several test from black-list - they do not seem to fail anymore.

Change-Id: Idb7d6925a4fdea9b47d963e33a455af0afb7b432
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-01-26 13:12:03 +00:00
Liang Qi
0a1af55a9b Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/dev 2016-01-26 11:27:37 +00:00
Thiago Macieira
cfe891eeb8 Add Intel copyright to files that Intel has had non-trivial contribution
I wrote a script to help find the files, but I reviewed the
contributions manually to be sure I wasn't claiming copyright for search
& replace, adding Q_DECL_NOTHROW or adding "We mean it" headers.

Change-Id: I7a9e11d7b64a4cc78e24ffff142b506368fc8842
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-21 22:44:21 +00:00
Jani Heikkinen
f776595cc1 Updated license headers
From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some
exceptions, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/

Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one
(in those files which will be under GPL 3 with exceptions)

Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-21 18:55:18 +00:00
Liang Qi
158a3a4159 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/corelib/io/qiodevice_p.h
	src/corelib/kernel/qvariant_p.h
	src/corelib/tools/qsimd.cpp
	src/gui/kernel/qguiapplication.cpp
	tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp

Change-Id: I742a093cbb231b282b43e463ec67173e0d29f57a
2016-01-21 08:17:21 +01:00
Thiago Macieira
dcc36d7aa3 Autotest: remove the check that broadcast = ip | ~netmask
It's possible to configure an interface so that it isn't the case. I have
no idea if this is a valid scenario, but the unit test shouldn't enforce
that.

ip addr can report:
    inet 192.168.1.1/32 brd 192.168.1.255 scope global vlan0
       valid_lft forever preferred_lft forever

Change-Id: I8de47ed6c7be4847b99bffff141c337575760bd9
Reviewed-by: Richard J. Moore <rich@kde.org>
2016-01-21 05:19:13 +00:00
Liang Qi
8f569c740a Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	config.tests/common/atomic64/atomic64.cpp
	configure
	src/3rdparty/forkfd/forkfd.c
	src/corelib/io/forkfd_qt.cpp
	src/widgets/kernel/qwidgetwindow.cpp
	tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp
	tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
	tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
	tools/configure/configureapp.cpp

Change-Id: Ic6168d82e51a0ef1862c3a63bee6722e8f138414
2016-01-19 10:03:01 +01:00
Alex Trotsenko
294111e25a QHttpSocketEngine: ensure pending EOF triggers a notification
When the remote peer closed the connection, a read notification needs
to always be emitted, otherwise the higher layer does not get the
disconnected signal. From the other side, underlying QAbstractSocket
object could temporarily disable notifications from the engine at
any time. To avoid possible blocking of the socket, take a pending EOF
into account when the read notifications are re-enabled.

Change-Id: Iac9d4e2f790530be3500baf5a2000f1f63df5cc2
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2016-01-18 11:08:34 +00:00
Frederik Gladhorn
ad16478a76 Merge remote-tracking branch 'origin/5.6' into dev
Based on merge done by Liang Qi

Change-Id: Id566e5b9f284d29bff2199f13f9417c660f5b26f
2016-01-08 12:35:24 +01:00
Oliver Wolff
190c76f685 winrt: Use winsock2 API for hostname resolution on WinRT/WinPhone
That API has been available for WinRT and Windows
Phone for some time now. By using it to get the
machine name and for hostname resolution we can get
rid of some winrt-only code and use qhostinfo_win.cpp
on WinRT and Windows phone as well.

Additionally the required capability was added to
tst_qhostinfo so that this auto test can be run without
any manual editing.

Change-Id: I63fa5521bf8cdb0c919bd5a0100ea977c865622a
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2016-01-05 08:14:31 +00:00
Sebastian Lösch
73ad2bf32f Make ephemeral server key available
When using cipher algorithms with forward secrecy an ephemeral key is
used to generate the symmetric session key. Beside the SSL certificate's
key, this ephemeral key is of cryptographic interest.

The ephemeral key is chosen by the server side - currently statically in
the Qt implementation - so it is only of interest on the client side to
check it. Therefore the ephemeral key is the null key if the connection
is set up in server mode or a cipher without forward secrecy is used.

Change-Id: If241247dbb8490a91233ae47f2b38952c6591bf4
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
2016-01-04 18:10:14 +00:00
Alex Trotsenko
6b6955c2ff QAbstractSocket: do not enable read notifications on TCP in bind()
In bind+connect scenario, rejected connection can trigger a read
notification while the socket is opened. But unlike UDP, reading from
the socket engine or emitting a readyRead() signal is not allowed for
the TCP socket in bound or connecting state.

To make a bind+connect scenario work properly, disable the read
notifications until a connection is established.

Task-number: QTBUG-50124
Change-Id: I7b3d015b0f6021fb9ff9f83560478aa5545f41f5
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-12-24 14:05:26 +00:00
Liang Qi
beb65dcd79 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/gui/painting/painting.pri
	src/plugins/platforms/xcb/qxcbconnection.cpp
	tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro
	tests/auto/corelib/tools/qlocale/test/test.pro
	tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
	tools/configure/environment.cpp

Change-Id: I9c40f458b89b2c206de2d2c24e90b5f679c93495
2015-12-18 08:37:31 +01:00
Maurice Kalinowski
acdd57cb43 Fix compilation for WinRT
TEST_HELPER_INSTALLS cannot be used on platforms with no
QProcess support.

Change-Id: I2a6a283d94ca4487fc628449c53fc37140dd291d
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-12-14 08:43:15 +00:00
Friedemann Kleint
1289bc8172 Tests: Remove empty init/cleanup slots, constructors and destructors.
Move some code (like registrations of meta types) from init() to
initTestCase() in the process.

Change-Id: I57db5156647cfadab554fbed853b2e68b2815f3b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-12-10 05:26:05 +00:00
Thiago Macieira
bdd4ddd8fa QNetworkInterface: fix support for address labels on Linux interfaces
Commit 64a1448d87 (Qt 5.2) caused
QNetworkInterface to report address labels (a.k.a. interface aliases) as
separate interfaces. This is caused by the fact that glibc, uClibc and
MUSL copy the address label (netlink address attribute IFA_LABEL) to the
ifa_name field, which made QNetworkInterfaceManager think that it was an
interface it hadn't yet seen.

Address labels are the old way to add more than one IP address to an
interface on Linux, for example:
    ifconfig eth0:1 192.0.2.2

Those do not create a new interface, so the "eth0:1" label maps to the
same interface index as the parent interface. This has been deprecated
for 10 years, but there are still tools out there that add addresses in
this manner.

This commit restores behavior compatibility with Qt 4.2-5.1. The Qt
5.2-5.5 behavior is incorrect because it reports more than one interface
with the same index. On systems configured like the above, the
tst_QNetworkInterface::interfaceFromXXX test was failing.

Change-Id: I8de47ed6c7be4847b99bffff141c2d9de8cf7329
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-12-08 06:32:22 +00:00
Simon Hausmann
3ec31ef9c5 Merge remote-tracking branch 'origin/5.6' into dev
Change-Id: I2532c7f7db5e6cc3ef09753d886279816dd662b2
2015-12-08 07:09:47 +01:00
Friedemann Kleint
d93a4158e0 tst_QLocalSocket::threadedConnection(): Add failure message.
Introduce QVERIFY2() to get some information when exactly it fails.

Change-Id: Icaddf2ecae434d0bafc90c18458c5ee067dfd506
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-12-03 15:03:17 +00:00
Simon Hausmann
ea5f40a788 Merge remote-tracking branch 'origin/5.6' into dev
Change-Id: Ib43c6f126998eefcfed9a7c1f2bcbac8b4dd05ec
2015-11-27 08:27:53 +01:00
Friedemann Kleint
a69c0bb38e tst_QNetworkReply: Fix repetitive invocation of cleanup().
Move the code from cleanup() into a separate cleanupTestData()
and call this from initTestData() and cleanup(). Remove slot init().

Change-Id: I4e7b5b89197ed0aa50f46f730e9c1d9c59749614
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-11-24 15:38:18 +00:00
Louai Al-Khanji
dbb7817e13 Remove remaining support for Blackberry
The platform is no longer supported or actively maintained, and is
in the way for improvements to the Unix event dispatcher and QProcess
implementations.

Change-Id: I3935488ca12e2139ea5f46068d7665a453e20526
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-11-21 15:38:39 +00:00
Tuomas Heimonen
dfc76d57b2 tst_qnetworkcookiejar: Added TESTDATA to .pro file
Change-Id: I49058479765db2cc4dbe25a8c05edfe0af0d7d12
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-11-20 14:41:22 +00:00
Liang Qi
c7934f2489 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/corelib/io/qprocess.cpp
	src/corelib/io/qprocess_unix.cpp
	src/network/kernel/qnetworkinterface_winrt.cpp
	tools/configure/configureapp.cpp

Change-Id: I47df00a01597d2e63b334b492b3b4221b29f58ea
2015-11-18 09:01:51 +01:00
Liang Qi
4e7c0993d5 tests: blacklist the data row which uses internet in tst_qftp.cpp
Task-number: QTBUG-49485
Change-Id: I2e4af34cd148e7aa888bf93cafa012515c5cd504
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2015-11-17 14:47:33 +00:00
Ulf Hermann
7aba75ffc5 Don't let closed http sockets pass as valid connections
A QAbstractSocket can be close()'d at any time, independently of its
current connection state. being closed means that we cannot use it to
read or write data, but internally it might still have some data to
send or receive, for example to an http server. We can even get a
connected() signal after close()'ing the socket.

We need to catch this condition and mark any pending data not yet
written to the socket for resending.

(cherry picked from commit 0df5d07929)
Task-number: QTBUG-48326
Change-Id: I67d9ad36f7288c9c6bef51aa6253d7b187737601
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
2015-11-05 08:40:57 +00:00
Liang Qi
4159ee8405 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	config.tests/unix/ptrsize.test
	configure
	src/corelib/global/qnamespace.h
	src/network/socket/qabstractsocket.cpp
	tests/auto/other/networkselftest/networkselftest.pro

Change-Id: Ic78abb4a34f9068567cea876861d4220f5a07672
2015-11-04 20:18:14 +01:00
Liang Qi
f8246099ea Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	src/corelib/io/qstorageinfo_unix.cpp
	src/plugins/platforms/windows/qwindowsmousehandler.cpp
	src/widgets/styles/qwindowsvistastyle.cpp

Change-Id: Ie1725933815891cc8c86258d4c0e8ed0ab386edf
2015-11-04 12:28:48 +01:00
Timur Pocheptsov
8e43f25edd tst_QNetworkReply::ioGetFromBuiltinHttp - fix for large kernel buffers
On some platforms our 1200 x 1000 bytes seems to be not enough to
fill kernel buffers (socket write). But it's not a reason to fail test,
just skip it.

Task-number:QTBUG-49205

Change-Id: I13ea6f315f9318288ba054cf8bfa6cdd61e489d2
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-11-03 15:33:53 +00:00
Joerg Bornemann
dfaffcbf2a QWindowsPipeReader: fix occasional "Unknown error 995"
After canceling the asynchronous read operation, the
notified() slot receives ERROR_OPERATION_ABORTED.
We must not handle this situation as an error.

This amends commit 5ce567c5.

Task-number: QTBUG-48336
Change-Id: Iff948ceb3ad1f805a9de8c188fbc39ed4c76ba82
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-02 12:38:50 +00:00
Timur Pocheptsov
25717bedfb tst_qudpsocket::multicast - blacklist several combinations
Different multicast tests fail on different platforms for different reasons.
Blacklist them to get rid of insignificant and later fix/un-blacklist.

Change-Id: I91548366c7666478ea1cc446bbf337becfdefd49
Task-number: QTBUG-46612
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
2015-10-30 22:01:50 +00:00
Frederik Gladhorn
0667ba3f24 Disable tst_QSslCertificate::subjectAndIssuerAttributes completely
As a follow-up for 5c1b9bbdf1 disable the
test on all platforms, since it fails on newer openssl. This was now
also happening on Windows, so until a fix is there, skip the test.

Change-Id: I6c8822c0ac5411b1114e9cd426219574ab1c9b54
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-10-29 10:13:57 +00:00
Ulf Hermann
6c72a4a95b Fix building with QT_NO_BEARERMANAGEMENT
Some of the examples make no sense without bearer management and
QNetworkSession is not defined if QT_NO_BEARERMANAGEMENT, so
tst_qnetworkreply.cpp has to be adjusted.

Change-Id: Ic2f73746cba74f670ae5b5e99b0be1461ff6d182
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-10-28 21:25:36 +00:00
Friedemann Kleint
240d768ca6 tests/auto/network: Remove some placeholder formatting.
Use QByteArray/QString addition instead in loops and for
test row names.

Change-Id: I7974ace5b34f2da43e7511044e80de1e733245ac
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-10-19 12:38:28 +00:00
Thiago Macieira
3d52b05a63 Add QNetworkInterface::interface{IndexFromName,NameFromIndex}
These are for faster lookups between ID and name when one doesn't need
the full information set about the interface.

Change-Id: I7de033f80b0e4431b7f1ffff13f98d448a705c3e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2015-10-15 20:32:10 +00:00
Liang Qi
4456984da7 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	tests/auto/corelib/io/qfile/tst_qfile.cpp
	tests/auto/corelib/io/qprocess/tst_qprocess.cpp
	tests/auto/corelib/tools/qversionnumber/qversionnumber.pro

Change-Id: Ia93ce500349d96a2fbf0b4a37b73f088cc505c6e
2015-10-14 15:45:35 +02:00
Friedemann Kleint
f0a559f1c8 Tests: Use QCOMPARE() with QLatin1String() for QString values.
Prefer QCOMPARE over QVERIFY for equality and use QLatin1String().

Change-Id: If226a0fc7b25be3e6774c7e36ca1e6f99234e5dd
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-10-14 08:32:42 +00:00
Liang Qi
b7ac036b72 Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	src/network/socket/qabstractsocket.cpp
	src/plugins/platforms/winrt/qwinrtscreen.cpp
	src/sql/drivers/mysql/qsql_mysql.cpp

Change-Id: Ifb73623d09f53340ee5e10283f1f86b580998902
2015-10-13 23:03:51 +02:00
Friedemann Kleint
a2a00eb044 Tests: Fix single-character string literals.
Use character literals where applicable.

Change-Id: I1a026c320079ee5ca6f70be835d5a541deee2dd1
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-10-13 18:14:27 +00:00
Ulf Hermann
0df5d07929 Don't let closed http sockets pass as valid connections
A QAbstractSocket can be close()'d at any time, independently of its
current connection state. being closed means that we cannot use it to
read or write data, but internally it might still have some data to
send or receive, for example to an http server. We can even get a
connected() signal after close()'ing the socket.

We need to catch this condition and mark any pending data not yet
written to the socket for resending.

Task-number: QTBUG-48326
Change-Id: I6f61c35f2c567f2a138f8cfe9ade7fd1ec039be6
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-10-13 16:40:56 +00:00
Alex Trotsenko
0872156559 QAbstractSocket: fix writing to socket in HostLookup state
After calling connectToHost(), the socket enters HostLookup state. At this
stage, the socket engine was not created yet, and writing to the socket
should result in either data buffering or an error. So, add a check for
d->socketEngine to prevent a crash on unbuffered sockets.

Task-number: QTBUG-48356
Change-Id: I15ea9ce7de97ce6d7e13e358eca5350745b556bb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-10-13 05:20:08 +00:00
Liang Qi
d0eaa737e1 Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	qmake/doc/src/qmake-manual.qdoc
	src/corelib/tools/qstring.h
	src/gui/image/qimagereader.cpp
	src/network/access/qnetworkaccessmanager.cpp
	src/tools/qdoc/doc/examples/examples.qdoc
	src/widgets/accessible/qaccessiblewidgetfactory_p.h
	src/widgets/doc/qtwidgets.qdocconf

Change-Id: I8fae62283aebefe24e5ca4b4abd97386560c0fcb
2015-10-02 16:59:55 +02:00
Friedemann Kleint
9facf1be9b Tests: Always verify whether QTemporaryDir/File creation succeeded.
Use QVERIFY2() with QTemporaryDir/File::errorString() consistently.
Attempt to catch issues like the below warning and follow-up issues.

QSYSTEM: tst_QFiledialog::clearLineEdit() QFileSystemWatcher: FindNextChangeNotification failed for "C:\Users\qt\_____aaaaaaaaaaaaaaaaaaaaaa"  (Access is denied.)

Task-number: QTBUG-47370
Change-Id: I58a6e87c502627e976efa62ad73c912f3b2d49fa
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-09-28 15:05:43 +00:00
Lorn Potter
bb281eea17 Make sure networkAccessibilityChanged is emitted
Task-number: QTBUG-46323
Change-Id: I8297072b62763136f457ca6ae15282d1c22244f4
Reviewed-by: Timo Jyrinki <timo.jyrinki@canonical.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-09-26 19:14:03 +00:00
Liang Qi
a1ad9a74eb Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/corelib/io/io.pri
	src/corelib/io/qdatastream.cpp
	src/corelib/io/qdatastream.h
	src/network/socket/qabstractsocket.cpp
	src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
	src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h
	src/widgets/styles/qgtkstyle.cpp
	tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/qmimedatabase-cache.pro
	tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/qmimedatabase-xml.pro
	tests/auto/dbus/qdbusconnection/qdbusconnection.pro
	tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp
	tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp

Change-Id: I347549a024eb5bfa986699e0a11f96cc55c797a7
2015-09-25 14:02:04 +02:00
Thiago Macieira
d691c50072 Autotest: Make tst_QNetworkInterface::interfaceFromXXX data-driven
Change-Id: I7de033f80b0e4431b7f1ffff13f98c015ae37dc6
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-09-13 18:54:10 +00:00
Thiago Macieira
d878107001 Declare QNetworkAddressEntry and QNetworkInterface as metatypes
Change-Id: I7de033f80b0e4431b7f1ffff13f98c092ea3ba3e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-09-13 18:54:09 +00:00
Alex Trotsenko
378e26dd14 QUdpSocket: avoid infinite read notifier blocking
There was a small amount of time between the last readDatagram() call
and disabling a read notifier in case the socket had a pending
datagram. If a new datagram arrived in this period, this qualified as
absence of a datagram reader. Do not change the read notifier state
because it is disabled on canReadNotification() entry and always enabled
by the datagram reader.

Thanks to Peter Seiderer, who investigated the same: "Querying
hasPendingDatagrams() for enabling/disabling setReadNotificationEnabled()
is racy (a new datagram could arrive after readDatagam() is called and
before hasPendingDatagrams() is checked). But for unbuffered sockets the
ReadNotification is already disabled before the readReady signal is
emitted and should be re-enabled when calling read() or readDatagram()
from the user."

However, this patch does not completely solve the problem under Windows,
as the socket notifier may emit spurious notifications.

Task-number: QTBUG-46552
Change-Id: If7295d53ae2c788c39e86303502f38135c4d6180
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-10 12:50:58 +00:00
Alex Trotsenko
5237b97f26 QAbstractSocket: discard input data when opened only for writing
A buffered TCP socket might be open only for writing purpose. As a
possible use case of the API, this patch avoids accumulation of
unwanted data in the internal read buffer.

Change-Id: I2759c1e04968d24e2ae71f3eca05e7e560cd8a41
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-05 18:12:00 +00:00
Friedemann Kleint
76cf88157f Tests: Remove CONFIG += parallel_test.
The keyword no longer has a meaning for the new CI.

Change-Id: Ibcea4c7a82fb7f982cf4569fdff19f82066543d1
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-09-05 07:16:50 +00:00
Friedemann Kleint
51e501fa8d Remove QT_DISABLE_DEPRECATED_BEFORE=0 from tests not using deprecated API.
Change-Id: I1955320e7639760b4383a53f37a506c8055933ef
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-09-01 16:57:46 +00:00
Liang Qi
afab1546a7 Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	qmake/doc/snippets/code/doc_src_qmake-manual.pro
	qmake/doc/src/qmake-manual.qdoc
	src/corelib/io/qstorageinfo_unix.cpp
	src/corelib/tools/qbytearray.cpp
	src/widgets/kernel/qwidgetwindow.cpp
	tests/auto/corelib/io/qprocess/tst_qprocess.cpp
	tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
	tests/auto/network/access/qnetworkreply/BLACKLIST

Change-Id: I9efcd7e1cce1c394eed425c43aa6fce7d2edf31c
2015-08-26 20:06:57 +02:00
Thiago Macieira
5b38454714 Autotest: Print errno in case of failure
Change-Id: I7de033f80b0e4431b7f1ffff13fc4a02e1c1a2a5
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-22 22:26:27 +00:00
Thiago Macieira
89efa7333d QAbstractSocketEngine: introduce QIpPacketHeader for datagrams
This commit changes the readDatagram() and writeDatagram() virtual
functions to take a QIpPacketHeader as meta data, instead of a
QHostAddress/quint16 pair. As previously, the header is an "out"
parameter for readDatagram() and an "in" parameter for writeDatagram().

The header pointer in readDatagram() is allowed to be null if the
PacketHeaderOptions indicates WantNone. Otherwise, it must not be null.
The extra options parameter is introduced because we may not always want
all the metadata upon reception. For sending, we know what to include or
not based on what's set in the incoming header parameter.

QIpPacketHeader splits sender and destination because we'll be able to
return both on datagram reception.

Change-Id: Iee8cbc07c4434ce9b560ffff13ca4213255008c7
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-22 22:26:23 +00:00
Timur Pocheptsov
f3898fe2cc tst_qnetworkreply::ioGetFromBuiltinHttp - fix blacklisted test (OS X)
This test fails on OS X: we first fill sockets' kernel buffers and then
we tryto write a 'residue', waiting in 'select' for 2 seconds.
It looks like on OS X (at least, 10.10) 2 seconds are not enough - we always have a timeout.
Wait ... 4 seconds.

Change-Id: Id679dccda10b8f7859b8dfa6456b91ec13d52f68
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-20 07:09:45 +00:00
Thiago Macieira
dd92002416 QHostAddress: Improve code generation
Mostly related to IPv6, because Q_IPV6ADDR is an array of char, so the
compilers were generating byte access to each value. Instead, force
access as 32- and 64-bit in most places that make sense (64-bit access
decays to 32-bit on 32-bit machines). In one isLoopback(), this is now a
128-bit access for best improvement.

Some smaller improvements relating to SpecialAddress by combining the
three IPv4 special addresses.

Change-Id: I7de033f80b0e4431b7f1ffff13f932b1cd7b5d21
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-19 06:13:33 +00:00
Oliver Wolff
ec4426fada WinRT: Skip unsupported multicast UDP socket tests
Change-Id: I69f756ad829569060ae9931748b940842d23a6ea
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-08-17 08:07:49 +00:00
Oliver Wolff
265cda469f tst_qudpsocket: Do not crash if no testserver address could be found
Change-Id: Ica61974b20b848997c8ab101abde4b536814ba83
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-08-17 08:07:46 +00:00
Thiago Macieira
3bfba054cb Add QHostAddress::isMulticast
This complements QHostAddress::isLoopback. The only missing check now is
for the "Any" address types, though operator== is quite fast nowadays.

Change-Id: Iee8cbc07c4434ce9b560ffff13cc2691e15014b6
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-15 04:35:42 +00:00
Thiago Macieira
060b7ffe5b QtTest: Add QHostAddress support for QCOMPARE failures
Change-Id: Iee8cbc07c4434ce9b560ffff13cc6dad04a5a554
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-15 04:35:34 +00:00
Oswald Buddenhagen
a47cd2cc82 Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5 2015-08-12 09:53:52 +00:00
Simon Hausmann
9fe0ff082c Extend QNetworkReply test exclusion on OS X
The test is very flakey in 5.5 integrations and the OS X CI machines have
notorious problems with networking stability. So the previously listed tests
are not really at fault, it's an infrastructure problem, that we choose to
ignore for the time being.

Change-Id: I7fbfa7b3778daa6b5e60d95b822847c92927122f
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-08-10 06:54:11 +00:00
Timur Pocheptsov
5bfac9d653 Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/dev 2015-08-09 07:06:52 +00:00
Timur Pocheptsov
9861d2bf14 QSslCertificate - skip tests failing with generic QSslCertificatePrivate
SecureTransport does not implement QSslCertificatePrivate thus some
tests relying on generic version fail. Skip them for now.

Change-Id: I483340b37786a8a556e954b2c538e4f48a342be9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-08-08 22:50:50 +00:00
Frederik Gladhorn
77da617dc8 Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	doc/global/qt-cpp-defines.qdocconf
	src/3rdparty/forkfd/forkfd.c
	src/corelib/codecs/qtextcodec.cpp
	src/corelib/kernel/qmetatype.cpp
	src/corelib/tools/qset.qdoc
	src/gui/accessible/qaccessible.cpp
	src/gui/image/qpixmapcache.cpp
	src/opengl/qgl.cpp
	src/tools/qdoc/generator.cpp
	src/widgets/kernel/qwidget.cpp
	tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp

Change-Id: I4fbe1fa756a54c6843aa75f4ef70a1069ba7b085
2015-08-06 10:54:01 +02:00
Simon Hausmann
5c1b9bbdf1 Blacklist test failing due to too new OpenSSL version
As advised by Rich :)

Change-Id: I76c425e840419bc68762628e401b3e51c62c8da9
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-06 06:17:15 +00:00
Timur Pocheptsov
f8f357c0e9 QSKIP SSL-session related tests (SecureTransport backend)
A couple of test always fail on OS X/iOS with SecureTransport
(simply not implemented yet).

Change-Id: Idd82262512938c36b657b497751738fdc804c182
Reviewed-by: Jeremy Lainé <jeremy.laine@m4x.org>
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-05 09:39:40 +00:00
Jani Vähäkangas
789c9954c7 Blacklist some cases from tst_qftp
Also removed the XFAIL from connectToUnresponsiveHost

Change-Id: Ie0f5685a8fa437c00d22f9e76b51ac61347ce03b
Task-number: QTBUG-15111
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
2015-08-03 06:54:21 +00:00
Friedemann Kleint
57dbdcd92f tests/auto/network: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).
- Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer).
- Replace Q[TRY]_VERIFY(smartPointer == 0)  by
          Q[TRY]_VERIFY(smartPointer.isNull()).
- Replace Q[TRY]_VERIFY(a == b) by  Q[TRY]_COMPARE(a, b) and
  add casts where necessary. The values will then be logged
  should a test fail.

Change-Id: Icaa1edafcc6e2779fbd6dbc2c058544d6e07f1e9
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-07-31 04:29:33 +00:00
Jeremy Lainé
d113073203 ssl: add test certificates with DSA and EC keys
The QSslCertificate tests only covered certificates with RSA keys, this
extends the test coverage to DSA and EC keys.

Change-Id: Ibee26f449cf6c1d97cbac6b511972eb44d6f0bd2
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-07-30 11:31:40 +00:00
Jeremy Lainé
ce87d82d4a ssl: fix comment typo in QSslSocket tests
The comment about non-OpenSSL backends not reproting a specific error
for self-signed certificates contained a typo, this fixes it.

Change-Id: I3010981d5d87d68ebf5e984c003b8bbbfb019b96
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
2015-07-28 19:06:05 +00:00
Jeremy Lainé
2d43f8b79b ssl: fix QNAM self-signed certificate test for non-OpenSSL backends
Non-OpenSSL backends are not able to report a specific error code
for self-signed certificates.

Change-Id: I56bf130335b2afa65cf2bd5248a40ac0e32f74c2
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-07-28 19:05:55 +00:00
Friedemann Kleint
18a2d9438f tst_qhostaddress: Add braces to initialization of a Q_IPV6ADDR.
Fix warning:

tst_qhostaddress.cpp:319:38: warning: suggest braces around initialization of subobject [-Wmissing-braces]
    Q_IPV6ADDR localhostv4mapped = { 0, 0, 0, 0,  0, 0, 0, 0,  0, 0, 255, 255,  127, 0, 0, 1 };
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Change-Id: I9e00300413bfd9ac393c61adf8eb773009ed969d
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
2015-07-28 13:19:26 +00:00
Friedemann Kleint
4b8cda8a36 Tests: Remove some unused member variables.
Fix warnings:

tst_qtcpsocket.cpp:245:9: warning: private field 'numConnections' is not used [-Wunused-private-field]
    int numConnections;
        ^
tst_qtcpsocket.cpp:1834:9: warning: private field 'exitCode' is not used [-Wunused-private-field]
    int exitCode;

tst_qcheckbox.cpp:86:10: warning: private field 'tmp' is not used [-Wunused-private-field]
    uint tmp;
         ^
tst_qcheckbox.cpp:88:10: warning: private field 'tmp2' is not used [-Wunused-private-field]
    uint tmp2;

Below warning is caused by code #ifdefed for OS X only, make it a local variable:
tst_qlabel.cpp:114:16: warning: private field 'test_edit' is not used [-Wunused-private-field]
    QLineEdit *test_edit;

Change-Id: I53c755545fe2e7ca1f053f40c8c0e50aec2efcdd
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
2015-07-28 13:19:07 +00:00
Friedemann Kleint
c067c012dc Tests: Replace Q[TRY]_VERIFY(v == true|false) by QVERIFY(v)|QVERIFY(!v).
Preparing the replacement of Q[TRY]_VERIFY(a == b) by
Q[TRY]_COMPARE(a, b) for non-boolean types.

Change-Id: Iab6ec2f0a89a3adc79e18304573994965013dab5
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
2015-07-27 12:09:19 +00:00
Jeremy Lainé
49fee77ccc ssl: add openssl-based QSslKeyPrivate::encrypt / decrypt
This adds an OpenSSL-based implementation of the QSslKeyPrivate encrypt
and decrypt method. This puts both the OpenSSL-based and non-OpenSSL
backends (WinRT for now) on par.

Change-Id: I18a75ee5f1c223601e51ebf0933f4430e7c5c29b
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-07-20 15:51:02 +00:00
Oswald Buddenhagen
68316e6584 Merge remote-tracking branch 'origin/5.4' into 5.5
Conflicts:
	doc/global/manifest-meta.qdocconf
	src/corelib/global/qnamespace.qdoc
	src/corelib/io/qstorageinfo_unix.cpp
	src/corelib/tools/qtools_p.h
	src/sql/drivers/psql/qsql_psql.cpp

Change-Id: I23a15ac84e03ad61d865e3df872b013eb0752949
2015-07-17 17:53:19 +02:00
Thiago Macieira
58e4bbc83f tst_QUdpSocket: send two bytes in a datagram
I'm getting an error with WSARecvFrom in nativeBytesAvailable() and I
don't know why. The number of bytes obtained is correct and the test
works for 2 bytes, so let's use that.

The Windows nativeBytesAvailable() function has a comment saying that
WSAIoctl sometimes indicates 1 byte available when there's a pending
error notification, so that function proceeds to do a WSARecvFrom to
peek the number of bytes. Somehow that function in this test is getting
a SOCKET_ERROR I can't explain.

Change-Id: Ic5b19e556e572a72a9df9a405b1fee3b7efb8b24
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-07-17 15:49:32 +00:00
Frederik Gladhorn
a2c829f339 Disable spdy test on Windows
The test is crashing regularly (see bugreport).
Currently the test is not run in the regular CI system, that is why
the failures were not noticed.

Task-number: QTBUG-47128
Change-Id: I70d4ada0872316cc63d7629bb9ab2d055d70cf2a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-07-10 16:38:07 +00:00
Markus Goetz
eae0cb09f1 Network: Fix up previous corruption patch
This is a fix-up for cff39fba10.
That patch lead to some internal state issues that lead to the QTBUG-47048
or to QNetworkReply objects erroring with "Connection Closed" when
the server closed the Keep-Alive connection.

This patch changes the QNAM socket slot connections to be DirectConnection.
We don't close the socket anymore in slots where it is anyway in a closed state
afterwards. This prevents event/stack recursions.
We also flush QSslSocket/QTcpSocket receive buffers when receiving a disconnect
so that the developer always gets the full decrypted data from the buffers.

[ChangeLog][QtNetwork] Fix HTTP issues with "Unknown Error" and "Connection Closed"
[ChangeLog][QtNetwork][Sockets] Read OS/encrypted read buffers when connection
closed by server.

Change-Id: Ib4d6a2d0d988317e3a5356f36e8dbcee4590beed
Task-number: QTBUG-47048
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-07-08 10:02:27 +00:00