It depends on QAbstractItemModel, so we need to switch it off if
itemmodel is unavailable.
Change-Id: I97246767a5e387b7a2cee90c34125a8411ef1c4e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This follows the naming convention for global headers and causes
qttestglobal.h to be added to the top of the generated QtTest header. It
is necessary to have it there when other headers depend on features
defined in configure.json.
[ChangeLog][QtTest] The qtest_global.h header is now deprecated. Include
qttestglobal.h instead.
Change-Id: Iaed639d4e13dd99cee6387fce9d15d6e55b0b1e8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Previously it was only enabling use of TLS1.0, unlike our openssl
backend, which understandably caused some confusion among some of our
users.
Seeing as this is also the default value in QSslConfiguration it is nice
to have it negotatiate more secure ciphers.
Task-number: QTBUG-67112
Change-Id: Ie216703da1ec4e6b973a881040e14816ad4c0a32
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This should be tied to the CustomizeWindowHint flag:
if that flag is set we start out without NSResizableWindowMask
and possibly add it later on if WindowMaximizeButtonHint
is set.
Change-Id: I7e826d4bd357a8a17c60cfef948af25d61b66ebf
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This helps to distinguish timeouts from real crashes in COIN.
This is already done for Windows.
Change-Id: I4daeafa36f50482d20cea4bd1106647081ff7abe
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Qt::SvgMiterJoin is more important than the name suggests: It is used
not only by SVG but also by PDF. It differs from Qt::MiterJoin in the
miter limit behavior.
Task-number: QTBUG-52640
Change-Id: I8ad04b1231958628caab18a233d54d42ea6449e7
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
FT_LCD_FILTER_H wasn't defined because we weren't including the header.
To fix it just remove the checks, as was done for Linux and assume
sub-pixel is there. If it's not then no harm done, it won't use any.
Change-Id: I76f50cb17e41621c45c03cb7d5c75c110557ea68
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
We report it in the overview, but left no way of controlling it
Change-Id: I1d31f2e31bb32566f47069c3776e41033ffb1891
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
They are faster, and using them makes it paint commands be the most
CPU intensive part of lancelot instead of regular-expression matching.
Change-Id: Ifabf1081c48a83ce089660049051428fd3a43042
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Use QT_CONFIG(regularexpression), disentangle it from QT_BOOTSTRAPPED,
switch it off in the bootstrap build, remove the #ifdefs from
qregularexpression.{h|cpp}, and add QT_REQUIRE_CONFIG(regularexpression)
to the header.
qregularexpression.{h|cpp} are already correctly excluded in tools.pri
if !qtConfig(regularexpression).
Change-Id: I21de154a6a118b76f99003d3acb72ac1e220d302
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Require it in the headers and exclude the implementation from the build
if disabled.
Change-Id: Ida3303f8595f47b469e92d68e8bccc3957d943b6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Loading empty glyphs in some fonts would cause the application
to crash with an infinite recusion on the stack between qfontengine
and qfontengine_ft:
12 0x00007ffff6954395 in QFontEngine::alphaMapForGlyph (this=0x7fb0c0, glyph=50, subPixelPosition=..., t=...) at text/qfontengine.cpp:877
13 0x00007fffee7d104e in QFontEngineFT::alphaMapForGlyph (this=0x7fb0c0, g=50, subPixelPosition=..., t=...) at freetype/qfontengine_ft.cpp:2096
14 0x00007fffee7d0ea8 in QFontEngineFT::alphaMapForGlyph (this=0x7fb0c0, g=50, subPixelPosition=...) at freetype/qfontengine_ft.cpp:2078
15 0x00007ffff6954395 in QFontEngine::alphaMapForGlyph (this=0x7fb0c0, glyph=50, subPixelPosition=..., t=...) at text/qfontengine.cpp:877
16 0x00007fffee7d104e in QFontEngineFT::alphaMapForGlyph (this=0x7fb0c0, g=50, subPixelPosition=..., t=...) at freetype/qfontengine_ft.cpp:2096
17 0x00007fffee7d0ea8 in QFontEngineFT::alphaMapForGlyph (this=0x7fb0c0, g=50, subPixelPosition=...) at freetype/qfontengine_ft.cpp:2078
18 0x00007ffff6954395 in QFontEngine::alphaMapForGlyph (this=0x7fb0c0, glyph=50, subPixelPosition=..., t=...) at text/qfontengine.cpp:877
...
Fix this by trusting the freetype fontengine that it could load the glyph,
as the base class anyway can't do better.
Task-number: QTBUG-62331
Task-number: QTBUG-66617
Change-Id: I6c7c24d24ec0f71a66fa519c04a336f276e418f6
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
The parsing of the DISPLAY environment variable was wrong,
and only worked by accident for DISPLAY=':[0-9]'.
Task-number: QTBUG-62068
Change-Id: I6860e3907c9b1ad6e538d1b5d08628cd306b4aa1
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Generated files should be added to RESOURCES with an absolute path.
Task-number: QTBUG-67011
Change-Id: Ief82b576824df9abd0901970f076e30dfe57b7d0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This makes the pointer that was in the moved-into object be destroyed
before the return of this function (if the reference count was 1),
instead of letting it live in the moved-from object.
Task-number: QTBUG-66322
Change-Id: I3debfc11127e4516b505fffd151209292bd3adaa
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Since we won't use the high bit of the low 32-bit word at all, we don't
need the AND with 0x7fffffff either. Just cast.
Change-Id: I72f5230ad59948f784eafffd151aa5a7dee995db
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
When the thread that got woken up by release() is supposed to release()
to wake up another thread, we were deadlocking. This happened because we
cleared the bit indicating that there was contention when the first
release(). Instead of storing a single bit, we now store the number of
threads waiting.
Task-number: QTBUG-66875
Change-Id: I72f5230ad59948f784eafffd15193873502ecba4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
No longer needed. The comment about missing constexpr support is
incorrect: MSVC 2015 does have constexpr issues, but they don't affect
our use of std::atomic.
Change-Id: Ie9d9215342d449c48a11fffd151d11208137f00d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
MSVC atomics still use the generic version, instead of qatomic_cxx11.h.
The implementation of fetchAndSub is implemented on top of fetchAndAdd,
but produced a warning with unsigned types.
Change-Id: I72f5230ad59948f784eafffd151aa53435b75298
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Resizing is broken on Wayland EGL on Intel Mesa. Move resizing into a separate
test and skip it on Wayland it until it's fixed in Mesa.
Task-number: QTBUG-66848
Change-Id: I9450a5a588b0f5d8f0bd0210aae2dc72aa48d622
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
QRasterPlatformPixmap::systemOpaqueFormat returned QPlatformScreen::format
without checking that the format was actually opaque.
This caused several QPixmap tests to fail on Wayland because Wayland
compositors don't communicate the native format of the screen, just a list of
supported pixel formats, so we just return ARGB32_premultiplied in
QWaylandScreen::format().
Rename the method systemOpaqueFormat to systemNativeFormat since that's how
it's used most of the time. And do a conversion when we actually care whether
the format is opaque or not.
Task-number: QTBUG-51748
Change-Id: I47dc1c3f185fb802016ca361206d47d02e8d3cf1
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
by using the other QPageLayout constructor
Task-number: QTBUG-47551
Change-Id: I9c3635d4a460437febefdfb9d259d508b61c1f29
Reviewed-by: David Faure <david.faure@kdab.com>
We have this QString() constructor call to permit things that convert to
QString but aren't QString to be used in qPrintable, like a
QStringBuilder-powered fast operator+ expression, like:
qPrintable(string1 + ": " + string2)
Unfortunately, it meant that we unnecessarily created a QString copy if
the input was already QString.
Change-Id: Iecab8770aa5840aba8edfffd1516bc94cec791a9
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This fixes the following:
- tst_QSqlDatabase::recordMySQL() to account for performance
improvements done for small integral types
- tst_QSqlQuery::nextResult() so that NUMERIC results are seen
as doubles
- tst_QSqlQuery::timeStampParsing() so that MySQL accepts the
CREATE TABLE statement
Change-Id: I68fb1d06dac12d500bb4596463f5bdd65cc9c226
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This ensures that the generated XCode project can correctly find any
files that are referenced via a path containing "..".
Task-number: QTBUG-35131
Change-Id: I049bc2279b4c515a82acd61142d25b8c240e8f6e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
When using a virtual table inside a SQLite database it is possible that
it does not report the right number of parameters. Therefore we need
to account for this case to prevent it from crashing when trying to
bind parameters it thinks does not exist.
Task-number: QTBUG-66816
Change-Id: I3ff70bb1fe73091f43c3df53616f75858e451cfd
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Factor out the line edit displaying the code to a class and add
another instance for displaying raw string literals.
Task-number: QTBUG-60635
Change-Id: I4614e4a56e355bad5158523c58edf784868dbf4d
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This is used by qfloat_f16c.c → qsimd_p.h → qsimd_x86_p.h.
Change-Id: I359898686ce545f69847fffd151c785237a54b94
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Change the code to detect mouse mode only the first packet after
receiving the enter proximity event, using the current tablet
position. This should prevent mis-detecting mouse mode due to lags, etc.
There is a theoretical chance of failing to detect mouse mode should the
positions match resulting in differing speeds of mouse/tablet positions, but
this seems to be a negligible risk.
Task-number: QTBUG-36937
Task-number: QTBUG-64781
Change-Id: I27ca4a17786164dc8b25c4614a88672e150d5fe3
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
When network access is disabled, every QNAM request returns a
QDisabledNetworkReply instance, which emits error and finished
immediately. However isFinished() was still false, which could confuse
application code.
Change-Id: Ifd43c86364b11a9583a38fde536e6c09c109b55f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
If a target item was passed, QGtk3Menu tried using gtk_menu_set_active()
to select the target item. However, the function does not do what you'd
imagine. Even the documentation states:
This is used by the GtkComboBox and should not be used by anyone else.
The correct function, gtk_menu_shell_select_item(), is in the GtkMenuShell
"base class".
Change-Id: Ia2c03f87bb97f618c041c03011af8c676108aea5
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
There was an offset equivalent to all the margins we add to
the action rectangles. We need to subtract it in order for
both menu items, parent and sub-menu, to be aligned. This
amount is given by the sub-menu's first action position
relative to its popup.
Change-Id: I141bbe3cfb81825a25b12e4059b93e61c29df518
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Matches glibc commit 9a0cc8c1bd7645bf3c988890ffb59639c07a5812.
[ChangeLog][QtCore][QUrl] Fixed a bug in parsing IPv6 addresses with
more than 4 hex digits in a component.
[ChangeLog][QtNetwork][QHostAddress] Fixed a bug in parsing IPv6
addresses with more than 4 hex digits in a component.
[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=9a0cc8c1bd7645bf3c988890ffb59639c07a5812
Change-Id: I2701038131d91eb108aebb3bec16278e4efe3de2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This reverts commit fdddb3a481.
After b85b272c26810e54a4ceb0707cf4569f87517b67, Windows 10
(msvc2017-x86) is tested on Windows 10 (msvc2017-x86_64). The
failure is gone.
Task-number: QTBUG-66798
Task-number: QTBUG-66216
Change-Id: Iba353b18b0be1346007fde674a9f768c4b9bf384
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This reverts commit a0db55040d.
After b85b272c26810e54a4ceb0707cf4569f87517b67, Windows 10
(msvc2017-x86) is tested on Windows 10 (msvc2017-x86_64). The
failure is gone.
Task-number: QTBUG-66756
Change-Id: I4a8e8c62b4a021d144d570c38c4f4c10e8b1317c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Many Android systems come with a locked down system call list, causing
the statx(2) system call to fail with an unexpected error code or by
delivering a signal to the application. Because of the signal, we can't
do runtime detection...
This is not our bug: it's obviously a mistake in the SECCOMP rules in
Android. But we work around the issue.
Unfortunately, because of a few manufacturers who can't configure their
rules properly, everyone will suffer.
Task-number: QTBUG-64490
Change-Id: I39332e0a867442d58082fffd1507a49415917384
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
There is no codepath that can result in d->baseTheme being nullptr.
Remove the checks and get rid unneeded and sometimes dangerous fallbacks
(createPlatformMenuBar(), showPlatformMenuBar() and three more methods
could overflow the stack because of infinity recursion).
Change-Id: Ib03adadf56c169286de42671e2da506502df7aea
Reviewed-by: Jan Grulich <jgrulich@redhat.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
it's antithetical to do that, as raw data is documented to be not null-
terminated. QString doesn't, either.
Change-Id: I7ded83a09f64e747a248f9bdac2a364032aae4c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Avoid doing the conversion over QRgba64 when we don't need it.
Change-Id: Ic2f82bef0a80b17ef7803eedcdb0600eeac96489
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Check whether an Open GL context could be created, else
fall back to raster.
Task-number: QTBUG-64797
Change-Id: I91bba41b0efca85293a1a4af054842b9f309b126
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This function was not appearing in the QVariant docs because the \fn command
was wrong and because clang was not seeing the declaration in qvariant.h in
the first place. With this update, the function does appear in the docs, but
it's signature is not correct because clang can't find a definition for
std::variant<Types...>, which probably means it doesn't have the most recent
declarations in the std namespace.
Change-Id: I7912ff333e5d4a8619461dd3ab7ee34bcd8f2289
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Allocate new shared memory only when window size grows or when window
size is 2 times smaller than allocated memory size. This improves
window resizing performance and also allows to free some memory if
window becames much smaller.
Change-Id: I3454cd3c6023eede8242d6b29038f4dd6638f9f1
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>