Future versions of QNX will, by default, require the use of registered
events. Currently, event registration is supported but optional.
Change-Id: Ie45484d5ca9fa832a28ccf08cb1764cf24262dcc
Reviewed-by: Dan Cape <dcape@qnx.com>
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
Since the QSqlField used to retrieve the data is reused in the loop, the
default empty value of the QSqlField is not set for all except the first
field since it was implicitly set by QSqlField::setType() only when the
value is invalid. Therefore we have to call QSqlField::setValue()
directly.
Change-Id: I1d3abe4e3c46f6378f9ff25529a79bbe33bb7b74
Reviewed-by: Robert Szefner <robertsz27@interia.pl>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Windows apparently has special code to deal with those addresses. If all
your network interfaces are up and have acquired addresses, then the
link-local network at 169.254.0.0/16 is unreachable. I had never caught
this because both my Windows VM and my bare metal Windows have inactive
interfaces (like the Bluetooth PAN one) and, when inactive, Windows
assigns a link-local address. But in the CI, the interface(s) were all
up and running, causing this issue.
Unix systems don't treat IPv4 link-local any differently, so they always
worked, so long as any interface was up and there had to be one to reach
the network test server.
This commit reworks the test to add test addresses based on the
addresses found on up & running interfaces (see tst_qudpsocket.cpp). For
IPv4, we flip the bits in the local portion of the address. For IPv6, we
add a node with an address I generated randomly (non-universal), with
the same scope.
Fixes: QTBUG-65667
Change-Id: I568dea4813b448fe9ba6fffd15dd9f482db34991
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
As we assert on the size of the vector before accessing it, there is no
point in using the checked at() method over operator[]. Besides, if at()
throws, what are we going to do with the exception anyway.
Incidentally, this also works around a compiler bug causing binary
incompatibility in QtQml.
Change-Id: I460e7514429daecabc304eb2c5f96ed715008b0a
Fixes: QTBUG-80535
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
In some cases when editing the text (for example when removing the
selected text, or pasting a text block) the text cursor position is
updated, but its visual x position is not updated. This causes the next
cursor movements to start from a wrong position.
Force the update for those cases.
Fixes: QTBUG-78479
Change-Id: Ia496be62beec58660f5e1695e5aafae09c79684e
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
There were factual errors.
Important details were omitted.
The \sa blocks were haphazard and cluttered.
Change-Id: I76ceb00830c36699c48529b64808844faf09391e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Cite RFC 3339 as basis for allowing a space in place of the T, too.
The RFC mentions that ISO 8601 accepts t and z for T and Z, so test
for them case-insensitively. Add a test for this.
Change-Id: Iba700c8d74d485df154d27300aab7b1958e1ccef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If milliseconds were followed by a space, the space was included in
the count of "digits" read as the fractional part; since we read (up
to) four digits (so that we round correctly if extras are given), a
harmless apce could cause scaling down by too large a power of ten.
Since QString::toInt() ignores leading space, we were also allowing
interior space at the start of the milliseconds, which we should not,
so catch that at the same time. Added tests, including one for the
rounding that's the reason for reading the extra digit, when present.
Fixes: QTBUG-80445
Change-Id: I606b29a94818a101f45c8b59a0f5d1f78893d78f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Although the relevant conditions are indeed likely, we don't want to
push the less likely branch into hard-to-load pages; they're not
anomalous conditions, merely ones with lower probability.
Change-Id: Icc12a921d38d8c398cd832964e9d57d7648698b2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QDateTime is a friend of QTimeZone, so can access its internals; but
it must check the zone is valid before doing so.
Expanded tst_QDateTime::invalid() and made it data-driven to catch the
failure cases.
Commented on a test-case that caught a mistake in my first attempt at
this, and on QDateTimeParser's surprising reliance on a quirk of
QDateTime::toMSecsSinceEpoch()'s behavior.
Fixes: QTBUG-80146
Change-Id: I24856e19ff9bf402152d17d71f83be84e366faad
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Some styles, notably QMacStyle, use different margins for widgets and
for windows. For these margins to be returned correctly, we have to
tell the style that we want them for a toplevel widget. This was
done correctly when laying out the dialog, but not when calculating the
sizeHint, leading to a default size of the dialog that was too small
to fit the text.
As a drive-by, change variable names in the sizeHint method to be a
bit more readable.
Change-Id: Ib4168c7be176fa816241ebcc5f9235db4a7f982f
Fixes: QTBUG-80272
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 13bbb1d9b9411e6eb65848efa8c0d481109b8868)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The dragging icon is created from the visible items in the
selection. It would be clipped to the parts visible in the
viewport. That meant that items on the edge could be rendered
illegible, even though they were part of what was being dragged.
Fix by dropping the horizontal clipping to the viewport. Items fully
outside the viewport are already filtered away, so this should at most
make a difference to the bottom and/or top items in the set.
Keep the vertical clipping, since items may easily be very wide, so an
unclipped icon would be unwieldy.
Done-With: Sona Kurazyan <sona.kurazyan@qt.io>
Fixes: QTBUG-77336
Change-Id: I2d29cb0ca69c1058635106aa0c67e9f7e140d1cd
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Turn the Metrics widget into a QTabWidget and add a tab logging
all changed signals of QScreen.
This is useful when for example debugging issues with lock screens and
laptop hibernation.
Task-number: QTBUG-79248
Task-number: QTBUG-76902
Change-Id: Ie86789fe1514cb3333a5f3def7f613f217fa6802
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
When cloning a QTextDocument, the text fragment of the original document
is copied into the new one, which results into copying also the
formatting attributes. However, when the text document is empty, the
corresponding text fragment is also empty, so nothing is copied.
If we want to transfer the formatting attributes for an empty document,
we need to set them explicitly.
Fixes: QTBUG-80399
Change-Id: I382cd0821723436120af47c06ec7bfa849636307
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
We forgot to reset the flags when replacing the element, so we ended up
with an integer with HasByteData after:
testMap[0] = QStringLiteral("value");
testMap[0] = 42;
Fixes: QTBUG-80342
Change-Id: Ia2aa807ffa8a4c798425fffd15dabfa066ea84b0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
The application does not update its screens when there are
no windows on which a WM_DPICHANGE could be received. Add a
check for it to the tray window procedure and trigger an
update from there if no top levels are present.
Fixes: QTBUG-79248
Change-Id: I0b1c4db560662ecf2b473304942da373be6fdc73
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This is so that we can do simple changes to the docker images
in provisioning, without needing to update the tag here.
If a backwards-incompatible change in the docker images needs to be committed
in provisioning and here, it is possible because the images retain their old
unique SHA1 tag, in addition to being tagged as latest. See comment for more
details.
Requires the change in qt5 repository, with commit sha:
e4f9ac5607a329bae045567a339d36469bc4fff6
Task-number: QTBUG-79867
Change-Id: I1bc72edec62487530575d7e113a25afe16d09129
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This matches the default collection behavior of NSWindows.
Change-Id: I363ed211daf6c6c2e579eb11c7294ff509d53e91
Fixes: QTBUG-63829
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
We only read this for desktop environments that have traditionally used
these to set settings for other toolkits.
Fixes: QTBUG-80323
Change-Id: Ifa8c2682301e69c2770d3734115080a0e6b4e85c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
The call to data() on a non-const QString led to a detach(), which is
unexpected and unwanted from QString::lastIndexOf() const.
Found by looking at why QFileSystemEntry::fileName() was expensive, in
the hotspot profiler.
The solution is to instanciate QLastIndexOf with QStringView() rather
than QString(). I added a deleted QString overload to make sure nobody
ever instanciates it with a QString argument again.
Change-Id: I06a1b2f937425e83f0779eb215e099aef78c50a7
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When drawing a QMenu which is checkable but does not have an icon
somewhere, the width of the (possible) checkmark was not considered
during drawing and the text was drawn over the checkmark. Also the wrong
state was checked for drawing the checked icon (if one was given).
Fixes: QTBUG-80506
Task-number: QTBUG-78238
Change-Id: Icf8aa37aab424564054d3549defee93eb0d7c1a4
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
QEvent::EnabledChange did not update the palette of the internal
QPlainTextEditControl which lead to a wrong text color when the
QPlainTextEdit was disabled e.g. due to a QGroupBox.
Fix it the same way it is done in QTextEdit - set the new palette also
to the internal control when QEvent::EnabledChange is received.
Fixes: QTBUG-80150
Change-Id: Icbeddf3d6cd4877a3d8d4a06b2da69383dd776d2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
QTextStream, reading a file with CR+LF newlines from an stdio FILE
handle that was opened without "b", will always return false in atEnd().
Changing the open mode from "r" to "rb" works around the issue.
Task-number: QTBUG-80443
Change-Id: Ib2eafc0c4c6a6d2bcaeea3036474549d2d9e1511
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
When an application only has a trayicon and is killed by `taskkill /IM
binary.exe` the trayicon's HWND will receive a WM_CLOSE message. If we
don't handle this, the tray icon will close anyway, but the app still
runs in the task manager.
Fixes: QTBUG-43855
Change-Id: I5f82a068df9c40360bd565a2681e1b37ff114e44
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Apparently this is our preferred style for Objective C member references.
Change-Id: I8b2bbaabadbea2cfa74f209372e77cee79e3c895
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Inline systemTimeZoneId() in it to save the need for init().
We thus save the lookup by name for a time-zone object, when that
object is what we took the name from anyway.
Do some minor tidy-up in the other constructors and add an assert to
systemTimeZoneId() to match the new one in the default constructor.
Change-Id: Ib70acf31bdb4a4fa1306eebd1fd5f00ad6b89bcc
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The code was assuming that if the parsing of the value worked,
then it must be a list of 4 variants. But in this case it's just
a single length.
This came from <td> using 4 values for border-width
while other elements use a single value. But the storage
is shared. So the fix is to use 4 values everywhere.
When reading 4 and there's only one, it gets duplicated,
so the caller can just use the first one in that case.
Task-number: QTBUG-80496
Change-Id: I682244b6e3781c4d673a62d5e6511dac263c58e8
Reviewed-by: Nils Jeisecke <nils.jeisecke@saltation.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The dark edit field is now centered within the frame around it, with a
thin border on all sides, including between input field and button.
Change-Id: I27e853289e9048c21fdc81e45fadacba9665b49e
Fixes: QTBUG-63454
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The JavaScript implementation of that function has
the following code:
if (typeof JSEvents === 'object')
JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas); // Release all
// JS event handlers on the DOM element that the GL context is associated with since the context
// is now deleted.
This breaks mouse/keyboard events, etc.
Disable this logic by temporarily setting the JSEvents object
to undefined, for the duration of the emscripten_webgl_destroy_context
call.
Fixes: QTBUG-74850
Change-Id: Ied3177b0ca6e63e8ea07143bf7d6a850b0bce35a
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
There's no qt documentation module for 'qtrhi' - instead, it should be added
to the qtgui documentation module.
Fixes: QTBUG-80489
Change-Id: Iea61b907811cd2135c2f1258599d9868d2218679
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Two little tool functions had come between it and the function it
actually describes.
Change-Id: Ib49d1623833275ea79c7916fece29aed9503aa40
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
These were kept around to keep Qt Quick compiling, but the
migration there has been done a long time ago. Remove these
leftovers now.
Change-Id: Ibd47381b410b11b5475a85c7ed3cb05c22f7adbb
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
AppKit will initialize NSScreens nowadays, so we don't need to manually
trigger it.
Task-number: QTBUG-80193
Change-Id: Ic0251a1b978b9d4ff53f20e67902787cf529fa87
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
License file (LICENSE.QT-LICENSE-AGREEMENT-4.0) was recently updated to
version 4.2 and that broke the configure.
Remove qt license file version number from file name to avoid configure
update need when license file is updated
Change-Id: I77b4a4e7c6e590bbbce79d1c86cbcfb965841eae
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
- start from index -1 each time when we iterate. Each time when we add a
FolderIterator to the stack we MUST reset the index (-1) otherwise it will
continue from it's last position. To fix it we are cloning the FolderIterator
to set the index to -1. The index must be -1 in order to set it to 0 when we
first call next() method.
- introduce "fileType" static method for a more reliable also much faster
file type lookup. The old version of checking if a file exists, is a folder or
a file was buggy that's why it skipped some file randomly.
Fixes: QTBUG-80178
Change-Id: I4b28e4616399b1bff35d792b55ded1bf19b62dd9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
When doing a multi ABI build in one go, if the TARGET is the same,
we'll endup with only one library which is not okay.
Task-number: QTBUG-80351
Change-Id: I0c5ff24480446d671e59dbd5a045f9889dff39e9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
When connecting/disconnecting/reconfiguring screens Qt needs to know
about the changes before they are propagated by the OS in other ways,
so that we can reflect the changes in the list of QScreens as soon as
they happen.
Unfortunately the canonical notifications for this in AppKit,
NSApplicationDidChangeScreenParametersNotification, is delivered
after AppKit itself reacts to the change, which results in receiving
NSWindowDidChangeScreenNotification, NSWindowWillMoveNotification,
and others, while the list of QScreens is stale.
To work around this we adopted the lower layer Quartz Display
Services API in 3976df2805 to notify us when there are changes to
the screen configuration.
Unfortunately the window server on macOS is not consistent in how
it orders events during screen reconfiguration, and we can't rely
on the NSScreen list being up to date when we get our callbacks
from Quartz.
To work around this we still hook into Quartz, so that we get the
callbacks as early as possible, but then track the state of the
AppKit NSScreen list and update our own QScreens as soon as we
see a change.
We now also include sleeping displays in the list of QScreens,
which matches the behavior of NSScreen.screens. Similarly we
exclude displays that are mirroring another display.
Task-number: QTBUG-80193
Change-Id: I6b1958d6ee61373b2861e05a0d971d2300596f3e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
QVulkanWindow support has long been removed from the Vulkan backend.
The include is a leftover from those times.
Change-Id: Ie68ac3611b24310f2b6111a72dd0679adafdc74d
Reviewed-by: Johan Helsing <johan.helsing@qt.io>