Commit Graph

7903 Commits

Author SHA1 Message Date
Thiago Macieira
883dfb3d15 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/widgets/kernel/qwidget.cpp

This merge also extends the expected output of the pairdiagnostics
teamcity output (added in dev in commit
c608ffc56a) after the recent addition of
the flowId attribute to the teamcity output (commit
8f03656211 in 5.9).

Change-Id: I3868166e5efc45538544fffd14d8aba438f9173c
2017-08-08 11:48:10 +02:00
Simon Hausmann
b75bc0f75c Fix failing network cookie jar tests
The test verifies that a cookie with a date in the future is not
"expired" and will be sent to the server. This test started failing
on August 7th 2017 when the test case "0003" with it's cookie expiring
August 7th 2017 started ... expiring ;-)

Bumped all suspicious cookie test cases by a hundred years.

Change-Id: I7c09069ec4999e2ea0aae7b2a2819cced0fd6a99
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2017-08-07 19:19:13 +00:00
Simon Hausmann
ea9032ceaa Revert "Ignore thaiZWJ failure on RHEL 7.2"
The blacklisting is not needed anymore as we now use -qt-harfbuzz.

This reverts commit b36e5faad4.

Task-number: QTQAINFRA-1363
Change-Id: I3ae50588204b27e6880416ae2cbc28dda53bb292
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2017-08-07 07:18:26 +00:00
Thiago Macieira
5a9b1425e1 QFileSystemEngine/Unix: rework the getting of nsec-precision file times
It was working on Linux because _GNU_SOURCE gets us POSIX.1-2008
compatibility, but not on macOS or the BSDs. There, we were still stuck
to full second precision.

This commit uses the template trick introduced by the futimes code
(which itself was inspired by commit 2fb42eb4af
in QtNetwork). Also note how it adds support for birth time, if the
system's stat struct has that information.

Tested to work on MacOS and FreeBSD. The manual filetest produces:
 Name:   .
 Path:   . (/usr/home/tjmaciei/src/qt/qt5)
 Size:   1536    Type: Directory
 Attrs:   readable writable executable hidden nativepath
 Mode:   drwxr-xr-x
 Owner:  tjmaciei (1001) Group:  tjmaciei (1001)
 Access: 2017-07-13T20:03:47.916
 Birth:  2017-07-13T20:03:47.916
 Change: 2017-07-13T20:04:41.648
 Modified: 2017-07-13T20:04:41.648

Linux will require support for statx(2).

Change-Id: I8d96dea9955d4c749b99fffd14cd97d7a8c6d45d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-08-06 23:14:26 +00:00
Eskil Abrahamsen Blomfeldt
9342a8b843 Add QTextOption/QTextEdit/QPlainTextEdit::tabStopDistance property
In Qt, we have QTextOption::tabStop, QTextEdit::tabStopWidth and
QPlainTextEdit::tabStopWidth.

Neither are very good names, since the tab stop is neither a
numerical value as in the former, nor does it have any dimensions
that can be measured, as in the latter. Vertical text advances
may also be supported by Qt at some point in the future, at
which point the name would make even less sense.

At the same time, we expose the actual type of the tab stop
distance as floating point in the QTextEdit and QPlainTextEdit
API instead of always rounding it to an int.

To avoid duplicating either of these APIs in Qt Quick, we
introduce tabStopDistance as the common term instead and deprecate
the old names.

[ChangeLog][Text] Introduced tabStopDistance property in
QTextOption, QTextEdit and QPlainTextEdit as replacement for
the inconsistently named tabStop and tabStopWidth properties.
QTextOption::tabStop, QTextEdit::tabStopWidth and
QPlainTextEdit::tabStopWidth have subsequently been deprecated.

