Commit Graph

41930 Commits

Author SHA1 Message Date
Liang Qi
90210d5d9c Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	tests/auto/network/kernel/qnetworkinterface/BLACKLIST

Change-Id: I1e8866c63b54bcd95fc2a044276ee15b7f60e79a
2019-12-10 13:51:40 +02:00
Christian Ehrlicher
5231c26a82 tst_QSqlQuery: fix some tests
Fix some tests in tst_QSqlQuery:
 - make sure to use QSql::HighPrecision in tst_QSqlQuery::precision()
   (needed for psql)
 - remove outdated stuff for mysql 3.x
 - psql_bindWithDoubleColonCastOperator: the placeholder are stored as
   named placeholders in psql
 - avoid some useless old-style casts

Change-Id: I54d29a7e24f17d853cce6baa09a67d9278098810
Reviewed-by: Robert Szefner <robertsz27@interia.pl>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-12-10 06:27:09 +01:00
Andre de la Rocha
b209270825 Windows QPA: Export "checkable" info for menu items through UI Automation
In order to allow screen readers to say checked/unchecked for checkable
menu items, this information has to be provided through UI Automation.
Checkable menu items should implement the "Toggle" UI Automation pattern.
The "checkable" state must also be supported by QAccessibleMenuItem, which
is being added by a separated change.

Task-number: QTBUG-80551
Change-Id: I661668310d1b6b4701d0c0efdb1dcfd15d0db729
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-12-10 05:46:45 +01:00
Andre de la Rocha
e40e82ede1 Add "checkable" state to accessible menu item
The information about whether a menu item may be checked is necessary
to allow the platform code (in particular, Windows UI Automation layer)
to make this information available to screen readers.

Task-number: QTBUG-80551
Change-Id: Ibfcc4f2da1ebc68e7dc5df2cd46bbfc0a177da12
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-12-10 05:45:51 +01:00
Volker Hilsheimer
c69a2448ab macOS: support copying lazily provided data to the clipboard
Using always EagerRequest type forces the application to provide the
data at copy or drag-begin time, even though the data might never be
requested (pasted or dropped into another application). For data that
is expensive to generate, this is wasteful, and on other platforms Qt
uses the functionality provided by the native clipboard to allow for
on-demand retrieval of data.

Changing the request type to LazyRequest for the cocoa clipboard works,
but then we need to make sure that we resolve all promises at shutdown
time so that the data is available (which is what the end user expects).
Commit ad0d2f463a disabled this for
lazy requests to prevent crashes when using drag'n'drop, where the
QMacPasteboard object is short-lived and stack allocated. We definitely
don't need to worry about lazy data that is not yet retrieved at the
end of a drag'n'drop operation, so limit the fix from the previous
commit to the drag'n'drop scenario.

[ChangeLog][QtGui][QClipboard] Support lazily provided copying of data
to the clipboard on macOS

Change-Id: Id2203999024a0d9d854d6933d39077cc4af925d0
Fixes: QTBUG-76263
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-12-10 05:24:11 +01:00
Lorn Potter
c978de990b wasm: set focus on canvas on new screen
This allows user to utilize the application without having to click on
it first to cause the focus-in event.

Change-Id: Ibc9582254dda91eb14ebcdf4b8ea4a4f862aa88d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-12-10 13:46:03 +10:00
Lorn Potter
73fada6d70 wasm: Fix clamp mode
Clamp mode was being obliterated by not appending to EMCC_COMMON_LFLAGS
This fixes crashes of integer overflow

Change-Id: Icae757a7189de25db5ed41df6d41d86304c39830
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-12-10 09:57:21 +10:00
Tor Arne Vestbø
c3bd5ffdc8 Don't wrap feature detection macros with QT_HAS_FOO() variants
Using wrappers for these macros is problematic when for example passing the
-frewrite-includes flag to preprocess sources before shipping off to distcc
or Icecream. It will also start producing warnings when compilers implement
http://eel.is/c++draft/cpp.cond#7.sentence-2. See for example
https://reviews.llvm.org/D49091

Both https://clang.llvm.org/docs/LanguageExtensions.html and the SD-6 document at
https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations
recommend defining '__has_foo(x) 0' as a fallback for compilers without the
macros, so that's what we go for.

