Commit Graph

41227 Commits

Author SHA1 Message Date
Edward Welbourne
978f579a8c Use quiet NaNs instead of signaling ones
I see no good reason why the NaN returned when reading "nan" as a
double should be a signaling one; a quiet one should be just fine.

[ChangeLog][QtCore][QLocale] The NaN obtained when reading "nan" as a
floating-point value is now quiet rather than signaling.

[ChangeLog][QtCore][QTextStream] The NaN obtained when reading "nan"
as a floating-point value is now quiet rather than signaling.

Change-Id: Ife477a30bfb813c611b13a33c38ea82f9e8a93eb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-09-04 18:43:21 +02:00
Marc Mutz
effbf147a4 QUnicodeTables: use array for case folding tables
Instead of four pairs of :1 :15 bit fields, use an array of four :1,
:15 structs.  This allows to replace the case folding traits classes
with a simple enum that indexes into said array.

I don't know what the WASM #ifdef'ed code is supposed to effect (a :0
bit-field is only useful to separate adjacent bit-field into separate
memory locations for multi-threading), but I thought it safer to leave
it in, and that means the array must be a 64-bit block of its own, so
I had to move two fields around.

Saves ~4.5KiB in text size on optimized GCC 10 LTO Linux AMD64 builds.

Change-Id: Ib52cd7706342d5227b50b57545d073829c45da9a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-09-04 16:35:37 +00:00
Kai Koehne
90ae72d852 Doc: Remove 'f.i.'
Spell it out, or entirely remove it if it's not necessary.

Change-Id: Idc371427e9351d948245ce7b719e3457dfc27845
Reviewed-by: Matthew Woehlke <mwoehlke.floss@gmail.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-09-04 17:23:24 +02:00
Tor Arne Vestbø
c3e0e7a3eb Limit QColorSpacePrimaries export to auto-test
Change-Id: I997a5a7afa72f2fd527921ed81d6ccf5f339962b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-09-04 16:35:33 +02:00
Liang Qi
663c27a2b1 Merge "Merge remote-tracking branch 'origin/5.13' into 5.14" 2019-09-04 16:30:02 +02:00
Allan Sandfeld Jensen
21ba294345 Merge memrotate and blit feasability checks
Besides reducing duplicate code, this also improves the checks by
sharing optimized checks:
1. Fast memrotate will now also trigger with compatible formats (RGB32
over ARGB32)
2. Fast blitting will now also trigger with smooth transforms enabled,
if the coordinates are pixel aligned.

Change-Id: I576ebb34646d62ed472b1e1772e1b876b8121634
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-09-04 16:29:45 +02:00
Timur Pocheptsov
b9b48464df tst_http2::goaway - run in ALPN mode only
I was observing rare crashes on my mac, where I was using SecureTransport.
This would imply both the client (the test) and the server were working
in h2c mode. But this is against the test's logic - the first request
will be HTTP/1.1 (and upgrading protocol) and I wanted to send 3 HTTP/2
requests instead.

Fixes: QTBUG-77476
Change-Id: I048ca242e2096ca36dd112277807d1fee530150c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-09-04 15:35:50 +02:00
Daniel Smith
651dd26403 Update lancelot tests to use non-system-specific host info collection
Change the lancelot baseline test runner to use generic text files for
host info data collection. This also avoids relying on QProcess and
scraping the bash scripts output from stdout.

Fixes: QTBUG-71836
Change-Id: I88a46c99dbb11f71afc18cae5a6d2fbebcbe76c5
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-09-04 13:09:39 +00:00
Marc Mutz
2737b5e36a QUnicodeTables: pack Properties struct
GCC doesn't like the sequence

   : 5
   : 5
   : 8
   : 6
   : 8

and inserts a :6 padding between the :5 and the :8 and a :2 padding
between the :6 and the :8, growing the bitfield by 8 bits of embedded
padding and another byte to bring the struct back to sizeof % 2 == 0.

Fix by reshuffling the elements and adding a static_assert for the
next round.

Saves ~5KiB in QtCore executable size.

Change-Id: I4758a6f48ba389abc2aee92f60997d42ebb0e5b8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-09-04 10:06:19 +02:00
Liang Qi
6a36fe904c Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/corelib/codecs/qicucodec.cpp
	src/dbus/qdbusserver.cpp
	src/gui/painting/qbezier.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
	src/plugins/printsupport/cups/qppdprintdevice.cpp

