Commit Graph

41761 Commits

Author SHA1 Message Date
Alexandra Cherdantseva
a63969081c wasm: support all cursor shapes
Every Qt::CursorShape is supported.
Tested in Chrome, Firefox and Safari.

Change-Id: I38c9024dba4af70af789ac84ad7e38f749c847d7
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2019-12-30 14:30:22 +03:00
Tuomas Heimonen
27d1391280 QLocale: Support Indian number formatting
When QLocale::Country is set to QLocale::India numbers are written so that
after first three from the right and then after every second will be comma.
E.g. 10000000 is written as 1,00,00,000

Task-number: QTBUG-24301
Change-Id: Ic06241c127b0af1824104f94f7e2ce6e2058a070
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
2019-12-30 13:04:23 +02:00
Christian Ehrlicher
411c2e3e4f QCommonStyle: make sure to pass the widget to pixelMetric()
QStyle::pixelMetric() expects the affected QWidget as third parameter.
Some (external) styles rely on this to return the correct value.
Therefore add the widget to the function calls where possible.

Fixes: QTBUG-80971
Task-number: QTBUG-1857
Change-Id: I768ebb61a914cdba6e0549f841d46cf3edb0a2a6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-12-28 10:10:32 +01:00
Giuseppe D'Angelo
6e3b4ddd92 QRegularExpression: adjust the error codes matching PCRE2 10.34
Change-Id: I78ecda1bdc784b8d7a69a4927dbe3b0f08c1d907
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2019-12-28 01:33:25 +01:00
Giuseppe D'Angelo
25101f0984 Update PCRE2 to 10.34
Also adjust the import script to handle new files.
The RTEMS patch is not upstreamed and had to be-reapplied.

Change-Id: Ie3102d56a25674b50c67edd3cce25ffe7040a215
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-12-25 00:49:19 +01:00
Giuseppe D'Angelo
d24a1d4323 QRegularExpression: improve docs about porting from QRegExp
Change-Id: Ie5d737188977b0e4dc1070c2d7329d0ecb6a9308
Reviewed-by: David Faure <david.faure@kdab.com>
2019-12-24 22:28:59 +01:00
Joerg Bornemann
fa39d34043 Doc: Add the relocatable feature to configure's help output
Task-number: QTBUG-80928
Change-Id: I71dda94f9fc758864e65dae9fa262389934d4b2a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-12-24 13:28:54 +01:00
Christian Ehrlicher
2ad3348031 QPrintDialog: don't access dangling pointer when cups is disabled
When no cups support is available, ui.pagesRadioButton is destroyed in
QPrintDialogPrivate::init() but was accessed later on. Fix it by moving
the cups check one line above.

Fixes: QTBUG-80945
Change-Id: Ieb062b39e1461f39665ef612dfea1d7757274b7e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-12-23 16:05:48 +01:00
Christian Ehrlicher
e0b9beb63d QFileInfoGatherer: don't pass empty list to QFileSystemWatcher
When an empty list is passed to QFileSystemWatcher::unwatchPaths() a
warning is printed out. To avoid this, check if the container is not
empty before calling unwatchPaths()

Fixes: QTBUG-80965
Change-Id: I23a7946e1e16a8d899abf6cce6b75a6f3662ca0f
Reviewed-by: David Faure <david.faure@kdab.com>
2019-12-23 16:05:39 +01:00
Tor Arne Vestbø
7ac4e55cb9 macOS Don't throw away backingstore buffers when backing properties change
Clients such as QtWidgets that do their own dirty tracking will assume
they can just flush in response to the expose event, without repainting
anything. Since we have no way at the moment to inform these clients that
the backingstore content might be invalid we can't just throw it away.

It turns out that to pick up changes in color spaces we can just tag
the existing buffers with the new color space, so we don't need to
throw it away. And for the older surface-backed mode we tag the color
space on flush, so we didn't need to invalidate anything in the first
place.

Fixes: QTBUG-80844
Task-number: QTBUG-77749
Change-Id: Icb1ceb178894bb43887cdf03fb855d2d614b5ab0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-12-23 13:55:50 +01:00
Ulf Hermann
6c2052f9d7 Doc: Fix name of no_check_exist flag
There is only one 's' in there.

