Commit Graph

39969 Commits

Author SHA1 Message Date
Friedemann Kleint
8810f82f3f QWizard/Aerostyle: Fix "&Next" shortcut
The fix for QTBUG-35203 set the Alt+Right shortcut on the next
button, clobbering the Alt+N shortcut from parsing the text (similar
for other languages). Add a separate shortcut for Alt+Right since a
button may not have several shortcuts.

Amends 6714196f45.

Fixes: QTBUG-78604
Change-Id: I1367da739c35fbd011d11f850c9bc3915113c644
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-09-25 15:14:36 +02:00
Andy Shaw
c3faeb8528 Fix CVE-2019-16168 in SQLite
v3.29.0 is the latest and there is no indication as to when the next
release is so we will apply this separately for now and it can be
reverted once it is in a release that we ship with.

This patch is taken from https://www.sqlite.org/src/info/98357d8c1263920b

Change-Id: I82d398b093b67842a4369e3220c01e7eea30763a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-09-25 10:09:50 +02:00
Andy Shaw
f88476569a sqlite: Update to v3.29.0
[ChangeLog][QtSQL][sqlite] Updated to v3.29.0

Change-Id: Ibf61c829dcd24dc8cdf00f5b57078255b0ad5ef1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-09-25 10:09:34 +02:00
Thiago Macieira
abfac029ce QFileInfo: clarify documentation about handling of symlink attributes
On Windows, shortcut ".lnk" files are treated as symlinks, and
attribute queries on a shortcut file return the results for the
shortcut target.

Fixes: QTBUG-77523
Change-Id: I907a43cd9a714da288a2fffd15bada7eba37d3ba
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-09-25 01:25:30 +00:00
Thiago Macieira
1872d1a41d Doc: Q_FLAG should be applied to the enum, not the QFlags
moc extracts he name that is inthe Q_FLAG macro and that gets used in
qDebug(). As the documentation described, qDebug would have printed:

  QFlags<LoadHints>(QLibrary::ResolveAllSymbolsHint)

which doesn't compile (though we could have partially specialized
QFlags<QFlags<E>> to be QFlags<E>). The semantically correct output is:

  QFlags<LoadHint>(QLibrary::ResolveAllSymbolsHint)

which is what this change gets. The ideal output would be:

  LoadHints(QLibrary::ResolveAllSymbolsHint)

But that's not a doc change.

Fixes: QTBUG-77216
Change-Id: I0635172f4f2a4c51a435fffd15b59a859886e90c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-09-24 18:25:21 -07:00
Thiago Macieira
70e6e9fe59 Filesystem: avoid crashes on exit in case the locale codec is null
On exit, QLocale::codecForLocale() can return null as the codec may have
already been destroyed. In that case, pretend that Latin1 was the
locale, so any file name is acceptable. This matches QString:

    QTextCodec *codec = QTextCodec::codecForLocale();
    if (codec)
        return codec->toUnicode(str, size);
 #endif // textcodec
    return fromLatin1(str, size);

Note that if we're wrong and the locale was *not* Latin1, files that you
had a name to may not be encoded or decoded the same way.

Fixes: QTBUG-78446
Change-Id: Iece6e011237e4ab284ecfffd15c54077728a17ca
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-09-24 18:24:00 -07:00
Shawn Rutledge
06cc5d3071 Ensure that QFont::fromString() doesn't parse empty font specifications
Fixes: QTBUG-78236
Change-Id: Iba060e7a24080cdc8f317ecb6dc616b2cd918acb
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-09-24 14:38:40 +02:00
Friedemann Kleint
74179a209a Revert "BLACKLIST insert_remove_loop for msvc-2019"
The error was due to a compiler optimization bug, which is fixed
in 16.3.0.

This reverts commit 305f2c3aa6.

Fixes: QTBUG-77239
Change-Id: Idfb86ad5c3ec026518f0713c41f7ad744ab4d5db
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-09-24 10:26:00 +02:00
Friedemann Kleint
27782af821 QWizard: Use member initialization in private classes
Remove superfluous constructors.