Change-Id: Ib7e01387910cddb58adaaaadcd56c0e69edc4bc2
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-08-06 08:16:06 +00:00
Thiago Macieira
6c3a3d498a Filesystem: Use "birth time" to avoid confusion with Unix ctime
The Unix stat fields "st_ctime" and "st_ctim" mean "change time", the
last time that the file/inode status fields were changed. It does not
mean "creation time". So this commit splits all of the internal API to
"birth" and "metadata change" instead of "creation" to avoid the
conflict.

Change-Id: I149e0540c00745fe8119fffd1463fe78b619649e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-05 16:41:38 +00:00
Thiago Macieira
261c6713bd Introduce QFileInfo::birthTime and metadataChangeTime
[ChangeLog][QtCore][QFileInfo] Deprecated created() because it could
return one of three different file times depending on the OS and
filesystem type, without the ability to determine which one is which. It
is replaced by metadataChangeTime() and birthTime().

[ChangeLog][QtCore][QFileInfo] Added QFileInfo::metadataChangeTime(),
which returns the time the file's metadata was last changed, if it is
known, and falling back to the same value as lastModified() otherwise.
On Unix systems, this corresponds to the file's ctime.

[ChangeLog][QtCore][QFileInfo] Added QFileInfo::birthTime(), which
returns the file's birth time if it is known, an invalid QDateTime
otherwise. This function is supported on Windows and on some Unix
systems.

Change-Id: I0031aa609e714ae983c3fffd1467bd8b3e3a593d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-08-05 16:41:32 +00:00
Borgar Ovsthus
8f03656211 Add flowId to messages when logging in TeamCity format
Added flowId='name' to each message when using TeamCity logging format.
This is necessary to distinguish separate processes running in parallel.

[ChangeLog][QtTest] Added flowId to messages when logging in TeamCity
format. FlowId is used to distinguish logging from multiple processes
running in parallel.

Change-Id: I7f5046c1058ff02770404caa2c9b3a5398f97f6b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-04 18:48:48 +00:00
Eirik Aavitsland
51edf8a2b2 Fix compilation of manual lance test
Commit 32a94e54 changed the API of the QPS engine (PaintCommands
class). Update the usage accordingly.

Change-Id: Ide57609e636dad0aa434d1049b600b72f731bc30
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-08-04 18:48:29 +00:00
Thiago Macieira
4934138be2 Allow QSettings to synchronize non-atomically
This is required so that one can use QSettings in situations that
temporary files or renaming may not work.

[ChangeLog][QtCore][QSettings] Added setAtomicSyncRequired(), which
allows one to use QSettings with config files in unwriteable directories
or in Alternate Data Streams on NTFS on Windows. This used to work
before Qt 5.4, but remains a non-default behavior due to the potential
of data corruption.

Task-number: QTBUG-47379
Change-Id: I81480fdb578d4d43b3fcfffd14d4f77112f0402f
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2017-08-04 17:30:16 +00:00
Thiago Macieira
66500b9d75 Support Alternate Data Streams in QSaveFile
We can't use MoveFile to do atomic commits on an ADS, so QSaveFile needs
to detect when the target name is ADS and then use the direct fallback
mode.

[ChangeLog][QtCore][QSaveFile] Saving to Alternate Data Streams on NTFS
on Windows is now possible, but requires setDirectWriteFallback(true).

Task-number: QTBUG-47379
Change-Id: I81480fdb578d4d43b3fcfffd14d4bc062ae1750d
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2017-08-04 17:30:13 +00:00
Thiago Macieira
3d6cbe3409 Long live QTemporaryFileName!
So we can use it in QTemporaryFile, QTemporaryDir and QFile::rename()

[ChangeLog][QtCore][QTemporaryDir] The class now supports the "XXXXXX"
replacement token anywhere in the template, not just at the end. This
behavior is similar to what QTemporaryFile supports.

Change-Id: I1eba2b016de74620bfc8fffd14ccb645729de170
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-08-04 17:30:03 +00:00
Allan Sandfeld Jensen
74197140be Implement conversion from nullptr QVariant to QString and QByteArray
A nullptr QVariant should become a null QString or QByteArray,
since null strings have previous in our APIs represented the null value
in the absence of a dedicated null metatype.