Change-Id: I0298cd3b4a6ff6618821e34642a5ddd6728be767
Reviewed-by: Alex Richardson <arichardson.kde@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-12-10 00:48:07 +01:00
Eirik Aavitsland
191ac31598 Modernize shapedclock example
Relying on the hard clipping of QRegion widget masks to create
non-rectangular windows is a solution from a bygone era. The result
looks horrible with today's eyes, particularly on a high-dpi
screen. Update the example to create smooth anti-aliased edges using
translucent window bacground.

Task-number: QTBUG-64229
Change-Id: I8859d61177d2a2dc446632c23f27f42050e0d7c7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-12-10 00:38:40 +01:00
Eirik Aavitsland
03dc30acca Fix QPushButton style sheet style for overlay (content) image
Unlike comparable widgets like QLabel or QFrame, QPushButton would not
render a content image specified in the stylesheet, unless a border
style was also specified. Fix by explicitly rendering the content
image, if set, in the native-border codepath also.

Although the doc warns about the QPushButton border style having to be
set in order for the background styling to take effect (since the
native border painting otherwise hides it), the previous behavior does
seem unexpected.

Fixes: QTBUG-72029
Change-Id: I8b979b010515dab4dcf2f00344a187c87eeec096
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-12-10 00:38:39 +01:00
Edward Welbourne
f16bd40189 Convert some uses of QStringRef to QStringView
There remain QStringRef uses where QString::splitRef() is used.
Requires converting some .count()s to .size()s, as QStringView lacks count();
and some .toInt()s need to be handled by QLocale::c().

Change-Id: If9a49e063d217671ea9335a82e4bf977b7b48be0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-12-09 19:48:07 +01:00
Edward Welbourne
8310981b80 Prefer QDate::startOfDay() over QDateTime(const QDate &)
The latter can be invalid if midnight is skipped by a spring-forward.

Change-Id: Ibf98d165557229f19622774ebf9a27bb0911c7a7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-12-09 19:47:55 +01:00
Christian Ehrlicher
c27123d743 QAbstractItemView: add a note about ToolTipRole in dataChanged()
Qt::ToolTipRole is not honored by dataChanged() which may be a little
bit surprising. Therefore add a small note about this behavior.

Fixes: QTBUG-78726
Change-Id: Ic4361f55e55ab59d5bae2fdb98907a62055604c5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-12-09 18:49:53 +01:00
Christian Ehrlicher
46d21a3b34 QPushButton: fix icon + text layouting in RTL mode
The fusion style did not properly handle the text layouting for a
QPushButton in RTL mode. Also the menu indicator was not adjusted in
this case.
Fix it by calling the base class implementation as QCommonStyle does it
mostly right. Since Fusion does not handle State_On or State_Sunken but
QCommonStyle does, explicitly mask them out.

Fixes: QTBUG-80083
Change-Id: Ide7bf997b4f4a5b61fcb8ea4a1a152122daef1e2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-12-09 18:47:46 +01:00
Christian Ehrlicher
9608e996a2 QAIV::sizeHintForIndex: return correct size when no delegate is set
QAIV::sizeHintForIndex checks if a delegate is set for this view but
does not check if there are row/column delegates which may be
appropriate for this task.
Fix it by retrieving the correct delegate directly with
delegateForIndex().

