This was originally enabled in the mkspecs for 64-bit QNX 7.0.0
but that broke when the qtConfig change was made. It looks like
qtConfig shouldn't be used in the platform mkspecs. I suspect
the stack-protector changes were left out of the 32-bit mkspecs
so that 6.6.0 builds wouldn't be affected.
Ignore the stack-protector/stack-protector-all possibility since
it isn't possible to access it without a command line option.
Specifying both options doesn't even make sense since
stack-protector-all encompasses stack-protector.
For now, leave out command line control of this feature.
Task-number: QTBUG-59644
Change-Id: I99323216be5b592dd2c3bef6d22da195764a6e65
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
QX11Info class from the Qt X11 Extras module is documented in
qx11info_x11.cpp, and it needs to be parsed.
Change-Id: I32e8415d93e67dbf16267d4af63979c1db0870b0
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Scan CLDR for {,kilo,mega,giga,tera,peta,exa}byte forms and their IEC
equivalents, providing SI and IEC defaults when missing (which all of
IEC are) in addition to the usual numeric data. Extrapolate from any
present data (e.g. French's ko, Mo, Go, To imply Po, Eo and, for IEC,
Kio, Mio, etc.), since CLDR only goes up to tera. Propagate this data
to QLocale's database ready for use by QLocale::formattedDataSize().
Change-Id: Ie6ee978948c68be9f71ab784a128cbfae3d80ee1
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
When QDateTimeParser learns to parse zones, it'll need to know the
valid range of offsets.
Change-Id: I44cd88a140ebaf6a2b98b0f9a1be0cbc7a35bae4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The implementation did a validity check on data it then gave to
constructors that repeat the validity checks; so do the construction
first and use the cheaper instance isValid() methods instead.
Fixed local callers (but not QDateTimeEditPrivate::stepBy, the only
other caller) to actually attend to the return value; if the attempt
to set a field fails, it probably means the min is too low, or max too
high; and comparing the modified date-time against global min and max
makes no sense if it hasn't been revised anyway.
Change-Id: If4505c43c92e247445dcd10ac436b775c3ead4da
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Two more ways line numbers were making it through.
Corrected a doc-string to tell nearer to the truth.
Change-Id: I946aaeb936d47fffe50d7ec15e2524992cc9e428
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Document that the saved output is used by tst_selftests.cpp and use a
crude parse of it to get the list of subdirs that it actually tests.
Change-Id: I73023228c9e547f965b7749dd66de7ef09c3815e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Extract a helper function to read the setting and use that
in file dialogs and tray icon.
Task-number: QTBUG-60593
Change-Id: I03cf1e45611690a128bf2cc17eba5dff23b86969
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
It may crash on (probably a bit broken)
qtbase/src/printsupport/dialogs/qpagesetupwidget.ui
Change-Id: Ibca95a3d8aa4899adbc952aee7b46621ac888c6a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Release builds of applications that used Qt configured with "link time
code generation" crashed (memory access violation), when calling
GetInternalFormatInfo in Context::initCaps.
It looks like this is a compiler problem that can be avoided by not
using a reference for the return value.
Task-number: QTBUG-55718
Change-Id: Ic1fb95d7b518a49859f41c819e860864387a8d3c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
QPA is modeled on the assumption that the cursor is a property
of the window and therefore sets the override cursors on all windows.
However, on macOS and Windows, the cursor is set per application (or
screen). On these platforms, the per window cursor setting needs
to be emulated which is a source of bugs especially for override
cursors.
Add new virtuals to QPlatformCursor allowing to set override
cursors which can be implemented by directly setting the cursor
on those platforms.
Task-number: QTBUG-40122
Task-number: QTBUG-61133
Change-Id: I31d6a927128d22bb1620a8ace35988c0e126236e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
The motivation for this change is to make it simple to pass a
correctly sorted environment block to Win32 CreateProcess(). It is
also nice in other contexts that the environment variables are
sorted. The change is made for all platforms. This keeps it simple and
the only ill effect is slightly slower lookups.
Concerning the environment block passed to Win32 CreateProcess:
The environment block that is passed to CreateProcess() must be sorted
case-insensitively and without regard to locale. See
https://msdn.microsoft.com/en-us/library/windows/desktop/ms682009(v=vs.85).aspx
The need for sorting the environment block is also mentioned in the
CreateProcess() documentation, but with less details:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx
Task-number: QTBUG-61315
Change-Id: Ie1edd443301de79cf5f699d45beab01b7c0f9de3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Also use auto for iterators to vars. This is a small refactoring in
preparation for changing type of vars to QMap.
Task-number: QTBUG-61315
Change-Id: I5731d7916b6f54a0da5be2da378c09a7688bd870
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This allows us to have the Q_DECLARE_PROPERTY before the
QVector<Property> use. Not important for Qt 5, but it helps me.
The operator!= function is never called, so it can be dropped (caught by
ICC 17 beta).
Change-Id: I149e0540c00745fe8119fffd1463c9bc1b356ec6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
That's the only place there we can potentially pass a null pointer
to CFArrayAppendValue (all other calls are conditionally-protected).
This results in (surprise! ... ?) Objective-C exception (while we call
something that is a pure-C API). So far we cannot reproduce this crash and
can only speculate: probably this happens with invalid (can be either
really invalid or the result of our generic QSslCertificate's failure to read/
parse)) custom CA certificates appended to a QSslConfiguration object by
applications using QSslSocket/QNAM. The fix will probably make a handshake to
fail, but this seems to be better than a crash anyway.
Task-number: QTBUG-58213
Change-Id: Ie4f9ab2138bc383adc9f9ed55ed61be2d3cf7020
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
When punctuation is ignored then the kUCCollatePunctionSignificantMask
should not be set. This was originally thought to not be working due to
a bug on the Apple platforms, but this is not the case.
[ChangeLog][Platform Specific Changes][macOS][iOS] QCollator now
respects the ignorePunctuation property on Apple based platforms
correctly.
Task-number: QTBUG-41978
Change-Id: I62044076387d6e4479f4aaef3c2f48f49dbd160e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Invert the selection handles icons when the selected text is rtl.
Task-number: QTBUG-61073
Change-Id: I8339a14d1e4d9e79d218516daf3ac783911f6026
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Ultimately, the tracking areas seem to be managed by the
NSWindow (or at least somewhere else than the NSView itself).
So, it can happen that we involuntarily leave dangling pointers
in the system after the QNSView is released. This has shown to
crash applications creating and deleting many native views on a
single QNSWindow, e.g. calling winId() on a complex and dynamic
QWidget hierarchy. The crash would happen when the QNSWindow
receives a native enter event, which results on Cocoa trying to
invoke the owner of a previously deallocated NSTrackingArea.
Change-Id: I3ca7a39ee5f1ec51c2215639f61ba907de3d8659
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Commit 418184c2a0 set some extra defines
that Clang and GCC do set so that MSVC and ICC builds would properly get
the features detected. But that meant we set them with Clang and GCC
(technically, set them again, but to the same value so no warning was
printed).
Don't do that. This commit allows me to use "-march=native -mno-rdrnd"
to disable the unconditional use of RDRAND instruction. That's required
to valgrind any applications, as the current version (3.12) does not
have support for that instruction.
vex amd64->IR: unhandled instruction bytes: 0x48 0xF 0xC7 0xF0 0x48 0x8B 0x55 0xE8 0x48 0x89
vex amd64->IR: REX=1 REX.W=1 REX.R=0 REX.X=0 REX.B=0
vex amd64->IR: VEX=0 VEX.L=0 VEX.nVVVV=0x0 ESC=0F
vex amd64->IR: PFX.66=0 PFX.F2=0 PFX.F3=0
==78321== valgrind: Unrecognised instruction at address 0x4ef159c.
==78321== at 0x4EF159C: _rdrand64_step (immintrin.h:208)
==78321== by 0x4EF159C: qt_random_cpu(void*, long long) (qrandom.cpp:95)
Change-Id: Ia3e896da908f42939148fffd14c6884501de4fa4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The -Xarch option is not supported by ccache, so unless we need to
distinguish precompiled headers for multiple architectures it's better
to not pass it.
Change-Id: Iae02d37f7a89aedebecedff7290f88d2de1ca362
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
- Put all widgets in one dialog so that show/setActive occurs only once.
- Use the center of the widget geometry for positioning.
- Remove BypassWindowManagerHint which likely causes qWaitForWindowActive()
to fail.
- Move the cursor out of the way and subsequently send mouse events
to the QWindow
Task-number: QTBUG-51400
Change-Id: I2176d8dbaead72d7a6fa89aa769e4c804eea7a0c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This was already done on unix, but not for MinGW.
If the archive already exists, it is appended rather than replaced.
This can cause invalid references when whole-archive linking is used
and some object file that was already linked was deleted.
Change-Id: Ie265371f197d996d57002b248043736544ee641e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Do not pass /Za to MSVC to generate moc_predefs.h, because this option
is incompatible with compiler options like /fp:fast that may be
user-specified.
The /Za option added, because moc failed parsing header files that
contain MSVC extensions. Moc was fixed in 94a2aec0, and we can safely
remove the /Za option.
Task-number: QTBUG-58391
Change-Id: I9791224b1773d0f81d2bbb7915787a7c5e68430c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
there isn't really a point in doing strict shadow builds of them, and
it complicates stand-alone building of sub-projects (because it points
below the build root).
Task-number: QTBUG-58372
Change-Id: Ia3bde3826baac44749b27452fd4aeb9491ecb94e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
... and rename those determined by toolchain.prf to QMAKE_* (this was
already the case for the newly introduced msvc and icc variables).
this restores the ability for user projects to query the toolchain qt
itself was built with, which is necessary for compatibility checks.
in fact, we may do such validation in toolchain.prf itself at a later
point.
Change-Id: I35f4c393c5e4e0fe987c0844714b7a8f8687c24e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The Linux kernel gives us 16 bytes of random data and sets a pointer to
it in the ELF AuxV (the same one that allows us to get HWCAP on ARM
systems). So if we end up in the fallback generator, at leat we'll get a
good amount of entropy to seed the Mersenne Twister.
This could happen if the application is run in a chroot(2) or container
without /dev/random or /dev/urandom. That is probably an installation
mistake, so we don't optimize this case for performance.
With this commit, we have now good, high-quality fallbacks for Windows
(rand_s), for BSDs (arc4random) and for Linux. The only missing,
supported OS without a good entropy source is QNX.
Change-Id: Ia3e896da908f42939148fffd14c5b1084051f1a8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
If we've never read any samples from hardware RNG or from /dev/urandom,
then there are no stored samples for us to seed the Mersenne Twister. In
that case, attempt to obtain an emergency sample that consists of some
random bits from the variable addresses (ASLR should help) and from the
clock (using nanosecond quality, instead of seconds).
There's still the possibility that we'll get poor entropy: very close to
boot, if the kernel entropy pool is empty, ASLR could be poor and the
monotonic clock value could be consistent from boot to boot. There's
nothing we can do about that.
Change-Id: Ia3e896da908f42939148fffd14c5b0c7b608371b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This function works even in chroots where /dev is not available. Since
it's part of the OS, it may have better ways of gathering entropy even
when we don't.
Change-Id: Ia3e896da908f42939148fffd14c5afedc8569dbc
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit adds support for the x86 RDRAND instruction for
QRandomGenerator. This is the same that libstdc++-v3 uses for
std::random_device() by default. If it fails because the hardware does
not have enough entropy collected, we fall back to the operating system
generator, which often has more entropy collected from other sources.
Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5167214e1ea3f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The instruction is "RDRAND", but the feature name, according to GCC, is
RDRND, so I had to change some macros in qsimd_p.h.
Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5166779137e63
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
QRandomGenerator can produce more than 31 bits of data. And it uses
/dev/urandom for us on Unix, so QHash does not need to duplicate that
part.
Change-Id: Icd0e0d4b27cb4e5eb892fffd14b52a0d91f179eb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>