Change-Id: I2703128bb64baf5580fbc2c2061b55b0f0611d2a
2019-09-04 07:03:54 +02:00
Joerg Bornemann
abfb1b8665 Don't add default lib dirs to LIBRARY_SEARCH_PATHS in xcode projects
Having hard-coded absolute paths in the xcode project breaks switching
between iOS and simulator builds.

Fixes: QTBUG-77804
Change-Id: Ib655bfc774b92c413a7b94ba4d005b6e1c4d2905
(cherry picked from commit 97465b1540)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-09-03 20:52:35 +02:00
Friedemann Kleint
db57af5a0d QRegexp: Fix MSVC2019 warning about fallthrough not being followed by a case label
Move  fallthrough down, fixing:
tools\qregexp.cpp(3014): warning C4468: 'fallthrough': attribute must be followed by a case label or a default label
tools\qregexp.cpp(3054): warning C4468: 'fallthrough': attribute must be followed by a case label or a default label
tools\qregexp.cpp(3100): warning C4468: 'fallthrough': attribute must be followed by a case label or a default label

Change-Id: If25ddec5dc1d4929a3383729aabad89f5879e316
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2019-09-03 18:07:54 +02:00
Friedemann Kleint
18088d4706 QtGui: Refactor parsing of the High DPI scaling env variables
Use qEnvironmentVariable() where applicable and refactor the
parsing of QT_SCREEN_SCALE_FACTORS to use QStringRef.

Task-number: QTBUG-53022
Change-Id: I8956c6cecd7b634679eb5e66d2a87cccaf9e7936
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-09-03 18:07:00 +02:00
Tor Arne Vestbø
dfeb2e16e0 Don't export QIcc helper functions
Change-Id: I93209ae333aa4e7e7844b2699370c1cf2a2defbe
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-09-03 17:10:22 +02:00
Tor Arne Vestbø
cc1ea2bf47 Simplify QColorSpace named presets
We don't need a getter for the 'preset' of a color-space, as color
spaces can be compared to the presets directly. This allows us to
remove the Undefined and Unknown values from the presets.

Internally we still distinguish known presets from unknown or undefined
presets via the magic 0-value. The validity of a QColorSpace is not
based on this preset, but on its actual values.

Fixes: QTBUG-77963
Change-Id: I1e0a2a4be83021b8c82b3c778019f680fd46455b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-09-03 15:10:11 +00:00
Alexandru Croitor
098d7549c1 Android: Fix architecture extraction from file path in androiddeployqt
The regular expression was too greedy with the ".*" sub-expression,
thus if the prefix path contained underscores, the extracted
architecture value was wrong.

Example prefix:
~/dev/qt/qt514_built_android/qtbase

Example captured architecture:
built_android/qtbase/plugins/platforms/android/libqtforandroid_x86

First extract the file name from the given path, and then match
on just the file name.

Change-Id: I8e56e56747096c7a2398e959d91c2d1f65de2495
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-09-03 16:44:08 +02:00
Friedemann Kleint
efbba1e54a Brush up tst_QStyle
- Remove member m_testWidget; instantiate test widget on the
  stack where needed
- Introduce nullptr
- Use range-based for
- Streamline some code
- Fix static invocation
- Fix class structure, add override
- Use initializer lists
- Fix some style issues

Task-number: QTBUG-76493
Change-Id: If339d51a16bb77565cf10404ad1266c8f63a68b4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-09-03 15:00:13 +02:00
Friedemann Kleint
f00e326656 Fix some qdoc warnings in 5.14
Mark QCalendarBackend as internal since it is in a private header
and fix some issues in the QCalendar related classes.

src/corelib/time/qcalendar.cpp:201: (qdoc) warning: clang found diagnostics parsing \fn int QCalendarBackend::daysInMonth(int month, int year) const
    error: incomplete type 'QCalendarBackend' named in nested name specifier
