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>
... when QCoreApplication::processEvents() returns. This is the expected
behavior according to the documentation. Checked also the QUnixEventDispatcherQPA
dispatcher, which did work according to the documentation.
The sequence of events that causes the bad behavior:
1) XCB plugin sends a signals whenever there are new XCB events available
for processing. This signal is connected to QXcbConnection::processXcbEvents,
which will cause XCB events to be added to the QWindowSystemInterface (QWSI) event
queue.
2) When QCoreApplication::processEvents() is called, glib event dispatcher does
one iteration on all attached event sources. First it checks which sources are
ready, and after that starts dispatching events from each source that reported
to be ready.
3) In the case when there are no events in QWSI event queue, the source that handles
QWSI event dispatcing returns 'false'; If at the same iteration the source that
sends posted events (via QCoreApplication::sendPostedEvents()) has returned 'true'
and one of the posted events is to call QXcbConnection::processXcbEvents (due to
signal from step 1) then we get an assert in the following code:
QCoreApplication::processEvents();
Q_ASSERT(QWindowSystemInterface::windowSystemEventsQueued() == 0);
This happens because QXcbConnection::processXcbEvents has posted new events, but
they were not dispatched in this iteration. They would be dispatched in the next
iteration. Events being dispatched on subsequent iteration doesn't really matter
for Qt application, but is inconsistent from API point of view. If we were
populating QWSI queue from non-Gui thread, then it would be possible that
windowSystemEventsQueued() != 0, but that is not the case on XCB (don't know
about other platforms).
The issue could be fixed by always returning true from "check source" and then
simply dispatch 0 events at "dispatch" step if there isn't any in the queue. But
a better solution is to remove the event source all together. It is completely
unnecessary to have this indirection, when we can handle QWSI event dispatch
directly from Qt (like we do, for example, in QUnixEventDispatcherQPA and
QWinRTEventDispatcher). Not having Glib event source for QWSI events would have
also avoided issues that were fixed by fbb485d4f6.
Note, after this re-factoring QWindowSystemInterface::nonUserInputEventsQueued is
now unused, but I left it in as the API by itself is all right.
Task-number: QTBUG-62297
Change-Id: Ia245b835676bd87e63bf02b67036b42a3b1593cc
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>
Also clean up some unused files.
The remaining diff to clean 1.2.11 is archived in the qtpatches.diff file.
[ChangeLog][Third-Party Code] zlib was updated to version 1.2.11.
Task-number: QTBUG-31020
Change-Id: I89f890904af48c6e9ba6eabc5d58f5adbe2c53f0
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
- 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>
The call to QPlatformWindow::setRect (for storing into d->rect) was
in the wrong place. It has to be the potentially-overridden value.
Amends 3a31c70879
Task-number: QTBUG-57608
Change-Id: Id3c35e2dc178f7bd2f9643e8ae4754c8f2f39240
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
... and use it when building shared libraries and plugins.
It prevents application crashes in cases when libraries and
plugins are unloaded and their strings are still used by
the main application.
Task-number: QTBUG-51602
Change-Id: I4af79183f18c5ed6142d55af02a36fe4334f3fee
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The conversion fallback did not catch all the more recently added
QImage formats, leading to corrupt pixmaps or crashes. Also alpha
channels were needlessly thrown away if present.
Change-Id: I38588035aa9bf37b77398489981df65201cf0340
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Avoid polluting the output by default. Unfortunately there are various
systems (modern Fedora with XWayland, VMWare) where parsing will fail
for some not yet known reason. Showing warnings on each and every Qt
application startup is not desirable, especially since not having the
EDID data available is far from being critical.
Change-Id: Ibaca7db4d897e705819f7c359f8de41b9be862a6
Reviewed-by: Gatis Paeglis <gatis.paeglis@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>
QSslSocket::writeData() accumulates outgoing data. It might be called
multiple times during the event processing (most likely from the long
loops which serialize the data).
As this function produces a notification event on each call, it's
possible to get a huge number of slot invocations on the next event
loop run, when we are interested in a single flush.
So, this patch protects the code against uncontrolled signal emission
that results in the lesser resource usage.
Change-Id: If7cf5b0e239abf0bd88a0dfaa8c1183cbd49e5ed
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
- Warn that they can fail if used on non-existent files
- Fixed random garbage
Change-Id: Ie58aac4a9f4479332ef07d39aecc136b1cfa58e1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
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>
On X11, QScreen::availableGeometry() is broken with multi-head systems,
and there doesn't seem to be a real fix for this due to limitation in
the protocol and therefore support in WMs (more details in the
patch). In Gnome this issue is more visible because on this DE the
_NET_WORKAREA rectangle represents the intersection of the available
geometries on all monitors. This results in a big area of "dead space"
on the secondary screen, when primary screen is positioned lower in the
virtual space. If menu is opened by clicking in this dead space, the menu
is awfully misplaced (qmenu uses availableGeometry() to calculate the
position of menu).
On Ubuntu with Unity (same is true for KDE Neon+Kwin and LUbuntu+Openbox),
_NET_WORKAREA returns a bounding rectangle containing all monitors.
Which does not cause the menu misplacement as "dead space" is outside
clickable area. But this does not mean that the QScreen::availableGeometry()
reported values are correct. With the same setup as described above,
QScreen::availableGeometry() thinks that we have a tool panel on the
right screen, when in reality it is on the left screen.
AwesomeWM for example does not set _NET_WORKAREA at all, which means
QScreen::availableGeometry() == QScreen::geometry(). I am not aware that it
would cause any issues for popup/menu window positioning in Qt (Qt positions
these windows manually by bypassing WM (via Qt::BypassWindowManagerHint) and
using availableGeometry for calculations. With this patch, we would take the
same code path as if _NET_WORKAREA was not set (where we know that_NET_WORKAREA
is cleary wrong). The solution here is to recognize _NET_WORKAREA as true
available geometry only in specific cases (cases where the meaning is cleary
defined by the specification) and adjust the documentation accordingly.
Not knowing the true available geometry on X11 is mitigated by WMs. Window
manager can position windows as it wants. WMs are smart enough not to place
windows on top of reserved areas at edges (even if user has explicitly requested
this via setGeometry based on inaccurate information from availableGeometry()).
[ChangeLog][Platform Specific Changes][Linux] The _NET_WORKAREA atom is
used for calculating QScreen::availableGeometry() only on systems with one
monitor. In all other cases QScreen::availableGeometry() is equal to
QScreen::geometry(). To restore the legacy behavior with untrustworthy
values in QScreen::availableGeometry() set QT_RELY_ON_NET_WORKAREA_ATOM=1
environment variable.
Task-number: QTBUG-60513
Task-number: QTBUG-29278
Task-number: QTBUG-43768
Task-number: QTBUG-18380
Change-Id: I7e0f62f81d1444991b8a6c007c2527d8f96088c2
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Lars Knoll <lars.knoll@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>
QThread::idealThreadCount() now returns 1 if the number
of CPU cores could not be detected.
Change-Id: I60b75c46fbfa2891c28e71fed65589e2ce5a5c17
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
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>
(non static data member initializers)
Also, taking the absolute value of the idealThreadCount()
return value is no longer needed since the function now
returns 1 for the "CPU detection failure" case.
Change-Id: I2214fd15ed24413bba796ead38bbf1355dfd37d9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
A Q_OS_MAC ifdef was left from the days of macOS-only support.
Task-number: QTBUG-59956
Change-Id: Ia10258910ad14ecccee8f0ec22e53f9299a672ff
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
The 16-bit multiplication can not handle the case where one of the
numbers is 65536, so skip it in that case as we do when the y remainder
triggers the same issue.
Task-number: QTBUG-62165
Change-Id: Iea2ebe557949797d9aa77b8d7cdac9247eea7b84
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@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>
qtbase/src/corelib/io/qfsfileengine.cpp:926: warning: Overrides a previous doc
qtbase/src/corelib/io/qfsfileengine.cpp:527: warning: (The previous doc is here)
qtbase/src/corelib/tools/qbytearray.cpp:689: warning: Cannot tie this documentation to anything
Change-Id: Ie7009f565a11a01859ccd0488ddeebe1b953305d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When requesting windows with a size of 0x0 for which a default size
is determined by QPlatformWindow::initialGeometry(),
QWindowsWindow::initialize() did not call handleGeometry() since
it compared against the requested geometry obtained after
calling QPlatformWindow::initialGeometry().
Store the initial geometry in the context.
Amends deb7f9a7c3.
Task-number: QTBUG-62177
Task-number: QTBUG-61977
Change-Id: I9e96f2f0b984b9009bebb192f576c92b4409d5d1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Setting the clip needs to be followed by a call to
QPaintEnginePrivate::systemStateChanged() since the raster paint engine
overrides the function to set some variables.
Amends change 4ae1025c0b54a535ef9f50c6cdab5ef752b667dc.
Task-number: QTBUG-44067
Task-number: QTBUG-56282
Task-number: QTBUG-55698
Change-Id: I7983ddd087deb484d9dbbf955eb1d6f903ef59fe
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Scale velocity and raw positions as does
QWindowSystemInterfacePrivate::fromNativeTouchPoints().
Change-Id: I4c9e03e4c2f4ca807319b1a7d1f4a9e56a25b06c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Rewrite instantiation of QWindowsRemovableDriveListener to check
for the presence of the event dispatcher.
Task-number: QTBUG-62242
Change-Id: Ibb5726864058593e5341e0d411aaf5432e2f108a
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>
This is a new namespace with helper enums to have richer parameters
available to QShaderNode. Will be used in further commits.
Change-Id: I9a61481c1e89ddd08327211e90eeabf0172c3b7a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Availability of D3D11_QUERY_DATA_TIMESTAMP_DISJOINT depends on the used
MinGW version so that the check for MINGW is not sufficient. The newly
added configure test can be used for every toolset.
Task-number: QTBUG-57916
Change-Id: Ia9cb48f3e673841101a93cbc8ea23aff9547f639
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
only few tests remain, and many of these were mis-classified anyway.
Change-Id: Ic3bc96928a0c79fe77b9ec10e6508d4822f18df2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We're adding a lot of unnecessary files that end up later as cargo-cult,
for at most a handful of lines. So instead move the testcases directly
into the .json file.
The following sources were not inlined, because multiple tests share
them, and the inlining infra does not support that (yet):
- avx512
- openssl
- gnu-libiconv/sun-libiconv (there is also a command line option to
select the exact variant, which makes it hard/impossible to properly
coalesce the library sources)
The following sources were not inlined because of "complications":
- verifyspec contains a lengthy function in the project file
- stl contains lots of code in the source file
- xlocalescanprint includes a private header from the source tree via a
relative path, which we can't do, as the test's physical location is
variable.
- corewlan uses objective c++, which the inline system doesn't support
reduce_relocs and reduce_exports now create libraries with main(), which
is weird enough, but doesn't hurt.
Done-with: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change-Id: Ic3a088f9f08a4fd7ae91fffd14ce8a262021cca0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>