Commit Graph

41851 Commits

Author SHA1 Message Date
Cristián Maureira-Fredes
3f6275960c uic: add customwidget imports support for python
Fixes: QTBUG-81073
Change-Id: I29659481b14927ffcb8f2cb1829b577a67e4b937
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-01-14 08:11:53 +01:00
Joerg Bornemann
6d545dedad Fix mkdir warning for object_parallel_to_source projects
Source files that are right next to the project file result in an
empty "object subdirectory" if object_parallel_to_source is set.
We must not attempt to create empty directories.

Fixes: QTBUG-81271
Change-Id: I431f9fbe46f50fbbaa5d6a59966bfb059418036c
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-01-14 07:58:03 +01:00
Samuel Gaist
44fd33e05c doc: improve SUBDIRS documentation for dependency handling
The use of the 'ordered' CONFIG option is known to not be efficient for
multi-core builds. This patch updates the documentation with an example
using the .depends modifier as well a discourage the use of 'ordered'.

Change-Id: I3575243a7c4138f0671d171441c932c3ad89a411
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2020-01-14 06:55:48 +01:00
Paul Wicking
99b3966319 Doc: Add note about mac-specific behavior for setWindowIcon
Fixes: QTBUG-74985
Change-Id: I7379865ab9564301c1e636ba1fda40cbb9e04c61
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-01-14 06:52:29 +01:00
Tor Arne Vestbø
d8897e0b08 Clarify blacklisting of tst_QWidget::childEvents on macOS
The test expects a very explicit list of events during show, but on
macOS we also get an InputMethodQuery event as a result of the window
becoming active. The test needs to be written significantly to support
these kind of platform differences.

Change-Id: I395c1e9e4e9baf7d9f88f0d067586fc15afb9a16
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-14 00:50:04 +01:00
Tor Arne Vestbø
0617afb2d3 Extend blacklisting of tst_QWidget::showMinimizedKeepsFocus to all macOS versions
For some reason the firstChild gets the focus when clearing the focus.
This seems to be timing dependent, as removing the 30ms qWait 'fixes'
the issue. So does a processEvent call before minimzing. Both of these
require further investigation.

Change-Id: I62833a5541712f97dc24bc63384fa4c051096537
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-14 00:50:03 +01:00
Tor Arne Vestbø
6ae9cc7cb9 Blacklist tests on macOS that rely on moving the cursor
Task-number: QTBUG-76312
Change-Id: Ibb29231141017ed608beaa12255cdd083317433c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-14 00:50:01 +01:00
Tor Arne Vestbø
e1dbb73701 Blacklist tst_QTableView::mouseWheel on macOS
There's a timing issue that affects the position of the vertical
scrollbar when scrolling by pixels.

Change-Id: I29d73574785be539a5870b498a902b1aba887e9c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-14 00:50:00 +01:00
Tor Arne Vestbø
3be91a89af Blacklist tst_QStyleSheetStyle::widgetStylePropagation on macOS
It's not clear why this is failing, but we need to blacklist it so that
we can move over to testing macOS 10.14 and 10.15 in the CI.

Task-number: QTBUG-75786
Change-Id: I208d5af92406c5da8d0210e0188568466b78b2a9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-14 00:49:58 +01:00
Tor Arne Vestbø
b7a56ea3ee Skip tst_QMenu::pushButtonPopulateOnAboutToShow on macOS
The combobox popup can overlap a little with the button, and that's the
expected behavior.

Change-Id: I245bfce85cb5ee661ceb51dbe0d844492878a2bc
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-14 00:15:16 +01:00
Tor Arne Vestbø
eb2a7738a4 Skip instead of fail tests when test server is not available
We were being inconsistent in how we handled this, some tests skipping
while others using QVERIFY. It makes more sense to skip the tests, since
the problem is a missing pre-condition of the test, not the test itself
being bad or exposing real failures in the implementation.

