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
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>
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>
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>
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>
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>
[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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
[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>
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>
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>
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>
- 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>
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>
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>
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>
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>
don't try to execute a binary from the install dir.
amends 8e776d39f.
Change-Id: I37990bc83b295379f0c93f4ca712e1bbf980fd44
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
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>
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>
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>
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>
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>
In particular, go through QMetaType/QMetaEnum to deal with enums.
Change-Id: I2e847ba328eb46609b86b3dfd6c4dbf532d78b7d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
In particular, go through QMetaType/QMetaEnum to deal with enums.
Change-Id: Idbe16c913c1d471a4a91d219f77876e498c192d9
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
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>
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>
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>
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>
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>
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>