Change-Id: I264359b12e1983aab3a917db7dbcab11253a448f
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-12-09 18:46:19 +01:00
Joerg Bornemann
485e4a8f0b WebAssembly: Do not use sed directly for wasm_shell.html deployment
Use $$QMAKE_STREAM_EDITOR, instead, which will on Windows expand
to "qmake -install sed" (triggering qmake's own sed implementation)
and otherwise expand to "sed".

Change-Id: I57da5fb3a4f6e5a09ae25c947caa0a10d279b480
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-12-09 17:49:19 +01:00
Volker Hilsheimer
baed8534bc Move the tooltip out of the way of very large mouse cursors
Users that have large mouse pointers configured in their settings
can not see tooltips, as they are obscured by the pointer.
Native applications on Windows and macOS have the same problem,
which includes the tooltips for the minimize/maximize/close controls
in the window frame of e.g. Explorer.

Introduce QPlatformCursor::size that returns a value that is based
on the user's settings, or a default value. We can then use that
value to move the tooltip out of the way.

On Windows, the calculation of the cursor size is based on
experimenting with the settings, which are in logical independent
pixels. The placement of the tooltip attempts to keep existing
behavior, and to not end up with a tooltip that's very far away
from the tip of the arrow even for very large mouse cursors.

[ChangeLog][QtWidgets][QToolTip] Make sure that the tooltip
is not obscured by very large mouse pointers on Windows and macOS.

Change-Id: I8e13b7a166bfe8b59cef4765c950f90fefeaef9d
Fixes: QTBUG-79627
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-12-09 17:43:22 +01:00
Alexander Volkov
5272c35073 Doc: Clarify ownership of added menu for QMenuBar::addMenu(QMenu *)
Change-Id: Iaafba9557ece36607c86d5be4fbb5e4ac2e459d3
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-12-09 19:43:22 +03:00
Alexander Volkov
8339ce2155 Avoid crash in menu that was previously shown as submenu
Reset sloppyState for the previous submenu, so that if it
will be shown as a menu, it will not use an incorrect pointer.

Fixes: QTBUG-80528
Change-Id: If2ba8c3a664983ee76eb90d2c9a8096e2bd0a4e6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-12-09 19:43:22 +03:00
Tor Arne Vestbø
009abcd7b6 QWidget: React to platform surface being created or destroyed
The platform window may create or destroy its surface from other entry
points than the QWidget API, in which case QWidget needs to sync up
its own state to match. In particular WA_WState_Created and the winId
needs to be recomputed.

Fixes: QTBUG-69289
Fixes: QTBUG-77350
Change-Id: I769e58ead3c2efcf8c451c363108848feade9388
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-12-09 17:43:22 +01:00
James McDonnell
e0a43e348c Register the screen pulse event
Future versions of QNX will, by default, require the use of registered
events. Currently, event registration is supported but optional.

Change-Id: Ie45484d5ca9fa832a28ccf08cb1764cf24262dcc
Reviewed-by: Dan Cape <dcape@qnx.com>
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
2019-12-09 11:43:22 -05:00
Laszlo Agocs
7be4bbcbc5 rhi: metal: Do not fail pipeline creation upon compiler warnings
Change-Id: I39384de56d74cf9f1d345a5d395cc07030c6a2ab
Fixes: QTBUG-80629
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-12-09 17:43:22 +01:00
Allan Sandfeld Jensen
4d391514b0 Fix crash on debug output of null QColorSpace
Change-Id: I7d1d20d7dc2c5ac10dbe8d0a0b4111e8198bfabf
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-12-09 10:32:29 +01:00
Christian Ehrlicher
10f39c908d PSQL: set correct empty QVariant in QPSQLResult::record()
Since the QSqlField used to retrieve the data is reused in the loop, the
default empty value of the QSqlField is not set for all except the first
field since it was implicitly set by QSqlField::setType() only when the
value is invalid. Therefore we have to call QSqlField::setValue()
directly.

Change-Id: I1d3abe4e3c46f6378f9ff25529a79bbe33bb7b74
Reviewed-by: Robert Szefner <robertsz27@interia.pl>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-12-09 06:32:39 +01:00
Thiago Macieira
c4b0ff4855 tst_QNetworkInterface: don't force an IPv4 link-local address
Windows apparently has special code to deal with those addresses. If all
your network interfaces are up and have acquired addresses, then the
link-local network at 169.254.0.0/16 is unreachable. I had never caught
this because both my Windows VM and my bare metal Windows have inactive
interfaces (like the Bluetooth PAN one) and, when inactive, Windows
assigns a link-local address. But in the CI, the interface(s) were all
up and running, causing this issue.

Unix systems don't treat IPv4 link-local any differently, so they always
worked, so long as any interface was up and there had to be one to reach
the network test server.

This commit reworks the test to add test addresses based on the
addresses found on up & running interfaces (see tst_qudpsocket.cpp). For
IPv4, we flip the bits in the local portion of the address. For IPv6, we
add a node with an address I generated randomly (non-universal), with
the same scope.

Fixes: QTBUG-65667
Change-Id: I568dea4813b448fe9ba6fffd15dd9f482db34991
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-12-07 10:20:27 -08:00
Olivier Goffart
4c3c63d4cb QMetaType: add more static-less API
In prevision to Qt6 which is going to discourrage the use of the integer id,
add some missing API to the staticless QMetaType API:

 - Add a way to construct a QMetaType from a type without calling qMetaTypeId:
   QMetaType::fromType<T>()
 - Add equality operators
 - Add a QMetaType::name() function
 - Add a default constructor (by adding a default parameter to the existing ctor)

Change-Id: I95487c1c31bdf0d773717daa9d5452cbced30673
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-12-07 10:32:29 +01:00
Sona Kurazyan
29adc0eed9 Fix updating the text cursor position after editing
In some cases when editing the text (for example when removing the
selected text, or pasting a text block) the text cursor position is
updated, but its visual x position is not updated. This causes the next
cursor movements to start from a wrong position.

Force the update for those cases.

Fixes: QTBUG-78479
Change-Id: Ia496be62beec58660f5e1695e5aafae09c79684e
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-12-06 15:52:35 +01:00
Edward Welbourne
ca7033935a Tell the truth about QDateTimeEdit's range-of-values properties
There were factual errors.
Important details were omitted.
The \sa blocks were haphazard and cluttered.

Change-Id: I76ceb00830c36699c48529b64808844faf09391e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-12-06 14:47:58 +01:00
Edward Welbourne
6b5f848ebd Allow lower-case for the T and Z in ISO 8601 date format
Cite RFC 3339 as basis for allowing a space in place of the T, too.
The RFC mentions that ISO 8601 accepts t and z for T and Z, so test
for them case-insensitively. Add a test for this.

Change-Id: Iba700c8d74d485df154d27300aab7b1958e1ccef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-12-06 14:47:27 +01:00
Edward Welbourne
653c1aab18 Fix handling of trailing space at the end of an ISO date-time
If milliseconds were followed by a space, the space was included in
the count of "digits" read as the fractional part; since we read (up
to) four digits (so that we round correctly if extras are given), a
harmless apce could cause scaling down by too large a power of ten.

Since QString::toInt() ignores leading space, we were also allowing
interior space at the start of the milliseconds, which we should not,
so catch that at the same time.  Added tests, including one for the
rounding that's the reason for reading the extra digit, when present.

Fixes: QTBUG-80445
Change-Id: I606b29a94818a101f45c8b59a0f5d1f78893d78f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-12-06 14:46:48 +01:00
Edward Welbourne
187f442823 QTimeZonePrivate: remove some Q_LIKELY markers
Although the relevant conditions are indeed likely, we don't want to
push the less likely branch into hard-to-load pages; they're not
anomalous conditions, merely ones with lower probability.

Change-Id: Icc12a921d38d8c398cd832964e9d57d7648698b2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-12-06 14:46:30 +01:00
Edward Welbourne
49063c34d6 Fix crash when a date-time has an invalid time-zone
QDateTime is a friend of QTimeZone, so can access its internals; but
it must check the zone is valid before doing so.

Expanded tst_QDateTime::invalid() and made it data-driven to catch the
failure cases.

Commented on a test-case that caught a mistake in my first attempt at
this, and on QDateTimeParser's surprising reliance on a quirk of
QDateTime::toMSecsSinceEpoch()'s behavior.

Fixes: QTBUG-80146
Change-Id: I24856e19ff9bf402152d17d71f83be84e366faad
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2019-12-06 14:44:18 +01:00
Volker Hilsheimer
da94625f38 Fix sizeHint of QProgressDialog to have enough space for window margins
Some styles, notably QMacStyle, use different margins for widgets and
for windows. For these margins to be returned correctly, we have to
tell the style that we want them for a toplevel widget. This was
done correctly when laying out the dialog, but not when calculating the
sizeHint, leading to a default size of the dialog that was too small
to fit the text.

As a drive-by, change variable names in the sizeHint method to be a
bit more readable.

Change-Id: Ib4168c7be176fa816241ebcc5f9235db4a7f982f
Fixes: QTBUG-80272
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 13bbb1d9b9411e6eb65848efa8c0d481109b8868)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-12-06 12:14:19 +01:00
Allan Sandfeld Jensen
ece0c0a5e7 Tidy nullptr usage
Move away from using 0 as pointer literal.