Task-number: QTBUG-78604
Change-Id: I8a422cfeaaedf89ce310e06d5db80907cd1102d4
Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
2019-09-24 09:50:14 +02:00
Andy Shaw
fdae0ccc5f Fix connection string code snippet for ODBC on Windows
Fixes: QTBUG-15133
Change-Id: I86d77aec039fdfaf262ad056c944c7cfc30e0041
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2019-09-24 08:42:11 +02:00
Oliver Wolff
f72dfdb9af Skip tst_QDateTime::systemTimeZoneChange for UWP configurations
Due to their sandboxed nature, UWP applications do not have access to
system settings like time zone.

Fixes: QTBUG-71185
Change-Id: I567a255f8adc18838fff79b81210faa094674722
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-09-24 06:18:07 +02:00
Andy Shaw
54d3059ccf Move DialogButtonBoxLayout case to be before MouseDoubleClickDistance
This amends 9be66cb282 so that the
DialogButtonBoxLayout case is moved to be before the
MouseDoubleClickDistance one in case the fallthrough is triggered.

Change-Id: I843dad6b55ccffe6b6c275cd75587f04659e512f
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-09-24 06:17:20 +02:00
Andre de la Rocha
a8ec52d5e7 Windows QPA: Fix close button not working on Windows 7
A previous change modified hit testing in the non-client area of
fixed-size windows, in order to prevent showing a resize cursor when
the windows are not resizable (QTBUG-77220). The change assigned
HTCAPTION for any point over the entire title bar, including the top
bar buttons, which on Windows 7 classic or basic desktop caused these
buttons to become unresponsive. The present fix changes this behavior
to redefine only the outer sizing frame, while letting the rest of the
title bar be handled by DefWindowProc().

Fixes: QTBUG-78262
Change-Id: Id6e821a805c8333a67988f87c3727bed0c93290e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-09-23 17:36:34 +02:00
Allan Sandfeld Jensen
c4956dbb67 Do not pass nullptr as '%s'
Fixes GCC 9 warning.

Change-Id: I2a21d863267b444a29697aa026c21b47e3ac8382
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2019-09-23 16:38:39 +02:00
Rolf Eike Beer
3a4f11c0f9 tests: fix typo in comment
Spotted while grepping for 'imx'.

Change-Id: I24889929e58045d6bba8dd74f213eff3c0487c4c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-09-23 10:27:56 +02:00
Andy Shaw
ac5e198db4 Add SQLite specific documentation when specifying a database name
Fixes: QTBUG-67847
Change-Id: I3c640233526260b596e8224dc48f713a3f0cff56
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-09-21 11:29:58 +02:00
Andy Shaw
9b6179cf95 Ensure all children of a widget get updated when a stylesheet changes
Before, only the direct children would get an update when the
stylesheet changed, any children below that would be unchanged.

Fixes: QTBUG-77006
Change-Id: Id668eaae74a8289d78d66644f077e6a3302960cd
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-09-21 01:09:51 +02:00
Eirik Aavitsland
b8a911fbeb QPainter: Avoid leaking memory on unbalanced save/restore
If a QPainter ended without all saved states having been restored, the
state stack would leak memory.

Fixes: QTBUG-77843
Change-Id: I760904d6391de24a4867be54fa1bebf76be14ba7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-09-20 13:01:14 +02:00
Leena Miettinen
51f1428d3c qmake: Replace WinRT with UWP in the qmake Manual
Remove info about Windows Phone, which is no longer supported.

Task-number: QTBUG-61884
Change-Id: Ic330f0f19a4e7314dd175f6c492fa25133185517
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-09-20 09:44:00 +02:00
Paul Wicking
e9190eda1a Doc: Remove broken example snippet from Q_ENUMS
The code snippet is used by both Q_ENUMS and Q_ENUM. Therefore,
remove the example snippet from Q_ENUMS documentation, as it is
obsolete. Also, move recommendation to use Q_ENUM in new code to the
very top of Q_ENUMS' documentation.

