Filters are usually in format (Name (*.foo *.bar)), but valid filter is
also (Name ( *.bar *.foo )), containing additional spaces. When we split
content in the brackets divided by spaces, there will be then empty
strings which we need to filter out, otherwise the result we send over
DBus is not valid.
Change-Id: Iaa265189408f47324bc9b269d534bf4c8d7d2cae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add a scaling overlooked in 63d08003cf.
Task-number: QTBUG-68194
Change-Id: I97c771435e4316ec55aacc527335b62cb4dfd9ec
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Invalid syntax due to missing closing brackets and
exception not being handled when calling .close()
on a stream.
Change-Id: If8f191fbc44fe1b031fd86abff5163bca434156a
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
tst_QProcess hangs sometimes in QEMU. Based on my experiments in a debug VM the
offending test seems to be processesInMultipleThreads(), since that was were I
was able to reproduce the hanging in.
Since the whole test executable hangs, blacklisting is not enough, so skip the
test.
Task-number: QTBUG-67760
Change-Id: I34f8852be955a8612deac22b369f68d79a139d11
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Otherwise using it later is a compile error on ARM if no header including it has
been included before.
Change-Id: I422eeb948da4a22bc3f649daff39740703039372
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The added test case contains the binary JSON equivalent of
["ž"]
with the modification that the string's length has been set to INT_MAX. In
Value::usedStorage this length is used through the pointer d like so
s = sizeof(int) + sizeof(ushort) * qFromLittleEndian(*(int *)d);
Because 2 * INT_MAX is UINT_MAX-1, the expression as a whole evaluates to 2,
which is considered a valid storage size. However, when converting this binary
JSON into ordinary JSON we will attempt to construct a QString of length
INT_MAX.
Fixed by using String::isValid instead of Value::usedStorage. This method
already takes care to avoid the overflow problem. Additionally, I've tried in
this patch to clarify the behavior of Value::isValid a bit by writing it in a
style that is hopefully more amenable to structural induction.
Finally, the test case added in my previous patch had the wrong file extension
and is renamed in this one.
Task-number: QTBUG-61969
Change-Id: I45d891f2467a71d8d105822ef7eb1a73c3efa67a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Not sure this makes the code faster, but it removes two functions.
Change-Id: I5d0ee9389a794d80983efffd152d830da44b1bfe
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
When QMAKE_TARGET_BUNDLE_PREFIX is set in the .pro file then
this value should be used instead of the default value for
PRODUCT_BUNDLE_IDENTIFIER. Therefore, PRODUCT_BUNDLE_IDENTIFIER
should be set inside default_post.prf so that it can take the
value of QMAKE_TARGET_BUNDLE_PREFIX after it may have been set.
Task-number: QTBUG-66462
Change-Id: Iec1e2a43632efe6021b9d6bfdb78bd941326c456
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Previously the test worked because the client was the last party to know
when encryption was established. However, due to changes in the TLSv1.3
handshake the server is now the last one.
In either case, relying on both to be encrypted when one of them is
finished is not great, so now we only quit the event loop when both
client and server have emitted 'encrypted'.
Change-Id: Ic1fc75671206d866f7ea983805fd58a99657aac6
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The check for having N valid characters is ptr + N <= end, because
ptr + N == end indicates that we have exactly N characters in the
string.
Change-Id: I5d0ee9389a794d80983efffd152d28d5aa485ce4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Fix a typo to properly link to setInputMask instead setMask.
Task-number: QTBUG-61775
Change-Id: I0cb00de8dcaece613467e25b41e93661d6e98308
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
qarraydataops.h:73:17: error: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type
‘struct TCBPoint’; use assignment or value-initialization instead [-Werror=class-memaccess]
Change-Id: I5d0ee9389a794d80983efffd152ce10eb557341f
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Replace the global variables qout, qerr by a functions to delay
the initialization.
Task-number: QTBUG-68166
Change-Id: Ib023da1bccc7eabc6e633ccb8945e5f209c5765e
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Replace with QSignalSpy or QTRY_COMPARE when possible.
Task-number: QTBUG-63992
Change-Id: I18dc8837301424855487a12ee62451a5aeb21bf0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Task-number: QTBUG-67777
Change-Id: I6d52b650fb33283010ef06259da83cdb2fd3483f
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This is useful to see why shortcuts (in Qt Widgets and Qt Quick) are
not behaving as expected. For example:
The following shortcuts are about to be activated ambiguously:
- QKeySequence("Esc") (belonging to QQuickShortcut(0x7fcd4c8e6a70,
name = "exploreViewBackOrCloseShortcut"))
- QKeySequence("Esc") (belonging to QQuickPopupItem(0x7fcd4c8e5110))
Change-Id: Id20a3017d69cfe417c2286dccf46b3d5ff0b31b2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The test relies on the existence of qt-project.org in resources. It
contains mimetype data and is automatically added. For static builds on
MSVC it is only added if it is actually needed though.
Change-Id: Icd1d74466607196f9b635205f7cb4d9b300ec4b8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
If builtin_testdata is present additional data ends in inside of
resources so that tests can access this data when needed. The addiitonal
data has to be taken into account in the resource engine's test.
Change-Id: I10de6b9612ca49b314d77cfadd5b2360a5d90d53
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change-Id: I399cc1aed3ee4151cf6adfd8f8780d8975604d52
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
In recent macOS versions the descriptor created from the function
CTFontManagerCreateFontDescriptorFromData() will contain the
NSCTFontFileURLAttribute with a value such as:
file://iNmEmOrYcGfOnT_0x101d3c3a0#postscript-name=New
Which means we can't use the presence of the kCTFontURLAttribute to
determine that we're dealing with a file font. Instead we check for
our custom kQtFontDataAttribute first, which is only set for memory
fonts.
Task-number: QTBUG-68044
Change-Id: Ie87d06b5a9e0e251305200b717f18ef68ccc6abc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
qdialogbuttonbox.cpp:862:14: error: comparison of two values with different enumeration types in switch statement
('QDialogButtonBox::ButtonRole' and 'QPlatformDialogHelper::ButtonRole') [-Wenum-compare-switch]
Change-Id: I3840d727dee443318644fffd1529350b81678712
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The QKeyEvent::key values were significantly different on QNX
and some QKeyEvent::text values were also different/missing.
Also makes it possible to enter numbers via the numeric keypad.
Change-Id: Ifcf6284b99a893a87974d37ec6d6976f88241e61
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Dan Cape <dcape@qnx.com>
The formatting of the output from QSslCertificate::toText has
changed slightly from before, so it no longer matches the test's
data.
From what I can tell we just do a manual sanity check and create
a new file with the new output and then augment the test.
Task-number: QTBUG-67463
Change-Id: I751e5a3f9a28015f97c895cea47384704fd68e38
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
We were using the wrong free function in a path which was hit in an
edge case (PKCS#12 certificate without a private key attached).
Change-Id: I5335b5dea7a926b242bed0fd9b989b681a5828d8
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The added test case is the binary JSON equivalent of
{"a":{"š":null}}
with two modifications. First, the length of the string "š" has been corrupted
to 0xFFFFFF00. Second and more import, the Base::size field of the inner object
has been reset to 0.
On its own the first modification would normally trigger a validation error.
However, due to the second modification the Value::usedStorage for the inner
object evaluates to 0, completely disabling all further validation of the
object's contents.
Attempting to convert this binary JSON into standard JSON will lead to the JSON
writer trying to construct a QString of length 0xFFFFFF00.
Fixed by validating also objects with usedStorage == 0.
Task-number: QTBUG-61969
Change-Id: I5e59383674dec9be89361759572c0d91d4e16e01
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The added test case is a binary JSON file describing an array which contains
itself. This file passes validation even though attempting to convert it to
plain JSON leads to an infinite loop. Fixed by rejecting it in validation.
Task-number: QTBUG-61969
Change-Id: Ib4472e9777d09840c30c384b24294e4744b02045
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This method takes a pointer+size pair, but begins reading through the pointer
without first checking the size parameter. Fixed by checking the size parameter.
A new test case is added with an empty binary json file. Although the test does
not fail under normal conditions, the problem can be detected using valgrind or
AddressSanitizer.
Task-number: QTBUG-61969
Change-Id: Ie91cc9a56dbc3c676472c614d4e633d7721b8481
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
GCC and Clang assume that all Sandybridge (2nd generation) and newer
Intel Core™ processors have AES, which I used as a source of information
for this code. However, there are a few low-end parts that miss this
feature, like Intel Core™ i3-2350M, i3-3130M, i3-4000M.
[1] https://ark.intel.com/products/series/75025/4th-Generation-Intel-Core-i3-Processors
Task-number: QTBUG-67705
Change-Id: If90a92b041d3442fa0a4fffd1525b9afbcb6e524
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The global monitor will be used when popup windows are visible to
catch all mouse events. But only certain kind of NSEvents has a
buttonNumber set to something useful. So we need to check for
this case before we create a QPA event.
Task-number: QTBUG-60887
Change-Id: I5631c76ae82b8bfd232642036a08b5a8a29491c7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Initialize the device earlier and enable the screen as well.
These changes are also compatible with the RCar H3.
Change-Id: I4a83dedc0eed9df181c32e60ebf3666824d2a6c6
Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
If the pipe creation fails, we need to properly close the pipes that
were successfully created, emit the signal indicating failure and set
the state back to NotRunning.
The error string is reused from below, so there's no new translatable
string.
Task-number: QTBUG-67744
Change-Id: If90a92b041d3442fa0a4fffd1526207698f234a6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>