Change-Id: I20eacfe12dbce0b0d926e48cbe2d2772819fa4a5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-01-14 00:15:16 +01:00
Christian Ehrlicher
9dcbf2cf5c QScrollBar: allow scrolling any scrollbar with any mouse wheel
The most common mouse wheel movement corresponds to angleDelta().y().
We have previously allowed the user to use either wheel to scroll either
a horizontal or a vertical scrollbar when the mouse is hovering over it;
but 7d29807296 changed it so that the
vertical mouse wheel could no longer scroll a horizontal scrollbar.
The behavior is now restored as it was in
59cc316620.

Task-number: QTBUG-81007
Change-Id: Ieacdce539d5311499a86af645bbe0d5098e16be6
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-01-13 16:40:34 +01:00
Michal Klocek
7d7ba311e0 Fix isysroot for simulator only builds on ios
When not doing fat builds, QMAKE_MAC_SDK_PATH defaults
to iphoneos sysroot, which breaks compilation.

This fixes compilation when user sets also CONFIG-=device

Change-Id: I1d18269946cd2a5608e26d943159c824f31db09a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-01-13 14:48:09 +00:00
Michal Klocek
95d5a8e74f Report error when qt ios is built with debug only
Doing only debug build is not supported at the moment.
Add error to configure.

Task-number: QTBUG-71990
Change-Id: If35d00c3f09d733efe63d5ea66d07e4a3ec922cc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-01-13 15:48:04 +01:00
Paul Wicking
9233ffa2d1 Doc: Don't document QTextStreamManipulator
Fixes: QTBUG-81002
Change-Id: Ic7d0516a25a8a6e63e1a305ca87498948d41013c
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2020-01-13 15:29:06 +01:00
Shawn Rutledge
41b44c6f21 doc: explain QWheelEvent::angleDelta() more thoroughly
It has been a QPoint for a long time now, to support both the usual
vertical mouse wheel and also the wheel tilt for horizontal scrolling,
or the actual horizontal wheel if the mouse has one, or the simulation
of a horizontal wheel via touchpad gestures; but the docs continued to
read as if it was just one value.

Task-number: QTBUG-71575
Change-Id: I3efa686ace4f09c7f237f72bf0500fbfbd3213cb
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-01-13 15:28:31 +01:00
Edward Welbourne
04f6073da2 ICC compile-fix for __builtin_add_overflow()'s parameter type
Based on Glen Johnson's patch, but rearranged to avoid repetition.

Fixes: QTBUG-81248
Change-Id: I9c23ab233ebd5514bc05fd155999597ada7295ef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-13 13:06:15 +01:00
Friedemann Kleint
caab0ad357 Fix Mandelbrot Example documentation with regards to qRegisterMetaType()
The call to qRegisterMetaType() has been removed since the type
is registered as a meta type in Qt 5. Assert on the meta type id instead.
Adapt the documentation accordingly.

Fixes: QTBUG-81254
Change-Id: I0cb459d0dda7a82fc37871605ff634004af0f9f9
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-01-13 12:50:03 +01:00
Thiago Macieira
f936ca4f86 qglobal.h: remove non-ASCII quotes from comment
Because MSVC warns. Added by me on commit.
c496fee2a5

Fixes: QTBUG-81310
Change-Id: I596aec77785a4e4e84d5fffd15e93a8e367e035e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-01-13 02:36:08 -08:00
Rainer Keller
76fbe75abe Remove empty block at beginning of imported markdown
An empty QTextDocument already contains a block; so when the formatting
is fully determined, if the document is still empty, then instead of
inserting a new block, we can set formatting on the cursor, which
affects the pre-existing block, before inserting text.  This avoids
leaving a blank line (the default block) above the inserted content.

Fixes: QTBUG-81060
Change-Id: I14e45e300a602493aa59680417d74d4c2b25862d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-01-13 09:25:39 +01:00
Alexandra Cherdantseva
18e06c37e1 wasm: do not get canvas as property of js global object
You cannot be sure that property with specified key in
a global object is really a canvas.
Should use `document.getElementById`.

Change-Id: Ife55adaad5517aed64122b0c9bff32489cf19a2f
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2020-01-13 11:07:21 +03:00
Morten Johan Sørvig
3d1e257770 Wasm: Support event loop wakeup from secondary threads
Minimal fix for the missing wakeup issue, in leu of
a new event loop implementation.