Fixes: QTBUG-63203
Change-Id: I12a9f45e0b3bd75dfe98e1ecbc45e299a688b80c
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2019-09-20 09:07:50 +02:00
Leena Miettinen
0d9f43d534 Doc: Edit QNetworkProxy::QNetworkProxy() default proxy type
Fixes: QTBUG-61771
Change-Id: Ideafe6f8f81c156e941f0548c152021b01b606a1
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-09-19 10:18:31 +02:00
Friedemann Kleint
1ceb48c6a6 QWizard/AeroStyle: Fix condition introduced by previous fix
Set the variables within the condition introduced by
6c0e1dba40, as otherwise, the code
might not be executed.

Task-number: QTBUG-78300
Change-Id: Ia83db6fce197ebf16783f3b0c6d6fad7ebd2ba52
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-09-19 09:34:05 +02:00
Morten Johan Sørvig
cd92049a95 Prevent crash in QWasmScreen::resizeMaximizedWindows()
screen() may return a null QScreen pointer during
screen initialization.

Fixes: QTBUG-78118
Change-Id: Ide26eb3f06861c38cd7ae56789dd010d4cd7e572
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-09-18 12:59:37 +00:00
Friedemann Kleint
6c0e1dba40 QWizard/AeroStyle: Fix crash when Qt::AA_NativeWindows is set
Prevent recursive platform window creation from the events
received during window creation (WM_POSCHANGING, etc).

Fixes: QTBUG-78300
Change-Id: Ie2bb4308af645c30e556666589e2dd08f14d4035
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2019-09-18 11:49:55 +02:00
Joerg Bornemann
20d8186c24 Fix passing FREETYPE_LIBS and friends to configure
On systems where the pkg-config source fails, configure falls back to
a library source of the type 'freetype'. This ignored variables like
FREETYPE_LIBS users can pass to configure.

The qtConfLibrary_freetype function now diverts to
qtConfLibrary_inline which handles all those variables.

Change-Id: Icef70deb130ce6d2de1520af4344ccccd677f287
Fixes: QTBUG-77643
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-09-18 11:07:25 +02:00
Joerg Bornemann
392931662d Fix qtConfLibrary_freetype's include paths
The variable QMAKE_DEFAULT_INCDIRS was misspelled, which means we
never really looked for freetype in the default paths.

Change-Id: I20c35a783505678169ecb642927f74b339e55b68
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-09-18 11:07:17 +02:00
Friedemann Kleint
a96c4b3aab QHighDPI: Fix wrong conversion for native child windows
Do not try to find a screen for native child coordinates.

Fixes: QTBUG-78158
Change-Id: I78ba814929f4db3dfd7dd43c09f7c7642222f4fb
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-09-18 08:29:23 +02:00
Joerg Bornemann
90779d96ad Ignore non-existent .ui file dependencies
Commit 80dea664 broke .ui files with global includes that are not part
of the project, because we blindly added every file path that falls
out of 'uic -d' as dependency.

Introduce the extra compiler CONFIG flag dep_existing_only to bring
back the old behavior that ignores non-existent dependencies and set
it for uic.

Change-Id: I6eaa82817c932a98ebac6d08115a9815d4b9dd21
Fixes: QTBUG-78144
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-09-18 08:24:46 +02:00
Joerg Bornemann
1456b8091a Make it possible to undefine NDEBUG for nmake and VS projects
For nmake and VS projects we added the NDEBUG define for the release
configuration unconditionally within the qmake generators. To undefine
it, users had to use a nasty work-around.

Now, define NDEBUG within the MSVC mkspecs. In order to do that we
introduce the DEFINES_RELEASE and DEFINES_DEBUG variables that are
merged into DEFINES in default_pre.prf.

Users can unset NDEBUG by writing
    DEFINES -= NDEBUG
in their .pro file.

Note that DEFINES_RELEASE and DEFINES_DEBUG are merged in
default_pre.prf in order to give extra compilers (like moc) the chance
to see the fully resolved DEFINES variable. This is different from the
QMAKE_CFLAGS_(DEBUG|RELEASE) variables that get merged in default_post.prf.

Fixes: QTBUG-78071
Change-Id: I381770a1d2f974fbae9b09a2254e3f2fc7842b68
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-09-18 08:24:38 +02:00
Joerg Bornemann
983cfc773d Fix Vulkan SDK detection for MinGW cross-compilation
We must not set QMAKE_INCDIR_VULKAN if the Vulkan SDK is installed in
some default include directory. MinGW's std headers rely on
#include_next, which will break if we mess with the order of default
include paths.