Change-Id: I3b8f6386ece314d7c196959fbcf042c4fe0508a0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-04 11:19:44 +00:00
Edward Welbourne
fbe84a1a19 Add a test that we can read SQL time-stamps
Based on a test-case from Israel Lins Albuquerque, that my planned
fixes to our parsing of ISODate date-times would break.

Change-Id: I5658df9c7daed59d43aa5574df25d4d9eac4677d
Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-04 11:19:39 +00:00
Edward Welbourne
a9c111ed8c Clean-up in QDateTime's parsing of ISODate{,WithMs}
Actually check that there's a T where ISO 8601 wants it (instead of
just skipping over whatever's there), with something after it; move
some declarations later; add some comments; and use the QStringRef API
more cleanly (so that it's easier to see what's going on).  Simplify a
loop condition to avoid the need for a post-loop fix-up.

This incidentally prevents an assertion failure (which brought the
mess to my attention) parsing a short string as an ISO date-time; if
there's a T with nothing after it, we won't try to read at index -1 in
the following text.  (The actual fail seen had a Z where the T should
have been, with nothing after it.)

Add tests for invalid ISOdate cases that triggered the assertion.

Change-Id: Ided9adf62a56d98f144bdf91b40f918e22bd82cd
Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-04 11:19:35 +00:00
Kevin Ottens
b6c3f55b93 GLSL 1.00 ES must be selected using "#version 100"
I was mistaken before, the "es" part for that version isn't optional, it
*must* be omitted.

Change-Id: I9e83d2317523fb0a905e40b95a56033cf693b93b
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
2017-08-04 11:19:30 +00:00
Allan Sandfeld Jensen
f2c6e10ad5 QVariants of null pointers should be null
Changes the QVariant::isNull() implementation for
pointer types so they return true if null.

[ChangeLog][QVariant] QVariants containing pointers will now return
true on isNull() if the contained pointer is null.

Change-Id: I8aa0dab482403837073fb2f376a46126cc3bc6b2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-04 11:19:25 +00:00
Thiago Macieira
b12fd1fa9d Long live qEnvironmentVariable()
[ChangeLog][QtCore] Added qEnvironmentVariable, which returns the value
of an environment variable in a QString, while qgetenv continues to be
used to return it in a QByteArray. For Unix, since most environment
variables seem to contain path names, qEnvironmentVariable will do the
same as QFile::decodeName, which means NFC/NFD conversion on Apple OSes.

I opted not to #include <qfile.h> from qglobal.cpp to implement that
QFile::decodeName functionality, so qglobal.cpp doesn't depend on
corelib/io and to avoid possible recursions.

Task-number: QTBUG-41006
Change-Id: I14839ba5678944c2864bffff141794b8aaa7aa28
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-04 11:19:13 +00:00
Simon Hausmann
1f4fd599a8 Ignore thaiZWJ failure on RHEL 7.2
The test fails when the system harfbuzz (version 1.3.2) is installed.

Change-Id: Id18a5a3c503f64ef56567d71655e433a46908b3f
Task-number: QTQAINFRA-1363
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2017-08-04 11:18:50 +00:00
Simon Hausmann
b36e5faad4 Ignore thaiZWJ failure on RHEL 7.2
The test fails when the system harfbuzz (version 1.3.2) is installed.

Change-Id: Id18a5a3c503f64ef56567d71655e433a46908b3f
Task-number: QTQAINFRA-1363
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2017-08-04 08:36:36 +00:00
Raschbauer, Reinhard
52c66e8515 QAbstractItemView: fix nullptr violation
If in a slot connected to QAbstractItemView::clicked
QAbstractItemView::setModel(nullptr) is called the method
QAbstractItemView::mouseReleaseEvent will cause a segmentation fault.
The problem is that the method QAbstractItemView::model used in
QAbstractItemView::mouseReleaseEvent will return a nullptr if a null
model was set. The solution is to used d->model since it is always a
valid model. (See line d->model =
(model ? model : QAbstractItemModelPrivate::staticEmptyModel());
in method QAbstractItemView::setModel)