(repeats)
src/corelib/time/qdatetime.cpp:1426: (qdoc) warning: Unknown command '\override' (repeats)
src/corelib/time/qcalendar.cpp:642: (qdoc) warning: Undocumented enum item 'Last' in QCalendar::System
src/corelib/time/qcalendar.cpp:642: (qdoc) warning: Undocumented enum item 'User' in QCalendar::System
src/corelib/time/qcalendar.cpp:744: (qdoc) warning: Undocumented parameter 'year' in QCalendar::isLeapYear()
src/corelib/time/qcalendar.cpp:923: (qdoc) warning: Can't link to 'dateTimeString()' (repeats)
src/corelib/time/qcalendar.cpp:893: (qdoc) warning: No such parameter 'year' in QCalendar::partsFromDate()
src/corelib/time/qcalendar.cpp:893: (qdoc) warning: No such parameter 'month' in QCalendar::partsFromDate()
src/corelib/time/qcalendar.cpp:893: (qdoc) warning: No such parameter 'day' in QCalendar::partsFromDate()
src/corelib/time/qdatetime.cpp:1425: (qdoc) warning: Undocumented parameter 'nmonths' in QDate::addMonths()
src/corelib/time/qdatetime.cpp:1467: (qdoc) warning: Undocumented parameter 'nyears' in QDate::addYears()
src/corelib/statemachine/qstatemachine.cpp:2522: (qdoc) warning: Undocumented enum item 'StateMachineChildModeSetToParallelError' in QStateMachine::Error
src/corelib/kernel/qtimer.cpp:602: (qdoc) warning: Undocumented parameter 'connectionType' in QTimer::callOnTimeout()
src/corelib/time/qcalendar.cpp:159: (qdoc) warning: Undocumented parameter 'name' in QCalendarBackend::QCalendarBackend()
src/corelib/time/qcalendar.cpp:159: (qdoc) warning: Undocumented parameter 'id' in QCalendarBackend::QCalendarBackend()
src/corelib/time/qcalendar.cpp:529: (qdoc) warning: Can't link to 'registerCalendar()'
src/corelib/time/qcalendar.cpp:529: (qdoc) warning: Can't link to 'fromName()'
src/corelib/time/qcalendar.cpp:178: (qdoc) warning: Can't link to 'QCalendar::fromEnum()'
src/corelib/time/qcalendar.cpp:405: (qdoc) warning: Undocumented parameter 'jd' in QCalendarBackend::dayOfWeek()
src/corelib/time/qcalendar.cpp:405: (qdoc) warning: Can't link to 'weekDayName()'
src/corelib/time/qcalendar.cpp:405: (qdoc) warning: Can't link to 'standaloneWeekDayName()'
src/corelib/time/qcalendar.cpp:268: (qdoc) warning: Can't link to 'daysInMonth()'
src/corelib/time/qcalendar.cpp:268: (qdoc) warning: Can't link to 'isLeapYear()'
src/corelib/time/qcalendar.cpp:295: (qdoc) warning: Can't link to 'daysInMonth()'
src/corelib/time/qcalendar.cpp:313: (qdoc) warning: Can't link to 'isLuniSolar()'
src/corelib/time/qcalendar.cpp:313: (qdoc) warning: Can't link to 'isSolar()'
src/corelib/time/qcalendar.cpp:313: (qdoc) warning: Can't link to 'isLunar()'
src/corelib/time/qcalendar.cpp:340: (qdoc) warning: Can't link to 'daysInMonth()'
src/corelib/time/qcalendar.cpp:357: (qdoc) warning: Can't link to 'daysInMonth()'
src/corelib/time/qcalendar.cpp:544: (qdoc) warning: Can't link to 'fromName()'

Change-Id: Ia2fabefb917f8e4cfa361044d9b754717276f4aa
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-09-03 12:52:55 +02:00
Friedemann Kleint
194d4946c7 tst_QStyleSheetStyle: Pass on High DPI screens
The test requires High DPI scaling to be disabled since it
manipulates the factors itself in a test.

Turn it off initially and introduce a member variable
containing a suitable size depending on the screen to make the
test pass on High DPI screens without violating minimum window
widths on Windows.

Task-number: QTBUG-76493
Change-Id: I7b908940413d6a35a4bee781b4df07a31069bb17
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-09-03 06:27:55 +00:00
Friedemann Kleint
0a1f48a082 Brush up tst_QStyleSheetStyle
- Fix includes
- Fix a widget leak (incorrectly parented QComboBox)
  and add a check in cleanup()
- Add window titles
- Introduce nullptr
- Replace C-style casts
- Use range-based for
- Streamline some code
- Fix static invocation
- Fix class structure, add override
- Use initializer lists