Fixes: QTBUG-76660
Change-Id: I5ee0fc4c328ff88b979a8c1c010472b3883dff8d
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-09-18 08:24:26 +02:00
Shawn Rutledge
15e1c15986 evdevtouch: Add fallback definition of ABS_MT_PRESSURE; fix alignment
Fixes: QTBUG-78298
Change-Id: Ib6acb1fdca551a84aba5dec2f28cf784a212692c
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-09-17 15:30:43 +02:00
Friedemann Kleint
2dd781df87 Windows QPA: Fix missing resize when changing the scale factor
Do not suppress the resize event caused by the handling of
WM_DPICHANGED unless the screen really changed.

Fixes: QTBUG-76510
Change-Id: I8b9ae41ad7deb863c1633ec5901bc04304b2165c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-09-17 15:19:18 +02:00
Timur Pocheptsov
447ee95d5e QHttpThreadDelegate - remove unneeded code
Found while cleaning up SPDY remains: I've noticed that for H2 case
I never check if incomingSslConfiguration is nullptr or not, but
the code several lines below - does it, which looks kind of moronic.
This configuration is initialized when the delegate is created, so
no need to have this if-statement. Instead, assert, making this
behavior a requirement.

Change-Id: I90fb84337be925a3288252aa2491b4c23d6c6cbb
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-09-12 11:15:31 +02:00
Andy Shaw
137cbd1c72 Cocoa: Set the accepted action to be the one from the response
By setting the accepted action to be the one from the response it will
enable the user to set the drop action in their code and this will be
reflected at the platform level.

Change-Id: I7b9459b228c00ef01d91649b3405316729713164
Fixes: QTBUG-77427
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-09-12 05:39:26 +02:00
Allan Sandfeld Jensen
bc34784d05 Handle robustness with OpenGL < 4.0
We need to have the right idea of robustness, so check for extension.

Fixes: QTBUG-78107
Change-Id: I26987269e5c50bee20e2e3cc6d75f91a6c9af25e
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-09-11 10:25:27 +02:00
Timur Pocheptsov
0fd6595d5e Add a missing ConnectionTypeHttp2Direct in several if statements
Found while preparing SPDY retirement.

Change-Id: I30f923fdeb0f6f0b5e808a3e7b7d81ddb9c4ef12
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-09-11 05:16:18 +02:00
Alexandru Croitor
be21ff11b7 CMake: Fix usage of debug frameworks on macOS
If an app wants use a debug framework of Qt, it is still expected that
the app should link against the release version, and just set
DYLD_IMAGE_SUFFIX=_debug when running the app.

This was not the case before, where the CMake Config files told CMake
to link explicitly against the debug libraries. This caused crashes
due to the Qt plugin loader mechanism still trying to find a release
platform plugin, which in turn would load release libraries, and thus
the application would end up loading both debug and release plugins.

Make sure the Config files in a framework case always reference the
release libraries (even though this might be counter intuitive).
Otherwise users of the Debug Config files would always get
crashes.

Fixes: QTBUG-78131
Change-Id: I88b1dc421477ad186012ca67b328a891128eb568
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-09-10 16:48:47 +02:00
Mårten Nordheim
e5e8f1d67c Schannel: handle SEC_E_INCOMPLETE_DATA in acceptContext
It's not a failure state, we just need more data. It is handled properly
in other functions.

Change-Id: I9450a78c71a3f4fe9506a7a79de6efa2db08697c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-09-10 07:22:16 +02:00
Mårten Nordheim
97b9af1519 Schannel: unbreak renegotiation (and likely gracious shutdown)
The reason it wasn't working before was a couple of things:
1. Due to an extra 'else' it would not process the SEC_I_RENEGOTIATE
or SEC_I_CONTEXT_EXPIRED branch.
2. The peerCertVerified boolean was not only wrong, but also
broke renegotiation even if the 'else' wasn't there.

My previous attempt to fix it ended up being a noop, so:
Reverts e21fa577dd

