That's actually how ignoreVerificationErrors (and QSslSocket::ignoreSslErrors)
are used to set the expected/known verification errors before handshake.
Auto-test updated too.
Change-Id: I9c700302d81ddb383a4a750fafd594373fb38ace
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Makes it easier to run a test repeatedly until it crashes, and then
attach a debugger.
Change-Id: I8ad5d706becd77a2743a51927c837f3d1da08624
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This prevents the view from triggering display of its superview when
being temporarily added, which is both inefficient and causes issues
when those dirty-rects are wrong due to the wrong frame position of
the added view.
Task-number: QTBUG-67998
Task-number: QTBUG-68023
Change-Id: Idc87d0540216e2e39cc84cc57cb818110c9d00e2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
We now treat -o foo/bar/baz as a request to generate the output in the
foo/bar directory with baz as the output name, or if foo/bar/baz is already
a directory, in the foo/bar/baz directory with the default output name.
We take care to handle generator specific directory structures, so
that the project directory does not get merged into OUT_PWD. This is
done in runQmake(), before parsing the project file, so that OUT_PWD
will be correct during project parsing. The individual generators are
then passed the filename relative to the final output directory.
Each generator now also makes sure to add the right project suffix
to the output file, so -o foo will result in foo.pro or foo.vcproj,
instead of just foo.
Task-number: QTBUG-44408
Change-Id: I26990cec0c0458bee2b88dbb86322617a85f54b5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Using QTextCursor::Left and QTextCursor::Right moves the cursor visually to right or
left, which does not work with Right to left text, where moving left means advancing to
the next character, and vice versa.
By using QTextCursor::PreviousCharacter and QTextCursor::NextCharacter we leave it up to
the engine for deciding where to move depending on the context.
Task-number: QTBUG-50619
Change-Id: Ibf0a886f3ff6bf9ca2c953aeff8c235612bbc01d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Makes it a bit more clear why all the Xcode settings were lost.
Task-number: QTBUG-45113
Change-Id: I3b19edb02a24673f56e77d3a1fb7cc76584c73fd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* order and sort includes
* use functor connect
* use nullptr
* use member init
* added sanity check for nextPendingConnection()
* small cleanup here and there
Change-Id: I72c6758b5fedea0937a1f2cb9031cb7203f5d955
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
If we ever need to add QCborValue to the bootstrap library, it's
unlikely that we'll need this part. And by splitting it, I can make the
code handle more cases, that hadn't been properly handled before.
Change-Id: I2f630efbbce54f14bfa9fffd154160c0ad893695
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
There is no such file, if one of the "directory" components of its
path is not, in fact, a directory. Added a test for non-existent file
(specified to give empty canonical file path) as well as a test for a
file in a sub-directory of a known file. The former incidentally
tests for QTBUG-29402, fixed long ago.
Change-Id: I60b80acc0f99f0a88cdb1c4d191af7384f3a31c5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Makes clear that this is what it is; and ensures we'll get compiler
warnings if someone adds a new entry to the FileName enum without code
to handle it here.
Change-Id: I36e383066728cefcc75e0a760e36222cebd1dff0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use one QStringLiteral instead of repeating a QLatin1String(), that
was passed to a function that has to convert it to unicode; do the
conversion at compile-time.
Reducing i % 256 is fatuous when i ranges from 1 to 100.
A QFile will close() itself on destruction, no need to do it explicitly.
Especially when *not* close()ing the *other* QFile that was left open.
Change-Id: Idb39312d9c9beaf082b7cead574bc6bb9bb3a775
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
On Unix, we wouldn't even *try* to truncate if the file was open for
appending. The combination may be an eccentric choice but - at least
when it's combined with reading - I can imagine use-cases for it; and
we should (at least try to) deliver what we're asked for, even if we
can't think why anyone would want it. So actually enable truncation
when asked to.
Amended some tests to check this works and corrected the QIODevice
documentation of mode flags (which misdescribed the special case that
implies Truncate). Removed special-case code, to apply truncate when
writing but not reading, since it's been made redundant by the
pre-processing of mode done in QFSFileEngine::processOpenModeFlags().
[ChangeLog][QtCore][QFile] When opening a file, if Truncate is asked
for, or implied by other flags, it shall be attempted, regardless of
what other options are selected. We previously did this on Windows;
now we do so also on Unix (even when appending).
Task-number: QTBUG-13470
Change-Id: I1e08d02cfbae102725fccbbc3aab5c7bf8830687
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I6d0bf78d02d166307f864f1f83a3b600ef6a9b0b
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
It was supposed to be used in Qt Quick Controls 1, for the desktop
style, but the followup patches in QQC1 never landed, and QQC1 is
now deprecated.
Change-Id: Iceefd523fc02a9e48b986dc33bb13a41804dd199
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
As now the feature 'dtls' depends on the feature 'openssl' - ifdefs
are redundant, this code is always 'openssl-only'.
Change-Id: I6a7fe9e3a00ae05656af1626e7de74e813df5d32
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
__has_include(<compare>) is not the correct way to detect this feature,
since that's a library header and may be provided by an implementation
(libc++) before the compiler supports the syntax.
Change-Id: I80aae0d068974d83b6c0fffd1544c8e558e2446b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
For keys, QSettings escapes all characters outside of [-a-zA-Z0-9_.]
by using percent encoding, and changes '/' to '\'. That is,
settings.setValue("qt.*", true)
will be written to an .ini file as
qt.%2A=true
This means that QSettings can not be used to write general-purpose
qtlogging.ini files. Fix this by applying the reverse transformation
method from QSettings when reading in the .ini file.
[ChangeLog][Logging] Qt will now accept qtlogging.ini files
written by QSettings.
Task-number: QTBUG-69548
Change-Id: I55b7a8b433291268dc6855901f72b1c04f8ee6d3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
CONFIG+=lrelease enables that all .ts files in
TRANSLATIONS or EXTRA_TRANSLATIONS are compiled by
lrelease.
EXTRA_TRANSLATIONS is a new variable that is only
processed by lrelease, but not lupdate - this
is useful for translation files that are supposed to
be empty, because they match the language of the
original translation sources.
If embed_translations is also set, the generated .qm
files will be made available through the Qt resource
system under :/i18n/. Alternatively, the user can
specify an installation target by setting
QM_FILES_INSTALL_PATH.
Note that relative paths in TRANSLATIONS are not taken
into account. That is,
TRANSLATIONS = component1/de.ts component2/de.ts
will cause a conflict.
[ChangeLog][qmake] New CONFIG options lrelease and
embed_translations were added. CONFIG+=lrelease does
run lrelease on translation files listed in TRANSLATIONS
and EXTRA_TRANSLATIONS. CONFIG+=embed_translations does
include the generated .qm files as resources under
:/i18n/.
Change-Id: I94db5b8431d07b24f59b2c332ede91450f9c0c58
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
I'm not sure why QSFPM purposefully emits dataChanged for a source
dataChanged that triggers a layoutChanged (i.e. due to sorting, multiple
rows are moving around). (This predates the git import in Qt 4.5.)
Surely whoever is listening will not gain much from the "small" dataChanged
after the "big" layoutChanged... anyhow, this documents the current behavior,
at least.
It also proves that the bug I saw long ago (changing a filtered-out
value used to emit dataChanged(invalid, invalid), IIRC) is no longer present.
Change-Id: I8975c549db88226b2b3393de9f8dca4f4109df15
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Allow to use binary search instead of iterate over array
Change-Id: Ibcce1a2296e85f51a61fbb5e64e23e5a27464959
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Unfortunately, this enum is not 'binary', it also has 'UnencryptedMode'
and as a result we can end up with server-side method/context.
Change-Id: If2da4c1b9f7e9ff916d933c9517c00a632aea324
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This change frees the tests of their dependence on the Qt internal test
server (qt-test-server.qt-test-net). It makes the developers run the
tests out of Qt testing infrastructure.
If the user has installed Docker engine on their host, the test servers
will be built up inside separate Docker containers, and then, the test
case goes with the Docker-based test servers. Otherwise, the test case
will keep using the Qt internal test server.
Task-number: QTQAINFRA-1686
Change-Id: I518bc3675bfd658938509744b0e7e0610bc8bf66
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
The emulation was not working since the vertices are clamped before
getting to the fragment shader. So instead just resize the brush if
not supported.
Change-Id: I856e47890cd3021874b77d869a6ff7162cadde10
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Turns out on OpenGL ES, only the GL_RGB10_A2 form is allowed as a
render buffer storage format.
Change-Id: I42915b61835167ae457aae91da7e75065dd3eb21
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This way the logic can be reused elsewhere.
At the same time a standard OpenGL ES/3 way of handling BGRA is added,
so we don't depend on extensions, and handling of NPOT and max size
which QSGTexture will need.
Change-Id: I475bc7127f44be3964fdb482c9e86a20db1fbca5
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The ascending variable was a leftover from an old implementation. Now
it's not needed anymore. It's safe to remove it, and the condition can
be removed as well.
Amends commit 699e8fe3a6
Coverity-Id: 11004
Change-Id: I003b7016e9bd3bd523fb70ed4de84211ec840a78
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Change-Id: I719856168a254c90b0bb0943faee5ab0be75b0bd
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
More Qt-style and more natural, also, shorter names.
Change-Id: I97bd68a8614126d518a3853027661435dc4e080d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
After a handshake was completed, TLS socket is in 'connectionEncrypted' state.
So on a read notification, in 'transmit', we call 'SSLRead' to read supposedly
encrypted application data or TLS internal messages. In case SSLRead finds either
ClientHello or HelloRequest from a server, it attempts in a rather sneaky manner
to renegotiate. And as it happens here and there with SecureTransport, SSLRead
fails and the work is only half-done, since we have kSSLSessionOptionBreakOnServerAuth
and kSSLSessionOptionBreakOnCertRequested options set to 'true'. We end up with
completely unexpected errors like errSSLClientCertRequested or errSSLPeerAuthCompleted
(yes, this is so normal and totally expected for 'SSLRead' function to verify
certificates and WRITE messages, no need to document this at all!).
If SecureTransport is sneaky, so can be us:
- in a read callback SecureTransport is probing the type of record
and we can notice a sudden session state change - it goes from
kSSLConnected (which is set upon handshake completion) to
kSSLHandshake (which means a (re)handshake is ongoing);
- if this is the case - we lie to SecureTransport about the amount
of data available (0 bytes), set 'renegotiating' to 'true', return
errSSLWouldBlock;
- in 'transmit', if SSLRead returns errSSLWouldBlock and 'renegotiating'
was set, we call 'startHandshake' until isHandshakeComplete() == true
or some error encountered.
[ChangeLog][QtNetwork][QSslSocket] Implement renegotiation for SecureTransport backend
Task-number: QTBUG-69420
Change-Id: Iaab1336aa3abf3f6ac94b358f3142d2738a18ee9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
With newer HoloLens images every touch event has a pressure of 0.0.
By checking both values we make sure that touch points are handled
correctly for new and old images.
Task-number: QTBUG-69651
Change-Id: Ic16e3416ffb7a89e4c1adbec1703e84aa962b211
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Keep the original class name around for a little longer so we can
generate the correct scoped enum in the moc output.
Task-number: QTBUG-47652
Change-Id: Ib5934316fa786cc475335b03c86b8ec2dc239055
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
When we have the named keys and not just integer values, we can output
something unambiously that closer match how the enums should be used.
Output of enums without proper metadata is left unchanged
Before:
QSurfaceFormat::ColorSpace(DefaultColorSpace)
QPainter::CompositionMode(3)
After:
QSurfaceFormat::DefaultColorSpace
QPainter::CompositionMode(3)
Change-Id: I537e879ba8b5c555b2aae9ba831facc88d430443
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>