Change-Id: I02288c138784086e535c339660b02bf9c33f8fda
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-12-23 10:33:36 +01:00
Tor Arne Vestbø
761025d08c Contain Qt::AA_SetPalette logic in QApplicationPrivate::setPalette_helper
Change-Id: I88b36e800139389895ecb1a15553207a24b3e3a4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-12-21 14:30:14 +01:00
Tor Arne Vestbø
c7ecff0460 Simplify QApplication::palette
Change-Id: I1f1be554a72a385985eeee0b79b49acdfcf40d8e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-12-21 14:30:11 +01:00
Tor Arne Vestbø
fe784abc80 iOS: Silence GL deprecations until we can fix them
Change-Id: I1222708be5017a0dca381f365349fce5887a0bcb
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-12-20 12:23:37 +01:00
Friedemann Kleint
c24404dbda Unbreak developer build with clang-cl
Move the macro definitions for Q_DECL_UNUSED_MEMBER along with
a definition for Q_DECL_UNUSED from the scope excluding icc
and cl into a separate one for plain clang and cl since the
attributes work with clang-cl as well.
Remove the check introduced in
9782938045
since it is assumed that all clang versions have the attribute now.

Fixes:
include\QtCore/../../src/corelib/io/qloggingcategory.h(87,32): error: private field 'd' is not used [-Werror,-Wunused-private-field]
    Q_DECL_UNUSED_MEMBER void *d; // reserved for future use
                               ^
include\QtCore/../../src/corelib/io/qloggingcategory.h(108,31): error: private field 'placeholder' is not used [-Werror,-Wunused-private-field]
    Q_DECL_UNUSED_MEMBER bool placeholder[4]; // reserved for future use

Task-number: QTBUG-63512
Change-Id: I651771b085408443bb02e96698a980170fcaeb6d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-12-20 09:43:36 +01:00
Milla Pohjanheimo
3ea2c18faa Add binary compatibility files for qtbase 5.14 branch
BC files built against 5.14.0 added.

Change-Id: Ifaf79d8ebb057e3bcccd6134868890b3fccf8720
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-12-20 10:41:11 +02:00
Thiago Macieira
5034f8d8d5 forkfd: fix build with GCC 4.8 & 4.9
Prior to GCC 5.x, std::atomic_int was a typedef to __atomic_base<int>,
which meant we couldn't use it in atomic_compare_exchange that requires
pointers to std::atomic<int>. That changed in 5.x (r219790) in response
to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60940.

Easy fix, though.

Fixes: QTBUG-80896
Change-Id: I46bf1f65e8db46afbde5fffd15e1d625154f8d59
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2019-12-19 17:51:31 -08:00
Morten Johan Sørvig
43792c50d4 Don’t reset highDpicaleFactorRoundingPolicy
Don’t reset highDpicaleFactorRoundingPolicy in the
QGuiApplication destructior. This is a static property,
independent of the application object lifetime.

Change-Id: Ibf55e2a6ea1ae6429fce3f0e9d58323111aac374
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-12-19 14:21:01 +01:00
Morten Johan Sørvig
0f0d26418c High-DPI: restore rounding behavior on Android
Qt 5.14 introduced QApplication::scaleFactorRoundingPolicy,
where the default policy rounds the scale factor to
an integer, which matches Qt's behavior on Windows and X11.

However, Qt has never rounded scale factors on Android.
Restore the historical behavior and document the platform
difference.

Change-Id: I0f8e8fb65e3874338ea290bbb12da350da22f099
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-12-19 13:20:54 +00:00
Cristián Maureira-Fredes
b31aef2900 uic: Rename raise() to raise_() for Python
Fixes: QTBUG-80791
Change-Id: Ia6339b8c683147456cdffa7f2d45972e8eacd92c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-12-19 12:38:58 +01:00
Tor Arne Vestbø
9a77beaea3 macOS: Deliver theme changes synchronously
Otherwise the expose event that AppKit triggers will be delivered before
we've propagated the theme change, and we fail to draw the UI using the
new theme.

Change-Id: I502122a2bf02a866d136106d831f0c2a0dfe26f2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-12-19 11:17:31 +00:00
Friedemann Kleint
e2f4c5f4a1 double-conversion.cc: Fix developer build with clang-cl
clang-cl errors out with an unknown #pragma on the scope turning
off optimization for MSVC2012. Remove it since MSVC2012 is no longer
supported.

Change-Id: I46610885e10158bc5b3666b7698dc1162dbac8a7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-12-19 11:23:31 +01:00
Albert Astals Cid
512b87bc28 Don't have a "see also qrand" from qrand
I guess what we wanted there was qsrand

Change-Id: I8e18e76ae65abf9de231d51faa61cc9142ea2b98
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-12-19 09:03:01 +01:00
Peter Varga
a132e02540 Fix QAccessibleWidget::focusChild() to return focused descendant
This method should not ignore accessibility objects without
corresponding widget. The widget may have parts with their own
QAccessibilityInterface and these can be also focused.

VoiceOver ignores them if they are not returned by focusChild().

QAccessibleTabBar::focusChild() has been implemented to demonstrate
the concept and make tab titles of QTabBar readable by VoiceOver.