Task-number: QTBUG-76493
Change-Id: I035ec782fa1241a5a1d775e86b0591d9bd134359
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-09-03 06:27:44 +00:00
Tor Arne Vestbø
60e1c3b698 macOS: Remove use of deprecated QMatrix APIs in style
Change-Id: If88a6a49b6289eb16b3cc6fca7fd340a93b72934
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-09-02 21:35:31 +02:00
Sona Kurazyan
38d5ad2ee5 Fix the build with disabled QGraphicsItem::ItemMatrixChange
QGraphicsItem::ItemMatrixChange has been deprecated since 5.14. Fixed
the usage in tests to compile condinionally, only when it is available.

Change-Id: I63e892a01a50fb9ac51bf38eb761cb26375bc194
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-09-02 20:56:03 +02:00
Shawn Rutledge
1b0c45f683 Deliver stationary touchpoints that have changed pressure
As a rule, we don't deliver touch events containing only stationary
touchpoints.  To fix QTBUG-52510 we added an exception in
1bd0ab7050 : if the velocity changed,
deliver it anyway.  Now we need to do the same if the pressure changed.

Also, on the customer's hardware, pressure is indicated via ABS_MT_PRESSURE.

Change-Id: If7f7088df055d686cdd86967b999e38024f8170f
Fixes: QTBUG-77142
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-09-02 20:25:06 +02:00
Alexander Volkov
98c5f22161 Avoid invalid memory access in QIconCacheGtkReader::lookup()
If name argument is empty, e.g. an icon is created by
QIcon::fromTheme(""), then icon_name_hash() will access
a byte at index 1, which is outside of the string.

Change-Id: I109c476718939d7dd252007ebac48c3dbbeceb72
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-09-02 20:51:59 +03:00
Timur Pocheptsov
dbfa374a86 QHttpNetworkConnectionChannel - avoid re-connecting on 'disconnected'
The _q_error slot has a special case for RemoteHostClosedError,
where the current channel's state is 'idle' and no request/reply
is in progress. The comment states that:

"Not actually an error, it is normal for Keep-Alive connections
 to close after some time if no request is sent on them. No need
 to error the other replies below. Just bail out here. The _q_disconnected
 will handle the possibly pipelined replies."

_q_disconnected, indeed, takes care about pipelined replies ... calling
'ensureConnected' even if we have 0 replies in pipeline, which makes
zero sense to me and results in QNAM endlessly trying to re-connect
to the server.

Fixes: QTBUG-77852
Change-Id: I6dcb43b36a6d432bc940246a08f65e1ee903fd24
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-09-02 19:51:56 +02:00
Allan Sandfeld Jensen
bc1f7c7cce Fixup includes
One include too many and one too little.

Change-Id: I9963adb02523305d753135c0f5a6baefb83a06f1
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2019-09-02 18:43:00 +02:00
Allan Sandfeld Jensen
c8d3eb35e7 Fixup move semantics of QColorSpace
Stop using QExplicitlySharedDataPointer, makes it possible to inline
the move constructor and assign operator.

Also protect other methods from nullptr d_ptr, and change the default
constructed value to also have a null d_ptr, to match the result after
a move.

Change-Id: I40928feef90cc956ef84d0516a77b0ee0f8986c7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-09-02 18:37:07 +02:00
BogDan Vatra
162e23d838 Android: Add aab target
Move aab, apk, apk_install_target to !build_pass, otherwise these targets
will be executed for each android abi.

Change-Id: I18f6c8946f503f2c08338f24758bf9059987fe0f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-09-02 18:32:29 +03:00
BogDan Vatra
c9f8893000 Add support for aab
Change-Id: I4814a51b25d5e3953e5e1c71d9a0e1bf3fed7385
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-09-02 18:32:13 +03:00
Andre de la Rocha
1c55a6caf1 Windows QPA: Fix crash in UI Automation with Youdao Dictionary
Unlike other accessibility classes, QAccessibleTree is returning a
different instance, with a different ID, every time child()/childAt()
are called for the same child elements. This causes
ElementProviderFromPoint to return different IRawElementProviderSimple
instances every time, for the same coordinates, which causes the
NetEase Youdao Dictionary to call it in an infinite loop, allocating
new QAccessibleTableCell instances, until the application crashes.
The crash happened, for instance, just by using the mouse over
Qt Creator's project tree while Youdao Dictionary was running. While
the root cause seems to be QAccessibleTree not caching and reusing
objects, this change adds a layer of safety to the UI Automation
classes in the Windows QPA, to avoid causing a crash until
QAccessibleTree, and possibly other accessibility classes, are fixed.