Change-Id: I6f01bdeac64495ee4a76adcc7bf8da8a7719ef4d
Reviewed-by: David Faure <david.faure@kdab.com>
2017-08-04 08:36:29 +00:00
Friedemann Kleint
959cc53b61 tst_NoQtEventLoop: Pass with High DPI scaling active
- Determine window sizes according to screen size and turn off
  scrolling.
- Center the window to get it out of the way of taskbars.
- Make the window top-most.
- Turn off scaling so that coordinates passed to the QWindow
  child match device coordinates and the child is positioned
  correctly.
- Make the child window a yellow raster window for easier
  debugging.

Task-number: QTBUG-45956
Change-Id: I05864770f8ed638d0a36f3e3f2afed73d2952436
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-08-04 08:36:16 +00:00
Frederik Gladhorn
e5cdb966bf Ignore tests that fail on OpenNebula
These tests need fixing, but they are already partially blacklisted
and need investigation once the switch is completed.

Task-number: QTQAINFRA-1292
Task-number: QTQAINFRA-1355
Task-number: QTQAINFRA-1362
Change-Id: Ic50d0c4a01ee7e72be1129d418eff244ba783185
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-03 09:30:06 +00:00
Joni Jäntti
8561281768 tst_qwidget::activation expect fail on Win 10
This test fails on Windows 10 x64 Creators Update CI builds for unknown reasons.

Change-Id: I766bccfd4dea9ea195c68403018b419e800a7b3b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-03 06:58:35 +00:00
Joni Jäntti
3d5bf00f18 tst_qgraphicswidget expect fail on Win 10
tst_qgraphicswidget::checkReason_ActiveWindow fails on Windows 10
Creators Update. Added expect fail for Windows platform.

Task-number: QTBUG-62244
Change-Id: I71868a496659e7136af9a5b74684ba39edaf03ae
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-03 06:58:27 +00:00
Joni Jäntti
b091472f44 tst_qfocusevent activateWindow for Win 10
This workaround was created to make tst_qfocusevent test pass on Windows
10 x64 Creators Update.

Task-number: QTBUG-61467
Change-Id: I63eb149ae850174fb5de99761a6001e000a151a2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-03 06:58:19 +00:00
Oswald Buddenhagen
d61ac601d8 unbreak tst_qresourceengine for prefix builds
don't try to execute a binary from the install dir.

amends 8e776d39f.