Change-Id: Ifbad55d4bb066b7566bb88cead48e329cbd574f9
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-09-09 22:19:47 +00:00
Assam Boudjelthia
17032c4d64 Re-add tst_selftests "crashes old stdout txt" on QEMU
The test is not failing anymore on QEMU targets.

This partially reverts commit
71bd06d516.

Fixes: QTBUG-71915
Change-Id: I68593edf0ec245e14879833c8aa90661a3c2e227
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-09-09 11:19:38 +00:00
Thiago Macieira
5cea83a8a2 QRandom: retry the use of RDRAND instruction as recommended by manuals
The Intel whitepaper[1] recommends retrying RDRAND some 10 times even
after it fails, since the hardware has a fairness algorithm and reseeds
itself quite quickly.

[1] https://software.intel.com/en-us/articles/intel-digital-random-number-generator-drng-software-implementation-guide

Change-Id: I907a43cd9a714da288a2fffd15baafd88242d8b6
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2019-09-08 16:05:34 +00:00
Qt Forward Merge Bot
72a04b132c Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" 2019-09-08 11:33:39 +02:00
Qt Forward Merge Bot
1f35c8caa0 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I371c5ae1af6f58e32e579671f485b92b586e0b76
2019-09-08 11:33:28 +02:00
Qt Forward Merge Bot
551f73bd8d Merge "Merge remote-tracking branch 'origin/5.12.5' into 5.12" 2019-09-07 13:08:36 +02:00
Qt Forward Merge Bot
a9db729095 Merge remote-tracking branch 'origin/5.12.5' into 5.12
Change-Id: I41a252fdbf22551aadb0b1a6e9ecf3f95f99fbd4
2019-09-07 13:08:26 +02:00
Joerg Bornemann
cc32a69193 Fix CMake config files for -libdir different from "lib"
When Qt was configured with -libdir different from "lib", one could not
build with CMake whenever a static lib was pulled in (e.g. uitools).

Do not hard-code "/lib" but use the correct variable also for static
libraries.

Fixes: QTBUG-76255
Change-Id: I28c6861752e29e461247628d2b1f8a9ec32f0790
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Fabian Vogt <fabian@ritter-vogt.de>
2019-09-06 13:13:32 +02:00
Timur Pocheptsov
d1a22bd298 A follow-up to a recent fix in QHttpNetworkConnectionChannel
While working with HTTP/2, we are not re-sending failed requests.
In case we receive a GOAWAY frame, we properly handle it by
processing some active streams if possible, and aborting streams
that will not proceed further with ContentResendError. But it's
possible that some server failed to send us GOAWAY (for example,
it died) or closed the connection not finishing the streams that
were still active and valid (ID <= value from GOAWAY frame).
Now that we will not re-connect, there is no reason to be quiet
about us not progressing - emit RemoteHostClosedError on any
remaining active stream/request we cannot process further.

Fixes: QTBUG-77852
Change-Id: I4cd68a1c8c103b1fbe36c20a1cc406ab2e20dd12
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 543769666f)
2019-09-06 03:01:52 +00:00
Christian Ehrlicher
a42a451339 QShortcut: call base class implementation in event()
QShortcut::event() did not call the base class implementation
QObject::event() which caused that e.g. QEvent::DeferredDelete was not
handled.
Fix it by calling QObject::event() when the event was not handled.

Fixes: QTBUG-66809
Change-Id: Ideebc980bc658f8f2b9ec4417e738bccda5eeab5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-09-05 20:41:43 +02:00
Mårten Nordheim
e21fa577dd Schannel: retain extra data after renegotiation is requested
I realized this is a potential scenario where we will have leftover
data, but it wasn't covered.

Change-Id: Ibaf1015bf2aee120e4a4d98888925b88ecb6ddfd
Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-09-05 18:18:38 +02:00
Leena Miettinen
2656d3e923 Doc: Add external links to new topics in Qt Creator Manual
These topics were added to Qt Creator Manual 4.9 and 4.10.

Change-Id: I2e9bf355eb78b5e9877d0ca0bc41de00ed2b4333
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-09-05 17:36:05 +02:00