Fixes: QTBUG-77974
Change-Id: I9b0c8174bc0fd9ef7f5626ee0b72c8a9626520ee
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-09-02 13:53:56 +02:00
Friedemann Kleint
60bea1c85a QFileSystemModel: Fix naming of Option enumeration
Fix an API review finding in 5.14, amending
6b9d319b26.

Change-Id: I6c67ebde91021b87a43a86ff831b724f098019aa
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-09-02 13:21:57 +02:00
Frank Richter
699a0d2dee QVulkanWindow: Add function to retrieve graphics queue family index
Change-Id: I51e4a006e82fbcd998815da3de6daa80558a973f
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-09-02 12:10:25 +02:00
Eirik Aavitsland
6bb51e0f08 QPainter lancelot test: improve drawImage testing
In QPainter, there is a shortcut code path for the drawImage(point,
image) call, relative to the full drawImage(targetRect, img,
srcRect). The lance script interpreter would only use the latter, so
the former was not covered by the tests.

As a driveby, remove the pointless usage of non-default dithering
flags in drawImage(), since it is more important to test the default.

Change-Id: Id373fd528a0c4c40b6bd8eea37b960fd7cdb2cc7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-09-02 12:08:40 +02:00
Friedemann Kleint
f6b34ce173 Windows QPA: Update theme fonts when the primary screen changes
Call into the theme to update the fonts on a change. This
at least helps in the case of disabled High DPI scaling.

Task-number: QTBUG-77144
Change-Id: I2c8fd85259403eaaeea56cd096f99116fc6bba9a
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-09-02 12:08:37 +02:00
Kevin Funk
8ce653e048 Make sure QLatin1Literal fwd header is generated
This broke when QLatin1Literal got deprecated in change 45373c1924

Both hunks in this patch are needed. The hunk in syncqt.pl removes the
QT_DEPRECATED_X(...) macro if it appears solely on a line in source code,
the second hunk inserts a newline after the QT_DEPRECATED_X(...) macro usage
to trigger that code path in the Perl script.

Before/after comparison of the headers generated in include/QtCore:

```
% diff  ~/old.txt ~/new.txt
105a106
> QLatin1Literal
```

Change-Id: I468dd2dd54bf115521ed82c6182236905556f568
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-09-02 11:33:54 +02:00
Rainer Keller
af6ac444c9 Fix crash when text contains too many directional chars
In case a text to be layouted contains more than 128 directional characters
it causes the application to crash

The function initScriptAnalysisAndIsolatePairs() collects information of
RTL/LTR chaaracters into vector "isolatePairs". The size of the vector is
capped to 128. Later the function generateDirectionalRuns() iterates
the text again and tries to access items from the previously capped vector
above the upper bound.

Task-number: QTBUG-77819
Change-Id: Ibb7bf12c12b1db22f43ff46236518da3fdeed26a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
(cherry picked from commit 1232205e32)
Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-08-31 08:29:31 +00:00
Joerg Bornemann
7b82d27429 Fix library suffix replacement for xcode projects
In xcode projects we replace the _debug part of referenced libraries with the
variable $(QT_LIBRARY_SUFFIX). This only worked for libraries passed with -l.

Make the library suffix replacement work for libraries passed as absolute paths
too.

Fixes: QTBUG-77804
Change-Id: Iac2dbd2f67c3fa0f415ac43cbab5a906657164e5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-08-31 07:56:54 +00:00
Qt Forward Merge Bot
364b9c80de Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" 2019-08-31 01:00:59 +02:00
Qt Forward Merge Bot
3176c821bf Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I9823da32168e99bbece2f8337d0bd4d33e6d634c
2019-08-31 01:00:48 +02:00
Marc Mutz
e45e6efa72 QTouchDevice: don't play ping-pong with q*PostRoutine()
Removing a qPostRoutine is an O(N) operation. It's perfectly ok to
keep calling it even if the list has become empty before.

Just qAddPostRoutine in the deviceList's ctor and never remove it
again.

Add a missing qAsConst as a drive-by.