So far, emscripten_async_run_in_main_runtime_thread_
looks to be our option for scheduling calls on the
main thread. This function is available on emsdk 1.38.22
and higher.

Requires making from QEventDispatcherUNIX::wakeUp()
non-final. The future event dispatcher implementation
will not inherit QEventDispatcherUNIX, so this is a
temporary change.

Fixes: QTBUG-75793
Task-number: QTBUG-76007
Change-Id: Ie6f6ee6f7674206fc0673a4fe866ac614432ab65
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2020-01-12 21:38:21 +01:00
Giuseppe D'Angelo
2f536411d8 QRegularExpression: minor doc fixes
Amends d24a1d4323

Change-Id: I108f85b174e21ef71bf269fb9f6725972e76f107
Reviewed-by: David Faure <david.faure@kdab.com>
2020-01-12 12:29:58 +01:00
Giuseppe D'Angelo
577d698b8e QString::isLower/isUpper: redo the implementation
Use QStringIterator rather than indexed loops. This fixes handling of
non-BMP code points (which may be lower or uppercase, see the test).

Change also the semantics of the functions, adopting Unicode §3.13
definitions: a string is lowercase/uppercase if it's equal to its
own toLower/toUpper folding.

As a side effect, empty strings are now correctly reported to be
lowercase AND uppercase.

[ChangeLog][Important Behavior Changes] The semantics of
QString::isLower() and QString::isUpper() have been changed to match the
Unicode specification. Now lowercase (resp. uppercase) strings are
allowed to contain any character; a string is considered lowercase
(resp. uppercase) if it's equal to its own toLower() (resp. toUpper())
folding.  Previously, a non-letter character would make the string not
lowercase nor uppercase, and the mere presence of an uppercase (resp.
lowercase) letter would make isLower() (resp. isUpper()) return false,
even if the letter wouldn't change under case folding.  As a
consequence, now empty strings are lowercase and uppercase.

[ChangeLog][QtCore][QString] Fixed a number of bugs of
QString::isLower() and QString::isUpper(). Empty strings are now
correctly reported to be lowercase (resp. uppercase), and strings
containing code points outside the BMP are now correctly handled.
Note that the behavior of these functions has also been changed.

Change-Id: Iba1398279a072399a9f21295fe75f6e414f3f813
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-11 19:28:50 +01:00
Friedemann Kleint
c584380c69 Windows QPA: Update documentation on command line options
Sort alphabetically and add recent relevant options with version
information.

Change-Id: I10c8cc82ce357775ed68cb811a0c906cd38633a5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-01-10 19:24:11 +01:00
Friedemann Kleint
c4a9429be7 Fix developer build with clang-cl failing due exception spec
Clang does seem to understand  __declspec(nothrow) as
used by the COM macros like STDMETHOD. Suppress the warning,
fixing errors like:

qwindowsfontenginedirectwrite.cpp(105,24): error: 'AddBeziers' is missing exception specification '__attribute__((nothrow))' [-Werror,-Wmicrosoft-exception-spec]

Task-number: QTBUG-63512
Change-Id: If582cb0c12c62a7d12c4ae702747aac1f735db3c
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-01-10 08:26:57 +01:00
Christian Ehrlicher
efff8ff57a QFileSystemWatcher/win: watch also for attribute changes of directories
The windows filesystemwatcher did not watch for attribute changes for
directories (e.g. hidden flag) so it was not in sync with other
backends. Fix it by adding FILE_NOTIFY_CHANGE_ATTRIBUTES to the watch
flags when watching a directory.

[ChangeLog][QtCore][QFileSystemWatcher] Fixed a bug that caused QFSW not
to watch for attribute changes on Windows. Now it will correctly report
when files and directories become hidden or unhidden, for example.

Fixes: QTBUG-80545
Change-Id: I31767a0da899963e3940b4f5b36d1d581e6aa57c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-01-10 06:24:14 +01:00
Andy Shaw
1c75f59588 iOS: Handle positionFromPosition out of bounds
Based on the documentation for positionFromPosition, if the resulting
position is less than 0 or longer than the text, then we should return
nil. This fixes problems with placement of the cursor and selection
rectangle when auto-completion is used.