Done using clang-tidy. This is not complete as
run-clang-tidy can't handle all of qtbase in one go.

Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-12-06 12:13:20 +01:00
Leena Miettinen
5da34ac263 Doc: Update info about building tests
Task-number: QTBUG-63987
Change-Id: I4b6e8f35afc9d3ca10b393a0305bbb51bf81ec26
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-12-06 09:00:28 +01:00
Eirik Aavitsland
20266820a3 Item views: do not clip items horizontally in dragging icon
The dragging icon is created from the visible items in the
selection. It would be clipped to the parts visible in the
viewport. That meant that items on the edge could be rendered
illegible, even though they were part of what was being dragged.

Fix by dropping the horizontal clipping to the viewport. Items fully
outside the viewport are already filtered away, so this should at most
make a difference to the bottom and/or top items in the set.

Keep the vertical clipping, since items may easily be very wide, so an
unclipped icon would be unwieldy.

Done-With: Sona Kurazyan <sona.kurazyan@qt.io>
Fixes: QTBUG-77336
Change-Id: I2d29cb0ca69c1058635106aa0c67e9f7e140d1cd
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-12-06 08:25:17 +01:00
Giuseppe D'Angelo
b19220d17f QByteArray: add a strict mode to fromBase64
QByteArray::fromBase64 was liberal in its input, simply skipping
over invalid characters. As a side-effect of this, it had
no error reporting, meaning it could not be used to convert
fromBase64 _and_ validate the input in one go.