Change-Id: I25f824b74012146214568cfccb22c5dba3ca38ef
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2019-08-30 22:38:37 +02:00
BogDan Vatra
65dfc485ad Android: clean configure params for android
-android-toolchain-version is not needed anymore as we are using exclusively the llvm toolchain.

Change-Id: Ia033297a6a2c968352c364758eb1436380a5f96e
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-08-30 22:29:14 +03:00
Mårten Nordheim
6b884d2aa1 QByteArray: Don't realloc when resizing to a smaller size
The same change was done for QVector and QString for 5.6 while
QByteArray was not done/forgotten. For the sake of consistency
we should converge on one type of behavior.

The change mirrors the one for QString:
50ab7c16d4

[ChangeLog][QtCore][QByteArray] resize() will no longer shrink the
capacity. That means resize(0) now reliably preserves capacity().

Change-Id: I4fcfa92f75fa472af0eaab567e1cdd62e6d336b0
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-08-30 19:26:41 +00:00
Rainer Keller
1232205e32 Fix crash when text contains too many directional chars
In case a text to be layouted contains more than 128 directional characters
it causes the application to crash

The function initScriptAnalysisAndIsolatePairs() collects information of
RTL/LTR chaaracters into vector "isolatePairs". The size of the vector is
capped to 128. Later the function generateDirectionalRuns() iterates
the text again and tries to access items from the previously capped vector
above the upper bound.

Task-number: QTBUG-77819
Change-Id: Ibb7bf12c12b1db22f43ff46236518da3fdeed26a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-08-30 21:17:32 +02:00
Joerg Bornemann
c53f843001 Doc: Clarify QJsonDocument::toJson()
Mention that this method returns an indented document.

Change-Id: I0cadcc1c894c9a87910cfce389c6a5288238044d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-08-30 16:21:10 +02:00
Mårten Nordheim
e75c691d07 QArrayData: Don't allocate space we cannot use
When reallocating we assume we will grow more and increase the size to
the next power of 2. However, this might be a size where we end up with
space we cannot take advantage of. Such as having 4 bytes free at the
tail when we have 8 byte objects. The larger the objects are the greater
the chance is that we will end up in this situation, and it would have
a greater chance to leave big allocated chunks unused.

Change-Id: Ifea3d92763c1bafd489b66605c741447e5a57d5a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-08-30 14:33:06 +02:00
Volker Hilsheimer
64ed4081ca QSystemTrayIcon on macOS: support the timeout hint in showMessage
If set, schedule a call to remove the notification (NSTimeInterval is
specified in seconds). The system might hide the notification balloon
earlier, but the notification will still be removed from the message
center after the specified interval.

Task-number: QTBUG-77150
Change-Id: I510e412beb16e9de271290798f3e66310f44df4f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-08-30 14:17:32 +02:00
Volker Hilsheimer
c66732b979 QSystemTrayIcon: on macOS, hide messages when the user clicks them
This is default behavior on macOS, and also the behavior on Windows.

[ChangeLog][QtWidgets][QSystemTrayIcon] On macOS, clicking on the
message will remove the notification.

Change-Id: Ie30f7dacf478af76ccb53d16aea8f122869072c8
Fixes: QTBUG-77150
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-08-30 14:17:28 +02:00
Volker Hilsheimer
43a1db6855 Fix the documentation - QSystemTrayIcon::messageClicked works on macOS
Trivially reproduced by the systray example.

Task-number: QTBUG-77150
Change-Id: I888db728741c35e8b0378c38c8747ad163cad47d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-08-30 14:17:23 +02:00
Edward Welbourne
fc49d73c44 Fix spelling of primarily in QCalendar::isSolar()'s doc
It was missing a y.

Change-Id: I12dac02e451addff966f554811ca1999acadbb1b
Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
2019-08-30 13:57:20 +02:00
Volker Hilsheimer
ca3be92234 Remove QFileInfo::type and related enum from 5.14
The API is problematic for several reasons:
- the mixing of flags and enum in a single enum type
- the name "type" as somewhat overloaded
- the ease of misuse when comparing the result rather than testing
  for a bit being set

In light of this, focus for 5.14 on the new isShortcut and
isSymbolicLink functions, thus migitating the problematic
isSymLink which conflates the two concepts.

Change-Id: I57e02321edd5061f69a775f04a0932ef89adf866
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2019-08-30 13:20:07 +02:00