Fixes: QTBUG-79445
Change-Id: I44a18881527a8a22012fe5fcbbc3216e60c48bc9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-01-09 15:28:43 +01:00
Jani Heikkinen
1e42c97cf0 Bump copyright year
Change-Id: I9468ef21a2cf03cf07c38f012a2aa9bae6d02a03
Reviewed-by: Johanna Äijälä <johanna.aijala@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-01-09 14:41:53 +02:00
Joerg Bornemann
8bfdb25c1f Doc: Extend the documentation about qmake scopes
Fixes: QTBUG-18025
Change-Id: I2b587266cde2002d965dc824a869be255cf3522e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-01-09 11:27:10 +01:00
Edward Welbourne
11c5c078c7 Eliminate QLocale's default_number_options global static
It had create()'s default number options when passed to create, so
wasn't useful then; and otherwise shadowed the value held by the
cached private for the default locale. Noticed in the course of adding
an analogous global for the system locale.

Drive-by - eliminated a redundant language != C check.

Change-Id: I5601dc09188804c11dede5be460bfdd12b8152ce
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-09 11:15:50 +01:00
Edward Welbourne
0f80452b92 Improve QLocale method documentation
Add missing \sa lines, clarify what the exponential character is and
mention that C is an exception to the "no number options set".

Change-Id: I13ca483a07738908640408e0ca512de31586cec9
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-09 11:15:07 +01:00
Edward Welbourne
f91af791cc Add advance warning of change of return types coming in Qt6
The QLocale methods that report the fragments used in making up
numbers all return QChar. A note dating from before Qt5 times warned
that we need to change these to return QString (since we might need a
surrogate pair to represent the relevant characters). Give advance
warning in the documentation that this shall happen at Qt 6.

[ChangeLog][QtCore][QLocale] decimalPoint(), groupSeparator(),
percent(), zeroDigit(), negativeSign(), positiveSign() and
exponential() still return QChar but shall be changed to return
QString in Qt 6. Callers are encouraged to switch to QString early,
exploiting the QString(QChar) constructor.

Task-number: QTBUG-81053
Change-Id: Ia802c7665676ecf13669c6a6f173f2e70eac578e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-01-09 11:13:59 +01:00
Pasi Petäjäjärvi
6224130cc8 Add touch input device mapping support via QT_QPA_EGLFS_KMS_CONFIG
To be feature parity with evdev touch which already supports this

Change-Id: Ie7f9c868ea888725b24c3855106e1c0c0ba943a9
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-01-09 12:06:33 +02:00
Edward Welbourne
70d484b5df Fix encoding expected by tst_qmessagehandler::qMessagePattern()
The actual logging code, qt_message_print(), uses toLocal8Bit(), so
testing by comaring with toUtf8() isn't robust.

Change-Id: I7d6614e4af8c679674dbbf4ff47a88b2b75fc2dc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-09 10:58:25 +01:00
Edward Welbourne
bcc8cf5e3b Fix encoding inconsistency between tst_QNoDebug and QTestLog
Fix tst_QNoDebug::streaming() to use toLocal8Bit(), to match
QTestLog::ignoreMessage(), which uses fromLocal8Bit().

Change-Id: I65f7b995a582aeab7b7ba61781a229fecd1ed3c3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2020-01-09 10:57:49 +01:00
Edward Welbourne
6f1ae59ee6 Change getMacLocaleName() to return a QString
Returning a QByteArray required doing a toUtf8() to a QString on one
of its paths, which was promptly undone by its caller using
fromUTf8(), since a QString was needed anyway.

Drive-by - remove spurious default for parameter in method definition.

Change-Id: I45f553d74cd0ba9dab25c439ba8291c00b7ceb5b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-09 10:55:54 +01:00
Samuli Piippo
2385ab73be QInputDeviceManager: initialize device counts
The device counts were used before they were initialized, causing
problems e.g. with mouse cursor.

