Unify the code paths which test the normal match, the partial
match and the global matches. Not only does this remove the duplication,
but it will also enable the corresponding tests to be run over QStringRefs.
Change-Id: Ia2cbe7a540bbe864b0975c9353697bc06c99c397
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
That commit exposed part of qfunctions_winrt.h for non-WinRT use
(Windows 8) without wrapping with Q_OS_WIN. That meant the headercheck
pass failed to compile when outside of Windows.
Change-Id: Ie731cce21e5102f5e5879b147b7738a7d0a91ecd
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
QSslKey currently has methods which supposedly allow decoding and
encoding private keys as DER protected by a passphrase. This is
broken by design as explained in QTBUG-41038, as storing the encrypted
DER data alone makes no sense: such a file lacks the necessary
information about the encryption algorithm and initialization vector.
This change:
- explicitly stops using the passphrase when decoding DER in the
constructor. The behavior is unchanged, it is not possible to
read the encrypted DER alone.
- refuses to honor the passphrase to DER encode a private key. The toDer
method now outputs an empty QByteArray instead of garbage.
Task-number: QTBUG-41038
Change-Id: I4281050cf1104f12d154db201a173633bfe22bd9
Reviewed-by: Richard J. Moore <rich@kde.org>
This adds a test for 3DES encrypted keys in addition to the
current DES encrypted keys.
Change-Id: I229e3ef710e9ee23efa2a3275b89d958491de4a2
Reviewed-by: Richard J. Moore <rich@kde.org>
Move from a stub to a functional SSL socket implementation.
This implementation has some limitations. Due to the way the native
SSL upgrade works, it is not possible to ignore SSL errors after the
handshake has begun. The user must set the ignore flags before
connecting to the host.
Due to missing implementation in the underlying native socket, the
synchronous methods (waitForConnected(), waitForDisconnected()) are not
functional either. Users must rely on the asynchronous methods instead.
This is not a problem in the general case, as HTTP(S) is not affected.
SSL server sockets are not supported by the native API, so it is not
possible to bind an SSL server socket.
Change-Id: Id0b323f273892580b294aa5a6ff601a8241470df
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
The native handle and import functions are now available for use in other
parts of the winrt backend.
Change-Id: I07e6f95b3411c3dc7c1a7a164544b18e5e435d01
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
This internal implementation of QSslKey can be used when OpenSSL is not
available. Encrypted keys are not supported, as the cryptography must
be supplied by a separate library.
With this commit, WinRT is migrated to the new implementation,
but qsslkey_winrt.cpp is left in place so that the missing crypto
implementation can be added later. This also means most of the expected
failures for that platform can be removed from the autotest.
Change-Id: I24a3ad1053bb72311613b28b3ae845aa1645a321
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
This makes it significantly easier to obtain debug output
for style functionality.
Task-number: QTBUG-38858
Change-Id: I19edc834a55fa369b6830abeb4697ae5e5ded995
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The .spec file is no longer updated thus support for gl 4.4 is impossible without an update to parse the new xml spec. The legacy parser can be used with the -l (--legacy) switch.
Task-number: QTBUG-33671
Task-number: QTBUG-40090
Change-Id: I83d9380842a16e925f6c07331ee35fe035f6baa9
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Don't truncate the maxlen to a DWORD. Instead read all
data incrementally up t maxlen.
Task-number: QTBUG-27796
Change-Id: I21c34d11046f1106244dcd77420cc472e7240e68
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Make the warnings that are displayed during the reading of index
files and dependencies more consistent by using QDoc's error
logging functions.
This means that warnings are not generated in prepare phase,
but they are generated for projects that call qdoc directly,
running prepare and generate phases in one go.
Change-Id: I645c3feb1cbf471fd3ca6034f94e7dc1ea35b875
Reviewed-by: Martin Smith <martin.smith@digia.com>
It was already forgotten for 5.0, let's not continue
to use Qt 4 BC hacks in Qt 6, too.
Change-Id: Ifa798115562ebd15dd9beade73a49dfbc23a208f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Timer granularity means that sometimes this won't wait the full timeout before
vanishing the message. Add some extra tolerance so we don't unnecessarily fail
integrations.
Change-Id: I203ac16cda7bd1f0437dd3febc0509c17e86c25a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This changes tests which use QSslCertificate::handle() to determine
if a certificate is null to use QSslCertificate::isNull() instead.
This is required for non-OpenSSL backends which do not actually
expose a private handle.
Change-Id: I9523ba0dd00d47ba337b543ad34840125db99bfb
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Bump minor version of the saved geometry and append
the screen width in version 1.1. Use that to check and bail out should
large differences occur due to scaling or different levels of DPI
awareness.
Task-number: QTBUG-38858
Change-Id: Iad8ae0705297118b4237c9a41469cb97d7eab549
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
Moves feature checks so OpenGL vs OpenGLES is only tested one way
and extensions so they are not tested if already required by their
version.
Change-Id: Ia77f6ea924559fa7a428beb6316ae392063dfc4f
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This is needed to prevent lock-ups in application that use ANGLE from
multiple threads, as e.g. QtWebEngine based applications do.
The environment variable QT_D3DCREATE_MULTITHREADED is used to
communicate this from the QtWebEngine module.
Change-Id: Ibd5a5c75eb68af567d420d9a35efb3490c93b27c
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
As a side effects it also adds core templates types to the tests
Change-Id: I0e3338e0bffdf21982aa83d404c83288e54411f4
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
...by instantiating std::count() not with QVector::const_iterator, which is a
class, but with const T*, thus increasing the chance that the instantiation
can be shared with other instantiations in the executable. It might also enable
STL implementations to choose a hand-optimized version of the algorithm for C++
builtin types.
Change-Id: I93df4e58f76838d98b565f229c19e317774b7b4c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Same change as was already applied to QVector::operator==().
Change-Id: Ic2e140a52ee95f2e215668077951de0b4450d194
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Assuming the CPU has already loaded 'this', the value of 'd' is just
an indirect load away. The value of d->size, however, is two indirect
loads away, one of which is the load of 'd'.
So it makes more sense to check for d-pointer equality first, as that
can proceed in parallel with the fetch for d->size, which the CPU
may speculatively trigger.
In addition, at least GCC in release mode after this change doesn't
set up the stack frame if the d-pointer check succeeds.
Change-Id: I61f9b245070dd1742fca6ccb8d4936a0b1aa7c07
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Simplify the temporary buffer usage by using the built-in WinRT Buffer
class. This also allows one use of the local event loop to be removed.
Change-Id: Ice552910227ffbe31c6e8716ff7896af7c4532ef
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
This stores the socket pointer in the descriptor, rather than an
abitrary handle, so that it is easier to access from e.g. SSL socket.
To further support SSL sockets, a special case for SSL sockets is
made so that the the socket reader installation can be delayed until
after the socket is encrypted (as this is the only supported mode of
operation with StreamSocket).
Change-Id: I693229189722dc43b221b167e8256f5497a50346
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Similarly to 1b19f660 (which added socket flushing before close), the
socket should have a chance to disconnect if the write buffer is not
empty. Instead of flushing, the pendingClose is added so that the
backend may disconnect the socket once these bytes have been written.
Change-Id: I2d85b6356c3e158bade3d5d86161d3e33649cad6
Reviewed-by: Richard J. Moore <rich@kde.org>
Localized font family names and their aliases are stored in font database.
However, fallbacksForFamily gets non-localized family names which results
in family name mismatch.
Change-Id: Iddf9101e15a0e49c5ba4c049969fc90cb7853443
Task-number: QTBUG-40978
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This patch adds indexOf and lastIndexOf with QRegularExpressionMatch
output overloads to QString. This allows to get the match corresponding
to the index returned.
[ChangeLog][QtCore][QString] Added support for retrieving the
QRegularExpressionMatch to indexOf and lastIndexOf.
Change-Id: Ia0ae2d3ff78864c7053ffa397874aca1d2b1c35c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Testing using an empty string doesn't ensure that the regexp
gets validated. The function may return earlier thus making
the test useless. This patch adds a text to search in so that
no early optimization avoids the regexp validation part
Change-Id: If24b77385dde44a922d43e5ae1d7a5393d24f640
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This moves the socket backend's host name matching functions up to
QSslSocketPrivate so that they can be shared between backends. This
works, as there is no OpenSSL-specific code here.
Change-Id: I73c2081fdc2e60a44c90e90800d1e1877391a626
Reviewed-by: Richard J. Moore <rich@kde.org>
There is a significant performance regression with using
QOpenGLVertexArrayObject::Binder on platforms not supporting VAOs. This
is because of the function resolving/initialization in create which is
called once pr bind if d->vao == 0.
Change-Id: I74e77f50921116c306247dc371c68b287a2e22d7
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>