Add more option flags to make fromBase64 strictly validate
its input. Since we want to know whether it has succeeded
or not, and the existing fromBase64 overloads do not
allow for that, introduce a new function that returns
an optional-like datatype.

While at it: base64 decoding can be done in-place; add an
rvalue overload to enable this use case.

[ChangeLog][QtCore][QByteArray] Added the new fromBase64Encoding
function.

[ChangeLog][QtCore][QByteArray] Added new flags to make
fromBase64 / fromBase64Encoding strictly validate their input,
instead of skipping over invalid characters.

Change-Id: I99cd5f2230f3d62970b28b4cb102913301da6ccd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-12-05 21:04:50 +01:00
Friedemann Kleint
843be88e29 Manual High DPI test: Add a page logging all screen change signals to Metrics
Turn the Metrics widget into a QTabWidget and add a tab logging
all changed signals of QScreen.
This is useful when for example debugging issues with lock screens and
laptop hibernation.

Task-number: QTBUG-79248
Task-number: QTBUG-76902
Change-Id: Ie86789fe1514cb3333a5f3def7f613f217fa6802
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-12-05 18:37:00 +01:00
Sona Kurazyan
81459dd9c0 Copy formatting attributes when cloning an empty QTextDocument
When cloning a QTextDocument, the text fragment of the original document
is copied into the new one, which results into copying also the
formatting attributes. However, when the text document is empty, the
corresponding text fragment is also empty, so nothing is copied.

If we want to transfer the formatting attributes for an empty document,
we need to set them explicitly.

Fixes: QTBUG-80399
Change-Id: I382cd0821723436120af47c06ec7bfa849636307
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-12-05 17:34:02 +01:00
Thiago Macieira
1f592da7f1 QCborValue: fix replacing of elements with byte data with ones without
We forgot to reset the flags when replacing the element, so we ended up
with an integer with HasByteData after:

    testMap[0] = QStringLiteral("value");
    testMap[0] = 42;

Fixes: QTBUG-80342
Change-Id: Ia2aa807ffa8a4c798425fffd15dabfa066ea84b0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-12-05 07:59:07 -08:00
Friedemann Kleint
455e9e5be3 Windows QPA: Fix tray geometry not updating
The application does not update its screens when there are
no windows on which a WM_DPICHANGE could be received. Add a
check for it to the tray window procedure and trigger an
update from there if no top levels are present.

Fixes: QTBUG-79248
Change-Id: I0b1c4db560662ecf2b473304942da373be6fdc73
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-12-05 15:49:32 +01:00
Dimitrios Apostolou
75f75e997a docker-compose now brings up the docker images tagged as "latest"
This is so that we can do simple changes to the docker images
in provisioning, without needing to update the tag here.