Task-number: QTBUG-78284
Change-Id: Id7c62d86154bbd5d47d6bbee8cb7d05268c2e151
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-12-19 08:39:10 +01:00
Paul Wicking
caa82e1fc2 Doc: Add since version
for QCursor::swap and QOperatingSystemVersion::currentType.

Fixes: QTBUG-80854
Fixes: QTBUG-80891
Change-Id: Ia256fa0d3ad4665f44b933f5a4a8d4ee87e9fc13
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-12-19 07:03:13 +01:00
Tor Arne Vestbø
669a29f5e7 Xcode: Disable GPU frame capture and Metal API validation by default
The auto-detection Xcode has for whether GPU capture should be enabled
always enables it for our projects, which adds up to second to the
startup time when debugging. There's no need to pay this cost unless
you're actively debugging Metal code.

Change-Id: I4a76c4e7afedad4bb43395ae64bc0f8d62eca6be
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-12-18 19:16:09 +01:00
Leena Miettinen
48704c3f5c Doc: Add since Qt 5.8 info for QResource::lastModified()
Fixes: QTBUG-80856
Change-Id: I2f2b562ad2b262c6dfa236a43589129186589ed7
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-12-18 14:40:38 +01:00
Jani Heikkinen
860d102474 Update enterprise license agreement v4.2.1
Task-number: QTBUG-80661
Change-Id: Ic730a83465dffa2b1076c03a47d6f97a3a9a53a5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-12-18 13:07:19 +02:00
Allan Sandfeld Jensen
b2e3a5502a Parse Xft.dpi with fraction
Some versions of GNOME 3 would set Xft.dpi with fraction though that
is technically not valid.

Change-Id: Ib1027283cc78fd5d9869cd337864a92e28cd7e88
Fixes: QTBUG-64738
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-12-17 21:20:01 +00:00
Tor Arne Vestbø
0a09a6341d Sync implementation of QGuiApplication and QApplication setPalette
The two static setPalette methods in QApplication and QGuiApplication
should have the same behavior in terms of what signals and events
they emit.

Change-Id: I54579d490e31f3783e2d4fea689ca799a070ff1d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-12-17 20:22:39 +01:00
Tor Arne Vestbø
04f5008f51 Let sendApplicationPaletteChange() decide when it needs to exit early
Change-Id: I7a8e6c0b54d2a16a17b292a4102e05f743bcbe29
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-12-17 20:19:37 +01:00
Tor Arne Vestbø
87cedab94e Remove ApplicationResourceFlags::ApplicationPaletteExplicitlySet
After 8fb881900c it's tracked by AA_SetPalette. Since the latter
is publicly observable we remove the internal flag instead.

Change-Id: Ie69799f1b45d68017cb9eaab2a9986cc9ac9ca38
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-12-17 20:19:34 +01:00
Eirik Aavitsland
05d5268502 Fix QPainter::drawLines() with cosmetic pen
Even though each line in the array passed to drawLines() should be
rendered as an independent line, some state was kept in the cosmetic
stroker from one line to the next. This could result in visible
rendering errors.

Fixes: QTBUG-80834
Change-Id: Ief7bf78eab83ae34459802bff5a57d6beec4a5e5
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-12-17 14:04:05 +01:00
Daniel Smith
2f66ea3d69 Bump version
Change-Id: I68a039a111d5130747f5dea9a55e652874953580
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-12-17 12:41:31 +01:00
Christian Ehrlicher
bda2169d96 Doc: remove documented macros which were removed in Qt5
Remove documentation about QMIN, QMAX and QABS - they were removed
during Qt4 -> 5 porting.

Change-Id: I24e12e4f2bba635ff412e73dd1d0134bbab5247a
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-12-17 06:38:58 +01:00
Christian Ehrlicher
8d2a6b422f QTextDocument: compile with QT_NO_PRINTER
The implementation of QTextDocument::print() is not available when
QT_NO_PRINTER is defined but the declaration was so when someone is
using this function (and QT_NO_PRINTER) a linker error will occur.

Fixes: QTBUG-56916
Change-Id: I49aaaa643c4d8587a66fc95733060cea11994872
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-12-16 22:12:45 +01:00
Alexandru Croitor
57abfedf8b configure: Hacky fix to allow re-configuring on android
Make sure that when we call $$qtConfEvaluate("features.shared")
early, the result is not cached via the available key, so that
the value is properly re-evaluated further on when all features
are processed.

Fixes the error message when reconfiguring an Android build
"Unknown feature object shared in expression '!features.shared'."

Amends 4ac872639e

