Use C++11 alignas instead of a union to pad the
xcb_*_event. It allows using the struct directly
without accessing a union member.
Change-Id: I221a6708ef7af844bd6b71a57dcbab75e1319c72
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Since the .cpp files in the implementation don't actually include the
offending X11 headers they don't need the fix. This just adjusts the
headers themselves to unbreak the namespace for just long enough to
declare the right enums.
Change-Id: If33757aa2289f8fe7b81836f9c08b0ad4592bc32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit also fixes a grammar mistake (endian → endianness) and the
fact that some functions failed to list that they supported the unsigned
integer types as template arguments.
Change-Id: I19445f335e82420fa654fffd15334e52ef3e744d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This is just the low-hanging fruit. Those algorithms could be much
further improved, but they are so seldom-used that it's not worth it.
Change-Id: I6a540578e810472bb455fffd15332b2a7a1ac901
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The compiler was generating some vectorized code for qresource.cpp but
it wasn't very efficient. So improve upon it and make use in other
places where we read UTF-16BE strings.
[ChangeLog][QtCore] Added an overload of q{To,From}{Big,Little}Endian
that operates on a memory region.
Change-Id: I6a540578e810472bb455fffd1531fa2f1d724dfc
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
I'm going to add code in the next commit.
Change-Id: I6a540578e810472bb455fffd153329de04c1c332
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Happens a lot because of the implicit conversions. So I made it inline.
Change-Id: Icc2c231dc2c44abdb087fffd1533f311b95460b8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Questions:
1) should QCborMap::extract return value_type (a pair) instead of just
the value?
2) should the both return the iterator to the next element too, like
erase()?
Change-Id: I052407b777ec43f78378fffd15302a9c14468db3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This change only adds them to the registry and reserves the IDs. The
next commit will handle conversions.
Change-Id: I56b444f9d6274221a3b7fffd150d2d49f40940c2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
I added a function that returns the string identifiers for
QCborKnownTags and QCborSimpleType, in order to facilitate writing a
QTest::toString for those types, as neither enum is part of a Q_OBJECT
or Q_GADGET class.
Change-Id: I56b444f9d6274221a3b7fffd150d2d26a1925c19
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Writing out one test result per line in the test data files is
excessive and only bloats the log, given that this algorithm
is rarely changed.
Task-number: QTQAINFRA-2037
Change-Id: Ib9e568c7ded73d45e4b64671e97d5581a74f8f93
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fixes ambiguous template instantiation for types that derive from both
a QObject and Q_GADGET. For such types we treat them only as QObjects
as they extend the functionality of the gadget.
Task-number: QTBUG-68803
Change-Id: Ic42766034e14e5df43c4e6f7811e2c0be1dc7e74
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
To make the minimum amount of changes:
- Extract the library files into the expected hierarchy.
- Introduce a variable with the path to the directory.
- Make the static function a member function so it can use the variable
Change-Id: Ibf3106c3606d198a8deb8cb2a5cbde57207221c7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Makes sure the tests are skipped on Wayland.
Task-number: QTBUG-62188
Change-Id: Ia50d6cc02fbbac0fb6b77a16eb6372c1adb422d8
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Input value which is over the highest acceptable value, but consisting
of a number of digits equal to or less than the max value should be
considered intermediate.
[ChangeLog][QtGui][QIntValidator] Input value with over the highest
acceptable value, but with equal or less amount of digits than the maximum
value is now considered intermediate.
Task-number: QTBUG-59650
Change-Id: I71a77c9c266f0f3b62c71ac6cb995019385c1cf5
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Do not rely on the side-effect that QTextStream returns _null_ strings
(rather than empty strings) to signal EOF; just check for it,
making the code easier to read.
* Scope a variable properly
* Use the char-based functions, rather than string-based functions
(e.g. QString::split(QChar), not QString::split(QString)) when we're
actually passing just one character
* Make error cases more verbose
Change-Id: I415773a60ea1b9013193a9a77e52655a6459047d
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
If a display is placed above a primary screen which has the top left set
to be 0x0, then menus that are defaulting to go up can still be
displayed on that screen when the menubar is placed on the bottom of it.
This ensures that this is the case and also adds a manual test to aid
verification of it in the future.
Change-Id: Ib657ccdc1aabfe1586c72585c087ac80a6c632c2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Adding references where applicable, as removed by
023a818738 when removing stale example.
Add example run snippet to the example landing page.
Remove stale example qdoc file that is superceded by current example.
Task-number: QTBUG-69191
Change-Id: I62dc66edc86da5efb4c79fd124edb2fa619aeb6b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Use CamelCase, like the API they're tracing.
Change-Id: Ie718ab624d17c9186bcf05cc1276c8eccad7f454
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Add tracepoints in all the main codepaths for event handling:
* QEvent ctors/dtor
* QCoreApplication::postEvent, sendEvent and sendSpontaneousEvent
* QCoreApplication / QApplication::notify, and around the handling
of event filters as well
I'm switching the name of the tracepoints themselves to have the
very same casing of the functions in Qt's own source code, this
improves readability a lot. The pre-existing ones will be changed
in an upcoming patch.
Change-Id: Iae2ba2bfdd76a82c85445bb5b86434e910427a70
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
In general we want to support pointers and pointer-like types
(intptr and its variations); the main use case is tracing an object's
address. Adjust the lttgt generator to use hex formatting
for this kind of aguments; ETW recognizes the pointer argument type
automatically.
Change-Id: I8249a49b6d0b2d468b84c0fbb7624625421cde9a
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
The existence of the helper application confuses Coin which will
result in an error.
Change-Id: I3edf3f27acbe133b180d41a8ae950991e9a5b5da
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
The test and its helper were removed some time ago.
Change-Id: Id82a2a1bf829f272e9c1447e697935934c923092
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Not putting executables into debug/release subdirectories leads to the
WinRT AppxManifest being overwritten by the wrong configuration. When Qt
is configured with -release for example, it was possible that the debug
manifest (Manifest files are always created next to the target) is
written last and thus contains debug VCLibs as a dependency.
Additionally the test was changed in that way, that the resulting file
system structure (having helper and test application in a "top level"
debug and release folder) is the same structure as in tst_qobject.
Change-Id: I017b501506c54c4b89773d2b949c097598bc7049
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Not putting executables into debug/release subdirectories leads to the
WinRT AppxManifest being overwritten by the wrong configuration. When Qt
is configured with -release for example, it was possible that the debug
manifest (Manifest files are always created next to the target) is
written last and thus contains debug VCLibs as a dependency.
Additionally the test was changed in that way, that the resulting file
system structure (having helper and test application in a "top level"
debug and release folder) is the same structure as in tst_qobject.
Change-Id: I53d5238ff36706eb9c6f8eb04b954ec595ca30de
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Not putting executables into debug/release subdirectories leads to the
WinRT AppxManifest being overwritten by the wrong configuration. When Qt
is configured with -release for example, it was possible that the debug
manifest (Manifest files are always created next to the target) is
written last and thus contains debug VCLibs as a dependency.
Additionally the test was changed in that way, that the resulting file
system structure (having helper and test application in a "top level"
debug and release folder) is the same structure as in tst_qobject.
Change-Id: I55078563304959c41e0dd9bb7bb91a6fc51e005a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
... where we do initialization of all other extensions. Having this code
in QXcbVirtualDesktop does not make sense.
Change-Id: I3bf3034b4a24e06aa5792e7d49133f46c5728b07
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
For performance, the triangulation of a painter path is stored for
reuse. Re-triangulation was only done if the path was to be painted at
a significantly different scale AND it contained a curve (bezier)
element. But also the triangulation of a path with only straight lines
can lose precision if rendered at a small scale, and so look bad when
used at a higher scale factor.
Fix by removing the mentioned curve element condition.
Task-number: QTBUG-68873
Change-Id: Id3492514e9382a5828377b7bafea8cfac7b850a6
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
.qdoc files should only be licensed under FDL (for documentation) or
BSD (if they only contain code).
Change-Id: I2a8a5b2c7bd3f927b8f71506c3672bc4916aca1e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
The automatic showing/hiding of the built-in on-screen keyboard in
touchscreen-based Windows computers, like the Microsoft Surface line,
has stopped working after recent Windows updates. The OSK no longer
seems to rely on UI Automation properties to detect text widgets.
However, it can be triggered by showing an invisible caret.
Task-number: QTBUG-68808
Change-Id: Ia604d21e314965dcdc61f1ced050cc3ed771f567
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
By disabling the "stdinprocess"-related tests/code...
... but differently. After fixing my earlier mistakes I'm getting
segmentation faults when it executes a couple different library calls
after the QProcess object has started.
Task-number: QTBUG-68596
Change-Id: Id42a1f939c000754a187dee90c4a4cdfec816232
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
The "app" subfolder was already excluded in the .pro-file but Android
supports QProcess, so lets include it in the build. Unfortunately it
currently has trouble and crashes (the child process or both processes).
So we skip those tests.
Task-number: QTBUG-68596
Change-Id: I2e6d0869c408bf08b22c02145db8ce522c64c617
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
To make it run we make sure it finds the syslocaleapp, however since it
causes a crash we skip the test that uses it...
"formatTimeZone" was failing, but it is the exact same issue as in
e08ba34f26, so we solve it the exact same
way.
Change-Id: Ifd5c796735775dad94acf55210cf18c0f4d375ca
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Same issue as has been seen a few other places: path to executable being
wrong, and then a crash when the paths are fixed.
Change-Id: I77a596c6e52d2a02a69a6b9dfe91f878b3ffe07c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The row names for this test were very unspecific.
After reverse-engineering what they are testing, I gave them proper
descriptive names, which allowed me to notice that there were tests
for "filtered in after sourceModel->setData" but not for
"filtered out after sourceModel->setData".
Change-Id: Ib79108db803ae77fb65d29cf0c0ef96c26655980
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
- Use %-placeholder formatting instead of string concatenation
for messages of the form "XX failed: %1"
- Introduce helper functions for duplicate messages
- Introduce helper function for message reporting function failures
to avoid duplication
- Extract helper function for reporting SSL handshake errors
Complemements ac583b686d.
Change-Id: Iaf6c158ca8086d0b17a3e3c51955707734829615
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
If you clicked to the right of a text line ended with a grapheme consisting of
several characters, either because it was a unicode surrogate pair or a ligature,
we would always to the previous character in logical order, without checking
if this was a valid cursor position.
One result of this would be that hitting backspace when the cursor was positioned
in an invalid position, would cause the entire contents of the document to
become invalid.
Instead we should search backwards for the previous grapheme boundary using
QTextEngine::previousLogicalPosition().
[ChangeLog][QtGui][Text] Fixed position of text cursor set by clicking outside
the bounds of a text line that ends with a surrogate pair or ligature.
Task-number: QTBUG-69085
Change-Id: I7224c065f332f398bdfbb3f42b2b3ec8280c76a4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
QTableView::doItemsLayout() updated the scroll offset for the vertical
header after layouting was done. Since the scroll offset affects the
viewport of the editors, the adjustment was done too late.
Therefore we update the scroll offset right after the scrollbars are
set inside QTableView::updateGeometries()
[ChangeLog][QtWidgets][QTableView] Fixed calculating geometries
for editors
Task-number: QTBUG-48244
Task-number: QTBUG-49548
Change-Id: I3b057764cf99d42d861928a1c73277d34b440f9a
Reviewed-by: David Faure <david.faure@kdab.com>
It was observed on OpenSUSE VM in CI - apparently, even after succesfull
read from UDP socket error was not UnknownSocketError. While it's under
investigation, the DTLS auto-test should limit itself by DTLS things and
barely test IO success (socket-wise) when needed.
Change-Id: I0773a02c591432b0d6c894f4131f70e41dc7ed72
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
It all started from the compiler's warnings about 'this' captured but
not used in lambdas. While fixing this it was noticed that 'client' socket
has a lifetime longer than the test case itself (the socket has a parent,
which is tst_QSslSocket object). The 'server' socket was simply leaked.
So there is no guarantee that some of them (or both) later, after the
test failed in one of QVERIFY, for example, does not emit 'encrypted'
upon receiving more data; this will result: in reading/writing from/to
invalid memory location (captured local 'encryptedCount') and/or probably
exiting event loop when it's not expected to do so.
Change-Id: I51de0493d989a5ba36de2cef58d35526c0e26cda
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Adding missing "override" keywords in overridden interfaces, using
"#if QT_CONFIG(accessibility)" instead of "#ifndef QT_NO_ACCESSIBILITY",
and other minor bits. No change in behavior expected.
Change-Id: Ief0e23cb7b577dd3e4af21750b6beccc80d6a2f8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>