If a backwards-incompatible change in the docker images needs to be committed
in provisioning and here, it is possible because the images retain their old
unique SHA1 tag, in addition to being tagged as latest. See comment for more
details.

Requires the change in qt5 repository, with commit sha:
e4f9ac5607a329bae045567a339d36469bc4fff6

Task-number: QTBUG-79867
Change-Id: I1bc72edec62487530575d7e113a25afe16d09129
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-12-05 15:40:00 +01:00
Tor Arne Vestbø
aabf4fbbe9 macOS: Improve QCocoaGLContext logging
Change-Id: I27d0abe0eb5b0f0ba64b8787b430484c48b131c0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-12-05 14:28:34 +01:00
Tor Arne Vestbø
35da2b87e3 macOS: Enable fullscreen for windows by default
This matches the default collection behavior of NSWindows.

Change-Id: I363ed211daf6c6c2e579eb11c7294ff509d53e91
Fixes: QTBUG-63829
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-12-05 14:28:22 +01:00
Allan Sandfeld Jensen
c7fec68e19 Do not read Xft.dpi on platforms that shouldn't be using Xft settings
We only read this for desktop environments that have traditionally used
these to set settings for other toolkits.

Fixes: QTBUG-80323
Change-Id: Ifa8c2682301e69c2770d3734115080a0e6b4e85c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-12-05 14:08:09 +01:00
David Faure
aa504fc2fa Optimize qLastIndexOf<QString> to not detach the QString
The call to data() on a non-const QString led to a detach(), which is
unexpected and unwanted from QString::lastIndexOf() const.

Found by looking at why QFileSystemEntry::fileName() was expensive, in
the hotspot profiler.

The solution is to instanciate QLastIndexOf with QStringView() rather
than QString(). I added a deleted QString overload to make sure nobody
ever instanciates it with a QString argument again.

Change-Id: I06a1b2f937425e83f0779eb215e099aef78c50a7
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-12-05 14:06:02 +01:00
Christian Ehrlicher
97ac281c1d QStyleSheetStyle: properly honor checkmark size when drawing a QMenu
When drawing a QMenu which is checkable but does not have an icon
somewhere, the width of the (possible) checkmark was not considered
during drawing and the text was drawn over the checkmark. Also the wrong
state was checked for drawing the checked icon (if one was given).

Fixes: QTBUG-80506
Task-number: QTBUG-78238
Change-Id: Icf8aa37aab424564054d3549defee93eb0d7c1a4
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-12-05 13:56:09 +01:00
Christian Ehrlicher
925b33bdaa QPlainTextEdit: update internal palette on QEvent::EnabledChange
QEvent::EnabledChange did not update the palette of the internal
QPlainTextEditControl which lead to a wrong text color when the
QPlainTextEdit was disabled e.g. due to a QGroupBox.
Fix it the same way it is done in QTextEdit - set the new palette also
to the internal control when QEvent::EnabledChange is received.

Fixes: QTBUG-80150
Change-Id: Icbeddf3d6cd4877a3d8d4a06b2da69383dd776d2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-12-05 13:56:03 +01:00
Alessandro Portale
83df5c71e6 Fix qmake's sed functionality for input containing CR+LF newlines
QTextStream, reading a file with CR+LF newlines from an stdio FILE
handle that was opened without "b", will always return false in atEnd().

Changing the open mode from "r" to "rb" works around the issue.

Task-number: QTBUG-80443
Change-Id: Ib2eafc0c4c6a6d2bcaeea3036474549d2d9e1511
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-12-05 13:34:18 +01:00
Laurent Montel
ccef2c33b2 Fix compile with we use QT_DISABLE_DEPRECATED_BEFORE=0x060000 in apps
in qt5.15 you deprecated iterator &operator--() in qhash
but QDataStream needs it. (see writeAssociativeContainer)

So when we compile without deprecated method we can see:
qdatastream.h:333:9: error: no match for ‘operator--’ (operand type is ‘QHash<QString, QImage>::const_iterator’)
  333 |         --it;
      |         ^~~~

The current code is only

QHash<QString, QImage> m_images;
QDataStream stream(&file);
stream << m_images;

Change-Id: I12e61c0c60615455ac1eeff02969f155edb12e56
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-12-05 11:57:50 +01:00