Change-Id: I37990bc83b295379f0c93f4ca712e1bbf980fd44
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-08-03 04:54:56 +00:00
Frederik Gladhorn
6c2bfbf88e Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/dev 2017-08-02 23:15:27 +00:00
Timur Pocheptsov
72cf2339ed Introduce QHstsStore - the permanent store for HSTS policies
The store is using QSettings under the hood. A user can enable/disable
storing HSTS policies (via QNAM's setter method) and we take care of
the rest - filling QHstsCache from the store, writing updated/observed
targets, removing expired policies.

Change-Id: I26e4a98761ddfe5005fedd18be56a6303fe7b35a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-08-02 22:01:47 +00:00
Morten Johan Sørvig
e44ff19783 Add QThreadPool::stackSize
Allows setting the stack size for the thread pool
worker threads. Implemented using QThread::stackSize.

Task-number: QTBUG-2568
Change-Id: Ic7f3981289290685195bbaee977a23e0c3c49bf0
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-08-02 21:58:54 +00:00
Allan Sandfeld Jensen
bef7e4a222 Allow conversion of QVariants with real null values
Update documentation to be clearer on the special null variant state
with no value as opposed to a variant with a null value, and only block
conversions of the former.

Change-Id: I24fd50285414e049de87de54a63700a89bd5adf1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-02 21:09:19 +00:00
Oswald Buddenhagen
ee07b912a1 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/plugins/platforms/xcb/qxcbconnection.h
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
	src/plugins/styles/mac/qmacstyle_mac.mm
	src/widgets/widgets/qdockarealayout.cpp
	src/widgets/widgets/qmainwindow.cpp
	src/widgets/widgets/qmainwindowlayout.cpp
	src/widgets/widgets/qmainwindowlayout_p.h
	tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
	tests/auto/other/macnativeevents/BLACKLIST
	tests/auto/widgets/widgets/qmenu/BLACKLIST

Change-Id: Ic8e724b80a65e7b1af25511b0e674d209265e567
2017-08-02 22:52:32 +02:00
Friedemann Kleint
245d83bb50 tst_QImageReader: Fix the size of the SVG images
The image appears to be 128x128. Fixes test failures

FAIL!  : tst_QImageReader::readFromResources(rect.svg) Compared values are not the same
   Actual   (image.size()): QSize(128x128)
   Expected (size)        : QSize(105x137)
.\tst_qimagereader.cpp(1493) : failure location
FAIL!  : tst_QImageReader::readFromResources(rect.svgz) Compared values are not the same
   Actual   (image.size()): QSize(128x128)
   Expected (size)        : QSize(105x137)

which likely do not show in the CI since the qtsvg module is not
available when checking only qtbase.

Change-Id: I84ebdde6f2251f56a00f16a54bd20d0c2b23638e
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2017-08-02 20:25:47 +00:00
Kevin Ottens
4bfff6a98b Implement graph layers support in QShaderGenerator
Change-Id: I823f7866bc5e1f3b262f1aacf4c341dabda7305d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-08-02 17:34:56 +00:00
Kevin Ottens
236284357f Add support for layers in QShaderGraphLoader format
Change-Id: I5038600e73523ac7eb37a88ddff1f942af18f18e
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-08-02 17:34:52 +00:00
Kevin Ottens
f3c70ab9f3 Implement graph layers support in QShaderGraph
When creating the statements, it is now possible to pass a list of
enabled layer names. Every node or edge which is not in the list of
enabled layers will be pruned from the graph prior to traversal. Note
that an empty layer list for a node or an edge means it is on all
layers.

Change-Id: I61a4df7d395b4beb42ee55ce08fef8ebe04263c9
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-08-02 17:34:48 +00:00
Kevin Ottens
32281653bf Add the layer concept to QShaderNode and QShaderGraph::Edge
This will be used in further commits

Change-Id: I49977f1ea482b97dc0a159f69a0d2eda3865ec44
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-08-02 17:34:44 +00:00
Kevin Ottens
3d5c4ce01e Add support for QShaderLanguage enums in QShaderGenerator
Change-Id: I93306d783309cda09fedae3713afde851df3e9a3
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-08-02 17:34:40 +00:00
Kevin Ottens
dd04551504 Extend the parameter support in QShaderGraphLoader for richer types
In particular, go through QMetaType/QMetaEnum to deal with enums.

Change-Id: I2e847ba328eb46609b86b3dfd6c4dbf532d78b7d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-08-02 17:34:35 +00:00
Kevin Ottens
50775424be Extend the parameter support in QShaderNodeLoader for richer types
In particular, go through QMetaType/QMetaEnum to deal with enums.

Change-Id: Idbe16c913c1d471a4a91d219f77876e498c192d9
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-08-02 17:34:30 +00:00
Simon Hausmann
d1d2ca2b41 Ignore hanging tst_qinputdialog::getInt/getDouble() test on macOS 10.12
Change-Id: I495cd98144ba9145e44a9ee5cb8748ae97a6166f
Task-number: QTQAINFRA-1356
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-02 15:49:53 +00:00
Simon Hausmann
f3ca13f3d1 Ignore failures of showMinimizedKeepsFocus/activateWindow on macOS 10.12
Change-Id: I1b5823b48c5dd5bebb8172fd696fc521b7de75b2
Task-number: QTQAINFRA-1359
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-08-02 15:49:23 +00:00
Simon Hausmann
30d32ae72c Ignore failures of submenuTearOffDontClose on macOS 10.12
Change-Id: Ie3409da033325aea832907579d4d61dfd3610e7a
Task-number: QTQAINFRA-1358
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-08-02 15:49:18 +00:00
Joni Poikelin
0a5f71c606 Fix storing of QDateTime timespec for Sqlite
Commit 9e64fc9e1c caused a regression
which stored all QDateTime entries as if they were in localtime,
which causes them to be offset by the amount of local timezone
offset. This is fixed by adding "Z" if the time should be in UTC or
using "+/-hh:mm" if it should use fixed UTC offset or specific
timezone.

Task-number: QTBUG-57138
Change-Id: Ie60905dfb3a517db442b636ca41daf8348753d84
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-07-31 17:59:49 +00:00
Edward Welbourne
60a9747bb5 Add a date-time test for time-zones near epoch and odd transitions
Check we do handle DST after epoch and don't before.
Check we do notice various unusual transitions.
Check we do handle non-whole-hour-offset zones.
(Unfortunately, MS-Win lacks data for some of the zones and is wrong
about the two date-line crossers, so we skip those for it.)

Change-Id: If420d61b9db7f914ca25c22297c16e917ad2307a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-31 09:24:31 +00:00
Joerg Bornemann
85403d0af0 Support more than 62 instances of QWinEventNotifier, take 2
QWinEventNotifiers were limited to 62 instances, because of
WaitForMultipleObject's limitation to MAXIMUM_WAIT_OBJECTS - 1 handles.

Use the RegisterWaitForSingleObject API which does not have this
restriction and executes waits in threads managed by the system. A
central manual reset event per event dispatcher is signaled in the
RegisterWaitForSingleObject callback and waited for in the event loop.

Task-number: QTBUG-8819
Change-Id: I3061811c18e669becf9de603bbdd7ba96e4d2fcd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-07-30 19:11:49 +00:00
Alex Trotsenko
6adff20fe6 Fix bytesAvailable() on UDP under Windows
When ::WSAIoctl() reports 1 byte available for reading, we are trying
to peek an incoming datagram to ensure that the data is actually
delivered. But, according to MSDN docs, we are not allowed to pass NULL
as 'lpNumberOfBytesRecvd' parameter to ::WSARecvFrom() call, if
'lpOverlapped' parameter is also NULL.

The case with an empty datagram is fixed accordingly.

Change-Id: Id13038245332d3fb4bc18038d44a7cfd7ce04775
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-30 13:02:30 +00:00
Friedemann Kleint
3bdd59920f Refactor tst_qdir::entryList()
Split the test in two: one test that requires the symlinks
and test files and one that does not need them.
In the test with test files, verify each step and the deletion
of the files.

Task-number: QTBUG-58654
Task-number: QTBUG-50835
Change-Id: I14de57ce7a1df2d834d5a7565c804dead1d89088
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-29 09:51:50 +00:00
Jędrzej Nowacki
3760120ab3 Remove tst_qtconcurrentiteratekernel blockSize test
The test is just wrong.

It suggests, that it tests minimal block size,
but in reality it is checking if a maximal peak of block size
is bigger then expected minimum block size.

The minimal block size is 1, not 1024 / ideal threads count and
it is defined in BlockSizeManagerV2.

The maximal block size is defined and it is fixed, but it is an
implementation detail, probably not worth testing.

The test is based on a race condition as peakBegin and
peakBlockSize are modified in parallel from multiple threads,
without any synchronization.

Change-Id: I430eedcf83b0fa3e2ce2cfd294eaee7b301e48ae
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-07-29 09:35:16 +00:00
Simon Hausmann
5881fc0d2d Ignore tst_QFocusEvent failures on macOS 10.12
Task-number: QTQAINFRA-1352
Change-Id: Ia5cad1af74a2ea581d768ce150e480f3a97b6495
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2017-07-29 09:35:03 +00:00