Task-number: QTBUG-79639
Task-number: QTBUG-80096
Change-Id: Ic1cbadac15c34468a9115cc8ec5ea07630185772
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-12-16 19:17:47 +01:00
Joerg Bornemann
542d14bd02 Fix "Broken filename passed to function" message for qmake -tp vc
Since commit 9ab043b6 we're checking for invalid file paths passed to
Qt's file system engine. When initializing the deployment tool for VS
projects we accidentally passed a file path containing '\0'. Fix that by
using an infix QString, not QChar.

Change-Id: Ieae066d20ac290354febd420abce68f28649b365
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-12-16 13:28:37 +01:00
Lorn Potter
868ded6d87 wasm: do not use clamp mode for upstream LLVM
Emscripten version 1.39.0 and above are based upon upstream LLVM, which
does not contain BINARYEN_TRAP_MODE

Fixes: QTBUG-80691
Change-Id: I6129f84a31a607c202e13847b50705ef1c809630
Reviewed-by: jian liang <jianliang79@gmail.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-12-16 18:31:02 +10:00
Marius Kittler
98f19f0036 Use pkg-config to find libjpeg
Change-Id: I42d877fbca5d746114cc28f8ee4db3e54754cd24
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-12-15 19:42:25 +02:00
Christian Ehrlicher
0edd2e39ad Let QItemSelectionModel::columnIntersectsSelection honor the parent
QItemSelectionModel::columnIntersectsSelection() should honor the parent
according to the docs. For rowIntersectsSelection() this was fixed a
long time ago but columnIntersectsSelection() was forgotten.

Sync the both functions and use range-based for loops as a drive-by.

Fixes: QTBUG-80644
Change-Id: Iaf08f85e2225204d1e6564fa4bb0bc826352ed53
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-12-14 08:46:37 +01:00
Christian Ehrlicher
4689e198e7 Doc/SQL: update sql driver creation instructions
Fix the links, remove section about Q_ODBC_VERSION_2 - it wasn't there
since Qt5.0.

Change-Id: I571f5c2cf0f0e2df38638299c26814b510d1a8af
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-12-14 08:46:14 +01:00
Alexandru Croitor
a3a6f28427 OpenGL: Fix signature of GLDEBUGPROC in qopenglextrafunctions.h
The typedef "QOPENGLF_APIENTRYP" was incompatible to the one
in "src/opengl/qopengldebug.cpp" which used "QOPENGLF_APIENTRY".

Note the misisng "P " ending.

The type is meant to be a function pointer, not a pointer to a
function pointer, so remove the extra P.

Change-Id: I229b73ca8e7367f88a2b48e2728e615605f02da3
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-12-13 13:23:19 +01:00
Qt Forward Merge Bot
64f55f2d9e Merge "Merge remote-tracking branch 'origin/5.14.0' into 5.14" 2019-12-13 12:46:24 +01:00
Qt Forward Merge Bot
56b0dabf80 Merge remote-tracking branch 'origin/5.14.0' into 5.14
Change-Id: I03927d2ef75514e4f2633839387806125d8954f1
2019-12-13 12:46:12 +01:00
Tor Arne Vestbø
df69364469 Remove QApplicationPrivate::set_pal
Its purpose was to track the default palette set by the programmer,
but after 8fb881900c this is tracked by the Qt::AA_SetPalette attribute.
The palette itself is always reflected 1:1 in the palette tracked
by QGuiApplicationPrivate::app_pal.

Change-Id: If3e84c8b3ae6070b6c50be7a33adb38799b3f3a5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-12-13 10:10:36 +01:00
Tor Arne Vestbø
072ca960f5 styles example: Set default style up front, and react to style changes
Allows running the example with -style foo or QT_STYLE_OVERRIDE.

No changes to documentation needed.

Change-Id: Id7cef450f13faabd118badde51afb7273439c9fc
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-12-12 23:24:29 +01:00
Tor Arne Vestbø
da0e745752 Explicitly polish palette instead of relying on QApplication::setPalette
The only effect calling QApplication::setPalette will have is the polish,
so opt for doing it explicitly instead of the weirdly looking no-op
assignment.

Change-Id: Ia80b3f60e3e513b68c2993ea8417966f9ab6721e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-12-12 23:24:25 +01:00
Tor Arne Vestbø
96d1d44279 Clean up QApplication::style default style construction
Change-Id: I9f01e7cc5fa90fd9b1f5d12c7ce694c231158c32
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-12-12 23:24:21 +01:00
Tor Arne Vestbø
a9e628e7ec Ensure override style properly clears out previous style if set
QApplication::setStyle has quite a bit of logic to clean up from the
old style before setting a new one. If a style has been set before
the application is created, it's not enough to just delete the existing
style, we need to treat it like a normal style switch.

Change-Id: I2bcc2eb75567bf1bc8a32ac31467b22315a70a0b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-12-12 23:24:17 +01:00