Fixes: QTBUG-81207
Change-Id: Ic9dadcaebeb4c4a64bb506e4236d5a9260e0fdbc
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-01-09 10:45:48 +02:00
Lars Schmertmann
34e467b481 Remove dead code to fix a lint warning
Obsolete SDK_INT Version Check
------------------------------
This check flags version checks that are not necessary,
because the minSdkVersion (or surrounding known API level)
is already at least as high as the version checked for.

The mindSdkVersion in templates/AndroidManifest.xml is 21 for Qt 5.14
and androiddeployqt also ensures that the minSdkVersion is not below 21.

Change-Id: I452de5b152f572efc69e6b292a8b15dbbfba639b
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
(cherry picked from commit b8e404f6d0631e04d30a864dc68b0574bfca90f1)
2020-01-09 08:04:41 +01:00
BogDan Vatra
3b54009b13 AAB files can be signed only with jarsigner tool
Fixes: QTBUG-80406
Change-Id: I04b99477c744e7dd729a791c81194b90c4ec658a
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-01-09 08:26:50 +02:00
BogDan Vatra
ce04fa345d Android: make sure we don't add _$${QT_ARCH} twice
Fixes: QTBUG-80582
Change-Id: I2b3790bb18754e146db611d61c48a3b7a532575c
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-01-09 08:25:42 +02:00
Andre Hartmann
1edf8bc465 QObject: Replace more 0 and NULL with nullptr
... in docs, comments, and warnings. Also adopt
some occurrences around there and in the snippets.

Change-Id: Icc0aa0868cadd8ec2270dda794bf83cd7ab84160
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2020-01-09 02:33:08 +01:00
Tor Arne Vestbø
7b092b3fe3 Remove clearWidgetPaletteHash argument from setPalette_helper
The argument is only used when the application palette is set,
(as opposed to setting the palette for a specific widget class),
and that code path is only triggered from QApplication::setPalette,
which passes 'true' for this argument.

Change-Id: I67a1cc3741f6f62653b0f95ff88d28228f9977d4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-01-09 02:33:08 +01:00
Tor Arne Vestbø
2a02487ff0 Move tracking of widget specific app palettes to QApplicationPrivate
Change-Id: I43cc25207026f174e46534baedf08e0c300728d1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-01-09 02:33:08 +01:00
Tor Arne Vestbø
0c37bc11b5 Share updates to QGuiApplicationPrivate::app_pal via helper function
Change-Id: I2f582358efaadcd33b39c52317222322c589423f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-09 02:33:08 +01:00
Inho Lee
445c1a873f Resolve a build error for ICC 19
This argument name makes an error with "line 302:Type t = Undefined;"

Change-Id: I5488ff02ab7c9f9391c17361da5e2aac2727a6a0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-09 01:33:08 +00:00
Thiago Macieira
64359ad710 ucstrncmp: Fix UBSan report of array overflowing
The expression "a + offset + N" will eventually calculate an address
past the end of a, since we are comparing to end. That's undefined
behavior. Instead, calculate end - a and compare that to offset + N.

This commit subtracts "a" from both sides of the inequalities and swaps
the two sides to make them obey Qt coding style. Testing with GCC 9
(which is the only one I care about) shows the compiler generates the
same code.

Fixes: QTBUG-81218
Change-Id: Id84da383373844f3a4b0fffd15e7c1ab904daccd
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2020-01-09 01:33:08 +00:00
Giuseppe D'Angelo
c61cedcc54 GCC: revoke constexpr before 5.0
It's causing build failures on GCC 4.9 due to our code hitting

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57694

(at least since de82d239f8).

Task-number: QTBUG-80997
Change-Id: I80a9d1fcbf26d8c0bf514ddc7bdb86eb7173360f
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2020-01-09 02:33:08 +01:00
Nico Vertriest
22942058aa Doc: Correct qdoc compilation errors qtbase
Task-number: QTBUG-79824
Change-Id: I4be365d92b1adfde09efd04d088f75c506666a95
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2020-01-09 02:33:08 +01:00
Jean-Michaël Celerier
c77efa6d38 Disable support for RasterOpModes in GL paint engine
This leads to crashes for instance when displaying a text cursor
in a graphics scene.

Change-Id: I1b5c884ddb8325a7f5bdbc6027f0fae13f139a1c
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-01-09 02:33:08 +01:00