Alloca() is not supported on all platforms, like
INTEGRITY on ARM, so adding a configure check for it.
This can be used when building QtQml and 3rd party
code, in particular PCRE2 and SQLite.
Change-Id: I9785e16c21f67d1a68fef567e18c3356170f027e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Although it's permitted to specify the project name together with
a version number for \since, it's unnecessary for Qt classes and
functions.
This change also normalizes the version formatting: '<major>.<minor>'
Change-Id: Ie5a43662077d13c31e241bcde8a7a2849d27d330
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
benchmarktests.h:323:18: warning: field 'm_as_pixmap' is uninitialized when used here [-Wuninitialized]
benchmarktests.h:371:18: warning: field 'm_as_pixmap' is uninitialized when used here [-Wuninitialized]
benchmarktests.h:417:18: warning: field 'm_as_pixmap' is uninitialized when used here [-Wuninitialized]
Change-Id: Ica496e3baa19e0701c64222ce8ab92ec94178db7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
It's included by qglobal.h, so we get it for free in other headers.
Change-Id: I90072156e313271a5354a39cbf78a83a6885c431
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Instead of
result += QString(string builder expression);
forcing a QString creation incl. memory allocation, do
result += string builder expression;
using the overloaded QString += QStringBuilder operator.
Change-Id: I23023c76620fa6bb7bf9f2786c22f6a2ec0d87c2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Because on Windows, the .ini files are saved with CRLF, but the files in
the Qt resource are just LF (.gitattributes makes them so).
Task-number: QTBUG-25446
Change-Id: I5eab0d9620bd1ba675b0a87c554f62cef0f98fcc
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Having two implementations was nice for testing, but now remove
one of them.
Change-Id: I70dc7d16496427dd36ba2464c9f650ec865202b1
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
The crc32() functions take a size_t length, but the hash() functions
wrapping them took int lengths.
That makes no sense and actively hurts adding hash functions for STL
types or QStringView, so port the hash() interface to size_t.
Change-Id: Id303d6df4b698560fce656cec8ed693b01daac1c
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Manually vectorizing is significantly faster because we can optimize
for common cases like long stretches of opaque or transparent pixels.
This is both smaller and faster than the auto-vectorized version, it is
also much faster than the autovectorized version for AVX2 which then can
be removed.
Change-Id: I0fa80ce273a8387cc6cd084879822ad9bade385c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This fixes a regression introduced in the merge 318b5856.
Due to the removal of actual simulator_and_device in 5.8 (397f345a6),
conditions using it have become meaningless.
Task-number: QTBUG-58440
Change-Id: I9f874f9f85efa590c40602dbcd07793ff17d35f5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
It was first introduced when we had to work-around old macOS SDK (<= 10.7) with
missing API; so we split the original code into two functions, one for
iOS (any supported version) and macOS > 10.7, another function (with all
ifdefs needed and old, deprecated API usage) for macOS <= 10.7. Now that
support for those versions was dropped and the second function gone, having
the remaining code in some external function looks illogical. It can be moved
into the member-function back.
Change-Id: Ib6355f225b5df3d92a70bd7679545cc89c450228
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Instead of using the actual compiler version to determine which C++11
features to enable, let's just use the Mirosoft compiler version that
the actual compiler is claiming compatibility with. That is because the
limiting factor is often the standard library, not the compiler itself.
This will cause some features that do not depend on the library to also
be disabled, but oh well. Better upgrade your Visual Studio version
instead.
Task-number: QTBUG-57696
Change-Id: I3e4e5051937c40319d6efffd14912cd4fdab25fb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Add an API for modes (that is screen size and refresh rate).
This will allow platform plugins to list modes available
for a screen.
[ChangeLog][QtGui][QPA] Add an API for modes.
Change-Id: I91851c51cc60a1544465dfa3b4d96cc667237a0a
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
QAccessibleCache is a QObject which emits signals at destruction time.
This can lead to crashes in situations where the library is unloaded
after QApplication has been deleted, for example in PySide2.
Change it to a pointer instance variable that is cleaned up by a
post routine.
Task-number: PYSIDE-452
Change-Id: If0d673c7dfe33c8d2d7298bc081824f9d6d7efdc
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
In some situations, this allows for nicer code. It's also possible to
make this constexpr in C++11, whereas the mutable transpose() would
require C++14-style constexpr.
The new function should also be faster, since it just swaps the member
variables.
Because of constexpr-function limitations, the way the return value is
constructed needs to depend on the level of the compiler's C++11 support.
This is not the only class that requires uniform init to provide a fully
constexpr interface (QUuid and QBasicAtomic come to mind), so this should
probably be generalized across Qt at some point.
Added tests.
[ChangeLog][QtWidgets][QSizePolicy] Added transposed() method.
Change-Id: Ic1077a0d5a861e7c63bd1daeeb42b97c3a2f71ef
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Also add a basic test for constexpr expressions involving QSizePolicy.
GCC < 4.8.0 has problems with initializing variant members in constexpr ctors:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54922
Instead of revoking its Q_COMPILER_CONSTEXPR, which is a source-incompatible
change, simply note the fact so we can selectively provide constexpr for
QSizePolicy.
Change-Id: Iba8e5a7cdf847d73e8e2b6bb6211fb3c9846aa0a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Commit 52d64fca66 made qlibraryinfo.obj be
compiled with an extra -D argument, but that doesn't take effect since a
precompiled header is in effect.
Warning #673: the initial sequence of preprocessing directives is not compatible with those of precompiled header file "qmake_pch.pchi"
qlibraryinfo.cpp(61): catastrophic error: cannot open source file "qconfig.cpp"
Change-Id: Iab7c358838e1487387a2fffd149d74a9aa2be338
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The __popcnt family of intrinsics with MSVC generates directly the
POPCNT instruction and are documented to do so:
https://msdn.microsoft.com/en-us/library/bb385231.aspx
So we can't use __popcnt unless the target processor supports it.
[ChangeLog][Windows] Fixed a bug that caused applications to crash with
"Illegal instruction" faults when compiled with Visual Studio and run on
some older processors.
Task-number: QTBUG-58446
Change-Id: I445bb15619f6401494e8fffd149d83bd2a7e3376
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This ensures at compile-time that Qt libraries do not use any APIs that
are not safe for use in application extensions, and fixes warning
messages that appear when linking to Qt libraries that are not built
with this flag, when used in an application extension.
This is especially important on watchOS where *all* "applications" are
actually application extensions, and on other Apple platforms if
application extensions are developed using Qt.
Task-number: QTBUG-40101
Change-Id: I022046f2584e0222253d33052b0abc221d7c93d6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
In showYellowThing_win(), replace the switch by an array of COLORREF
and simplify the code accordingly, fixing:
kernel\qwidgetbackingstore.cpp: In function 'void showYellowThing_win(QWidget*, const QRegion&, int)':
kernel\qwidgetbackingstore.cpp:188:39: error: 'brush' may be used uninitialized in this function [-Werror=maybe-uninitialized]
FillRect(hdc, &winRect, brush);
^
Change-Id: Id60be0e01e1edb2fa939d64abaf2e58357bcc14d
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
When pressing a combination of keys it is possible that it ends up being
seen as a Key_unknown and as a result it can give strange results when
used. Therefore if the key is Key_unknown in that case then it should
fallback to the unmodified key. For example on a French keyboard, this
means it will correctly allow CTRL+< as a shortcut instead of showing
it as CTRL+\.
Task-number: QTBUG-58304
Change-Id: Iae4c11a1e6e2d4343134ed1e3f9049b6df2613af
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The patch fixes a number of bugs in code, and removes dead logic
clarifying that MIPS DSP, like ARM NEON, has no runtime detecton.
Change-Id: If2f4eea68da5b2eaa80b8e9c8258206d8c1b7173
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
On some keyboard layouts it is possible that pressing SHIFT+letter does
not give the upper case version of the character. So we depend on QKeyMapper
here to give us the right keysequence as then it will compare against
a shortcut created with this combination then.
Task-number: QTBUG-57928
Task-number: QTBUG-57931
Change-Id: I9421f3ab4d3f8d1ee42f9680200d4b017d551057
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
We have an invalid pointer dereference in our callback.
Apple's docs are quite ambiguous, whatever we receive in our callback's
'client' parameter is our PACInfo, not clientContext's address.
That's what we pass to CFNetworkExecuteProxyAutoConfigurationURL:
"clientContext - A stream context containing a client info object and optionally
retain and release callbacks for that object."
This 'client info' is our PACInfo struct with 2 pointers.
Now in a callback, 'client':
"The client reference originally passed in the clientContext
parameter of the ..."
So apparently we should read this as "client info originally passed in ...."
Otherwise incorrect cast results in invalid pointer (apparently
the value of retain/release/copy pointers we carefully set to 0)
and a crash on dereference.
Task-number: QTBUG-56747
Change-Id: I89378f1582679638cd29a36c563e506d8f5af518
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
The compiler command line used to populate QMAKE_DEFAULT_INCDIRS must
include the sysroot in order to generate the correct paths list.
This fixes a regression introduced in afd8263 which in turn attempted to
fix an earlier regression making it impossible to override the
deployment target in user project files.
Task-number: QTBUG-58325
Change-Id: I93e6b7ef90b2744dd2f03c77da31c692cb194976
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Enables optimizing with -Og if GCC has the option available, this
should produce faster debug binaries without compromising debugability.
Is a privateConfig to limit it to the default Qt build.
Includes two fixes for false positives of maybe_uninitialized triggered
by -Og on gcc 4.9.
Change-Id: I466d7a4070295714189024369312e6cbd36cfacf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This reverts commit 556b2ee773.
The reason for this is that this change appears to stop
QtLocation from fetching tiles.
Task-number: QTBUG-58303
Change-Id: I64cd3a17d24f10652bb68cee0267cc7ff1f9d479
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
- port from inefficient QLists to QVector
- mark types held in Qt containers (incl. QVariant) as Q_MOVABLE/PRIMITIVE_TYPE
- remove pointless user-defined copy special members which prevent the class
from having nothrow move special members
Fixes errors reported by my local tree's static checks.
Change-Id: If3910484cea81a8e2c5ab737908c9443f75782c5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The equality operator was supplied, but this one was missing.
[ChangeLog][QtNetwork][QHostAddress] Added op!=(SpecialAddress, QHostAddress).
Change-Id: Iad9c55fa0ee7a8e97d5e4ea4be0605b8b74649d1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When dragging a dock widget from a floating group to the main window
reparentWidgets() is supposed to be called. It's usually triggered
by some unrelated event, like a LayoutRequest.
Instead of relying on luck for reparentWidgets() to get called be
explicit, otherwise the dock widget that was dropped into main window
will still have as parent the floating group window.
The item.skip() condition seems overly restrictive.
Task-number: QTBUG-58036
Change-Id: I65b5699e1acb6ca9bedb10620daa055fa9d91943
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
[ChangeLog][QtWidgets][QColorDialog] Fixed long standing bug that prevented
custom colors in QColorDialog to be stored in the settings.
Task-number: QTBUG-58424
Change-Id: If3ee5eef75358d811f08e7ce52fb60622972ddd4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The "spinbox" feature was defined twice, and in two different ways.
Change-Id: Iabc8939036e2166c5c5a417181ae8fb244829123
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This makes -no-feature-printer and -no-feature-combobox work.
Change-Id: I1097ab0a81f1c92b808c3e36ced0db9117db559a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Amends 7896ae052a. The previous change
focused only on ZWJ and ZWNJ, but there are many other formatting characters
that we need to support and that may be rejected by the German keyboard-hack.
This opens up for all characters in the Other_Format category.
Task-number: QTBUG-58364
Change-Id: Idd967a9ae5b12060c851f6030b7e019508561696
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Previously, the code queried the window to be grabbed for the geometry
and thus returned the entire virtual desktop for multi screen setups.
Use the QPlatformScreen's geometry in case of WID = 0.
Task-number: QTBUG-58110
Change-Id: I3a9c0b0b3ea057f5e58f272f5c3fd40fafc073ba
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The comment says "don't send event if nothing changed", but the
condition it is attached to reads if (velocityOnly), which is
totally opaque.
Change the variable name to stationaryTouchPointChangedVelocity
and drop the then-branch of the if, because it is duplicated in
the following default case of the switch.
The comment makes sense again, and GCC 7 is happy, too, because
this whole issue was pointed out by its -Wimplicit-fallthrough,
which is why I added the fall-through attribute, too.
Change-Id: I0631a381095f8897c55d9440304f6aefbc021a9a
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>