Commit Graph

39106 Commits

Author SHA1 Message Date
Christian Ehrlicher
a7123de6c9 QFontComboBox: fix layouting in RTL mode
QFontComboBox did not work very well in RTL mode. The text was not
aligned right and the icon was not painted on the right side as it is
done for a normal combobox.
Fix it by using QStyle::alignedRect() for the icon position calculation
and passing the correct alignment when drawing text.

Fixes: QTBUG-19722
Change-Id: I47c5864519e78e0833ef4c07a1385e45ce4479f8
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-02-12 17:12:44 +00:00
Christian Ehrlicher
afc7b26313 QtWidgets: mark QFileDialog functions as deprecated
Mark some long obsolete functions as deprecated so the can be removed
with Qt6:
 - QFileDialog::setConfirmOverwrite()/confirmOverwrite()
 - QFileDialog::setReadOnly()/isReadOnly()

Change-Id: I3cc1df76c8e40e95b8e9893ae06ef488fad26fb6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-02-12 17:12:41 +00:00
Friedemann Kleint
652075d1e0 Add missing \since to QList<T>::swapItemsAt()
Amends 7f4d0405b4.

Change-Id: I4de38428ea4a0e448e2930d19d94821884f7331e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-02-12 16:41:29 +00:00
Kai Koehne
568bc974d7 Remove eval mode
The evaluation mode of Qt hasn't been used since quite some time. Let's
just remove the remaining logic from the code base.

Change-Id: I61a2c432cbae78bf973f882848b3732e27431351
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-02-12 15:48:45 +00:00
Samuel Gaist
dd1a630871 QLineEdit: don't emit editingFinished if nothing was done
When a modal dialog is called from a slot connected to the
editingFinished signal, the chain of events resulting from the focus
returning to this widget will make the editingFinished signal emitted
again. This patch uses a new variable to keep track of the fact that
there was a modification. Once editingFinished was emitted, that flag
is cleared so next time the signal will be emitted again only if a
modification was made to the line edit content.

[ChangeLog][QtWidget][QLineEdit] Behavior change: now the
editingFinished signal is emitted only once after the line edit content
was edited.

Fixes: QTBUG-40
Change-Id: Ia4760bad8717f1758c3939132c446b4b4c6cd498
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-02-12 15:29:49 +00:00
Dominik Holland
df2b76046d eglfs: Add vsync support when using NVIDIA eglstreams
Similar to the kms backend a flip event handler can be retrieved using
the drmEvent API to implement vsync.
For this to work the acquire calls need to be done manuallly and the
automatic acquiring needs to be disabled.

Change-Id: I670d288ef68eb49846108db2a31993c6167d9313
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-02-12 15:10:28 +00:00
Tor Arne Vestbø
c4e9eabc30 Don't allow backingstore flush to non-raster surfaces
Change-Id: I8e85706727a8c5f7585e34e3864c8a9f48481b92
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-02-12 13:53:16 +00:00
Tor Arne Vestbø
1a36cf5ea1 Deduplicate QWidgetPrivate::invalidateBuffer
Now that MSVC (presumably) supports templates, we can merge the QRect
and QRegion versions of the functions into one.

The function has been renamed to invalidateBackingStore to better
reflect what it's doing.

Change-Id: I0e94a0cabd286cf97f2ba718a42ee0425f59d3ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-02-12 13:32:14 +00:00
Joerg Bornemann
aed1e2c49f Fix warning in tst_qopengl.cpp
This fixes warning: unused parameter ‘glFormat’

Change-Id: I4865300fb99ea5392b96f8e9f4f594f15f18625c
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-02-12 13:32:10 +00:00
Andy Shaw
a3c3330b6f Update SQLite to 3.27.1
[ChangeLog][Third-Party Code] Updated bundled SQLite to version 3.27.1.

Change-Id: I816a78bff07e5cde52fb7ff60b528924f22b1b80
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2019-02-12 13:24:35 +00:00
Jean-Michaël Celerier
cbbf7ddd3d Fix detection of libraries when linking against static builds with CMake
This patch is a follow-up to eda28621f6.
It adds a translation of the $$[QT_INSTALL_LIBS] variable into
a path that CMake understands.
Without this, CMake finds the system libraries if there are any
instead.
It also handles the case where the .prl file contains absolute paths to
libraries, as it happens for instance on Debian systems.

Task-number: QTBUG-38913
Change-Id: If68373efee22bc00172e8fead3e2c12ea440787f
Reviewed-by: Kyle Edwards <kyle.edwards@kitware.com>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
2019-02-12 13:09:38 +00:00
Nicolas Fella
2c60844bad [platform/android] Add native file dialog
Add basic native file open dialog on Android. Not all features of QFileDialog can be mapped to the
Android file dialog.

Most notably there is no "Save" dialog. The dialog returns a content:// URL. Patch 251038 adds
support for those to QFile.

Change-Id: I13d02103edcd9a089afcce8193432f24b2e0fe43
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-02-12 13:03:17 +00:00
Joerg Bornemann
37970d7b3e Fix determination of OpenGL include paths on macOS
Since include paths are fully resolved, we must remove the code that prepends
the SDK path to the OpenGL include paths.

Change-Id: I80d74629c7fc989a89c3f1d95d6de43b4c1de17a
Fixes: QTBUG-73736
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-02-12 12:58:44 +00:00
Michal Klocek
3fe9f245e8 Add platform native interface to offscreen plugin
Adds trival support for querying "display" and "glxconfig" in case
offscreen plugin is compiled with xlib support.

This is required so this plugin could work with webengine.

Taks-number: QTBUG-63346
Change-Id: Ie0f29385cb44429ddf383ad459e0c9f3263ccffe
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-02-12 12:57:26 +00:00
Qt Forward Merge Bot
d3b3be6865 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Iad53d4f21263718b8ecf15fd2d1170d24c7b675d
2019-02-12 13:53:22 +01:00
Tor Arne Vestbø
da55a1b041 Widgets: Only set WA_WState_ExplicitShowHide via public API
Calling QWindow::setVisible doesn't have the same semantics, so we
split off QWidget::setVisible into QWidgetPrivate::setVisible and
call that instead from QWidgetWindow.

Task-number QTBUG-67504

Change-Id: Ie50938d4a1d33ad4b59c742e75e3ca30f1b19399
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-02-12 12:11:24 +00:00
Mitch Curtis
7faec58d5c Fix crash when using Qt Virtual Keyboard with QCalendarWidget
For some reason, QCalendarWidget gets filtered press events that were
intended for Qt Virtual Keyboard's input panel (QQuickView), so we have
to make sure that the window is indeed a QWidget - no static_cast.

Change-Id: Ibc9dce956918ac50d1fed8231a445b7338aef09c
Fixes: QTBUG-72925
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-02-12 11:26:22 +00:00
Laszlo Agocs
2e12bfdc1e eglfs: avoid breaking builds without EGL_EXT_platform_base
Change-Id: I9183e17b42c00435f20c00a414e1f20aa3972351
Fixes: QTBUG-72559
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2019-02-12 10:50:52 +00:00
Eric Lemanissier
fd88c152db configure: use proper separator for mingw libraries
Change-Id: Ic328691fe2f08e918c1bb67910521d85b274a8fd
Fixes: QTBUG-73466
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-02-12 05:48:58 +00:00
Yuhang Zhao
3b87ecc06a Win32 makefile for qmake: Use proper linker
Use xilink for ICC and lld-link for Clang.

Change-Id: I13c74339ae9e3e5c97210afd20a53c7e474b873b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-02-11 23:27:57 +00:00
Edward Welbourne
f20adcde30 Dodge qFatal() so as to get coverage results despite it
The silent and blacklisted selftests of testlib end in a qFatal(), to
test its messaging is handled correctly.  However, this prevents hooks
in main() from saving coverage data when we're gathering that.  So use
a transient signal handler that longjmp()s back to a setjmp() just
before the qFatal() to let the test complete normally (but, since
qFatal() does something different on MS-Win, don't apply this to it).

Note that testlib's internal FatalSignalHandler handles all fatal
signals *except* SIGABRT, so this isn't over-riding it.  (In any case,
this restores the prior signal handler in setjmp()'s catch branch.)

Added missing expected_silent.tap test output while checking that this
change doesn't affect (the rest of) the test output.

Change-Id: I7e460581ad93e26639c066b3229438a66fd299de
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-02-11 15:38:29 +00:00
Albert Astals Cid
9332f8cb72 tst_qheaderview: Do not use the deprecated QAbstractItemModel::reset()
Still do a begin/end reset model in place, which is probably not the
best code but since it's a test and it works it should be enough

Change-Id: Iffaf8d69d5be64ef5e1e359e3d90a1e8174fc13b
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-02-11 13:25:57 +00:00
Tor Arne Vestbø
ece341e2f3 Allow more fine grained control over QFont debug output
With verbosity level 0, only the resolved properties are included
in the debug output, which is useful when debugging font resolving.

With verbosity level 1, the family, size, and weights are included,
plus any resolved property that is different from the default value.

Verbosity level 2, the QDebug default, has been kept unchanged,
except removing quotes and spaces by adding nospace() and qPrintable.

Verbosity level 3 includes all properties, regardless of whether or
not they have been resolved.

Levels 1 and 3 also include the resolve mask, to aid debugging.

This gives the following results for a QFont set to 100pt:

  QFont(100pt)
  QFont(".SF NS Text", 100pt, Weight::Normal, resolveMask=SizeResolved)
  QFont(.SF NS Text,100,-1,5,50,0,0,0,0,0)
  QFont(".SF NS Text", 100pt, StyleHint::AnyStyle, StyleStrategy::PreferDefault,
    Weight::Normal, StyleNormal, underline=false, overline=false, strikeOut=false,
    fixedPitch=false, AnyStretch, kerning=true, MixedCase, letterSpacing=0
    (PercentageSpacing), PreferDefaultHinting, styleName="", resolveMask=SizeResolved)

Change-Id: Ib4aebd7346ef4a2946cc4450c12730cf7844c3bc
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-02-11 13:14:07 +00:00
Timur Pocheptsov
e3f16e7a42 Convert tst_qabstractnetwork auto-test
to make it work with our new docker-based test server.

Change-Id: I76345a2d3d768b8a571f2c85e69f6a21e9a96d7e
Reviewed-by: Ryan Chu <ryan.chu@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-02-11 11:44:36 +00:00
Gerry Boland
8c73ddd8e3 qpa: remove mirclient
The Mir display server is now Wayland compatible, so a
dedicated Mir client library is no longer necessary.

[ChangeLog][Platform Specific Changes][Mir] The Mir platform plugin has been
removed: use the Wayland plugin when connecting to a Mir display server.

Change-Id: Ibc77698dd45a1afaf29f0d57b5e5cf7bd91735f5
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2019-02-11 10:40:28 +00:00
Tor Arne Vestbø
9f22ac0aa0 macOS: Don't send redundant geometry change events for top level windows
Top level windows already get their geometry changes via windowDidMove
and windowDidResize.

Change-Id: Ie6370aa290ef48c8b3ac770e77adb57ce43cbb47
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-02-11 01:42:04 +00:00
Tor Arne Vestbø
17e5158570 macOS: Treat default swapInterval (-1) as vsync-enabled display-link
Change-Id: I6d3d241d3813bfac36155ad219d4a338cb1ef6f7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-02-11 01:41:56 +00:00
Tor Arne Vestbø
21e25ff38b macOS: Simplify mouse tracking
We don't need to react to updateTrackingAreas, as we only have a
single tracking area that we can add once and forget. By asking
AppKit to track all events in the visible rect, we can also pass
a zero-rect for the tracking area.

Change-Id: I2545712adc49b51904d5adc11f1faca36901b49d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-02-11 01:41:51 +00:00
Tor Arne Vestbø
4697467e98 macOS: Explain QNSViewMouseMoveHelper for future generations
Change-Id: I61f38ee38d5afb657cd8b76b2b9dba1dac7167b4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-02-11 01:41:44 +00:00
Tor Arne Vestbø
6f9e444c28 harbuzzng: Remove assumption about Core Text working in 96 DPI
Core Text doesn't actually have a concept of DPI internally, as it
doesn't rasterize anything by itself, it just generates vector paths
that get passed along to Core Graphics.

In practice this means Core Text operates in the classical macOS
logical DPI of 72, with one typographic point corresponding to one
point in the Core Graphics coordinate system, which for a normal
bitmap context then corresponds to one pixel -- or two pixels for
a "retina" context with a 2x scale transform.

Scaling the font point sizes given to HarfBuzz to an assumed DPI
of 96 is problematic with this in mind, as fonts with optical
features such as 'trak' tables for tracking, or color glyphs,
will then base the metrics off of the wrong point size compared
to what the client asked for.

This in turn causes mismatches between the metrics of the shaped
text and the actual rasterization, which doesn't include the 72
to 96 DPI scaling.

If a 96 DPI is needed, such as on the Web, the scaling should be
done outside of HarfBuzz, allowing the client to keep the DPI of
the shaping in sync with the rasterization.

The recommended way to do that is by scaling the font point size,
not by applying a transform to the target Core Graphics context,
to let Core Text choose the right optical features of the target
point size, as described in WWDC 2015 session 804:

https://developer.apple.com/videos/play/wwdc2015/804/

GitHub-PR: https://github.com/harfbuzz/harfbuzz/pull/1484
Change-Id: I830f0cd7a82552422bbe09226e2d571e246fe3f4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-02-11 01:41:32 +00:00
Allan Sandfeld Jensen
e48b854087 Simplify freetype rendering
Switch to always using FT_Render_Glyph for all glyph types.

Change-Id: I9427bbffd30a8d1ca92d7ab9a92df8761f6b89c3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-02-10 22:09:21 +00:00
Samuli Piippo
7472415f3f tst_QMenu: skip part of menuSize_Scrolling test
Test fails on minimal and offscreen platforms.

Task-number: QTBUG-73522
Task-number: QTQAINFRA-2630
Change-Id: I6260454be35a8bbac1ab683d89fb7b262d3b69ab
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2019-02-09 13:48:16 +00:00
Lars Knoll
035d80407b Fix two smaller bugs in the BiDi engine
Remove wrong code changing the Bido level of line separators. This
lead to wrong ordering of the string in case the line separator was
meant to be ignored and the string should be rendered in one line. Line
breaks are anyways already reset to the paragraph level by the algorithm
and reordering is done on a line by line basis, so this will work
correctly when doing proper line breaking.

Secondly fix a small bug found while testing the above change, where
we wouldn't set the correct levels for boundary neutrals and explicit
embedding chars because we did that processing before we were fully
done with the BiDi algorithm.

Change-Id: Id88f91cd58d2ab29be864aef34ca1727c1586611
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-02-09 08:01:26 +00:00
Lars Knoll
79f2a9e666 Fix an assertion in the BiDi algorithm
The algorithm has been treating DirB inconsistently so far.
initScriptAnalysisAndIsolatePairs was treating it differently
than generateDireationalRuns leading to assertions.
It wasn't visible in our test data, as DirB is in almost all cases the
paragraph separator, where we split strings anyway.

Change-Id: I7dc0e7bbcf30ee84d8781ea06097da023e371f05
Fixes: QTBUG-73238
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-02-09 08:01:16 +00:00
Lars Knoll
4247d7c5a0 Fix QTextTable:insertRows() for tables with spanning cells
Don't resize the height of cells spanning several columns
multiple times.

Fixes: QTBUG-36713
Change-Id: I5eb45892f2008e6a4f85745b56efd04323e25673
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-02-09 08:01:08 +00:00
Allan Sandfeld Jensen
b179abc33b Remove old dead code
Nothing references this, not even commented out debug code, and some
functions doesn't even have implementations.

Change-Id: I344de26a650b1180f0da78eaece5bd5688fdcd95
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-02-08 22:09:47 +00:00
Olivier Goffart
484eec96f9 Add a couple of tests in QObject::tst_qobject
For destructors of functor connected to signals

Change-Id: I3f8b18fee7507f3cb72e36a2f9e6ef7f37dbeea1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-02-08 21:55:47 +00:00
Lars Knoll
aea500d5d7 Use QBasicMutex instead of QMutex in the signalSlockLock()
Add a simple private QBasicMutexLocker class, and let the
QOrderedMutexLocker operate on a QBasicMutex.

This allows the compiler to inline more things when handling
connections and speeds up activate() a bit more.

                       without change    with change
string based connect:  3621              3368
pointer based connect: 4341              3919
not connected:          433               437
disconnected:           551               538

Change-Id: If979337891178aaeb0b3340b6d4f68b6f86b0260
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2019-02-08 21:55:41 +00:00
Lars Knoll
0e534bf8b7 Replace the ConnectionData::inUse int with a proper refcount
The main difference is that QObject itself also holds on reference
on the structure.

Also rename the orphaned flag to objectDeleted for clarity.

Change-Id: Ief9b9ff9c8b9cc3630dcfd29806ed24cd07150e4
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2019-02-08 21:55:35 +00:00
Lars Knoll
5cc6f90910 Move all connection related data into one data structure
Adn create that data structure on demand on the heap.

This reduces the size of QObjectPrivate if there are no
connections. If we have connections, it'll use the same
amount of allocations and memory as before.

Change-Id: I900f6980a2cd8a5f72c3ad18697b5dd49100217d
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2019-02-08 21:55:29 +00:00
Lars Knoll
ab92b9e400 Simplify the code required for switching the current sender
Squeezes another percent of performance out of
QMetaObject::activate().

Change-Id: I620b8c578681280efcc9bec50cfb1020d2afc928
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2019-02-08 21:55:22 +00:00
Lars Knoll
a65752c71b Shave ~5% off from signal emission time
Refactor activate(), so that we eliminate almost all
checks for signal hooks in the common case.

Here are the benchmark numbers showing the improvement
for 100M signal emissions

                       without change    with change
string based connect:  3836              3693
pointer based connect: 4571              4510
not connected:          479               433
disconnected:           559               522

Change-Id: I394e6ea5d5bc96e298e8cc0c763eed78c8041876
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2019-02-08 21:55:16 +00:00
Lars Knoll
a5a859e721 Get rid of the connectedSignals bitflags
Measurements show that it's just almost as fast to simply query
the connectionlist directly and avoid both the memory
overhead of the bitfield and the associated bookkeeping.

For connected signals, the difference is not relevant at all.
With a signal that was never connected, removing the bitfield will
cause signal emission to be ~2.5% faster. And if you ever disconnect
from a signal, the bitfields might not be accurate and this can
cause a major slowdown.

Here are some numbers to validate this. All times are measured
in ms for 100M signal emissions:

                       without change    with change
string based connect:  3817              3836
pointer based connect: 4552              4571
not connected:          493               479
disconnected:          2113               559

Change-Id: Ia2c85036afaa7f991b883c8ff812f69cf4580f7e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: hjk <hjk@qt.io>
2019-02-08 21:55:10 +00:00
Lars Knoll
88a2a746b7 Always return early if no signal is connected
And simply emit the signal spy and tracing callbacks in
that code path as well.

Change-Id: I17f65055c7044caf1be58fac94bb7fe3487f3060
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2019-02-08 21:55:02 +00:00
Christian Ehrlicher
1b5a17632e Fix deprecation warnings in widget autotests
Fix all deprecation warnings within tests/auto/widgets

Change-Id: I854f54c0a1dc0a0086f626b93cd39f63cb1b6033
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-02-08 18:00:51 +00:00
Friedemann Kleint
4ce485a2eb Fix some QPainter-related deprecation warnings
text/qtextdocument.cpp:2666:48: warning: ‘QString QTextCharFormat::anchorName() const’ is deprecated: Use anchorNames() instead [-Wdeprecated-declarations]
text/qtextdocumentfragment.cpp:545:87: warning: ‘QString QTextCharFormat::anchorName() const’ is deprecated: Use anchorNames() instead [-Wdeprecated-declarations]
text/qtextdocumentfragment.cpp:546:68: warning: ‘QString QTextCharFormat::anchorName() const’ is deprecated: Use anchorNames() instead [-Wdeprecated-declarations]
painting/qpainterpath.cpp:3321:34: warning: ‘void QPainterPath::addRoundRect(const QRectF&, int, int)’ is deprecated: Use addRoundedRect(..., Qt::RelativeSize) instead [-Wdeprecated-declarations]
painting/qpainterpath.cpp:3342:48: warning: ‘void QPainterPath::addRoundRect(const QRectF&, int, int)’ is deprecated: Use addRoundedRect(..., Qt::RelativeSize) instead [-Wdeprecated-declarations]
painting/qpainterpath.cpp:3366:47: warning: ‘void QPainterPath::addRoundRect(const QRectF&, int)’ is deprecated: Use addRoundedRect(..., Qt::RelativeSize) instead [-Wdeprecated-declarations]
painting/qpainter.cpp:4233:49: warning: ‘void QPainter::drawRoundRect(const QRectF&, int, int)’ is deprecated: Use drawRoundedRect(..., Qt::RelativeSize) instead [-Wdeprecated-declarations]
painting/qpainter.cpp:8349:27: warning: ‘void QPainter::setMatrixEnabled(bool)’ is deprecated: Use setWorldMatrixEnabled() instead [-Wdeprecated-declarations]
painting/qpdf.cpp:1545:28: warning: ‘void QDataStream::unsetDevice()’ is deprecated: Use QDataStream::setDevice(nullptr) instead [-Wdeprecated-declarations]
widgets/qtabbar.cpp:2096:17: warning: ‘void QPainter::initFrom(const QPaintDevice*)’ is deprecated: Use begin(QPaintDevice*) instead [-Wdeprecated-declarations]

Change-Id: I76d98ea8146e7586d3763a5610781c7736d37204
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-02-08 16:41:54 +00:00
Mårten Nordheim
c41efe7373 Schannel: slightly optimize memory-usage for encryption
Change-Id: I0f4b372ad3a0cd5e6730ed2e23e738fb06b2aad5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-02-08 14:37:50 +00:00
Liang Qi
26ebdeff75 Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" into refs/staging/5.13 2019-02-08 14:27:19 +00:00
Edward Welbourne
c066656aff Avoid read-outside-array error by QStringRef over-reach
Constructing a QStringRef directly from the string, offset and a
length is UB if the offset + length exceeds the string's length.
Thanks to Robert Loehning and libFuzzer for finding this.
QString::midRef (as correctly used in both changed uses of QStringRef,
since 432d3b6962) takes care of that for us.  Changed one UB case and
a matching but correct case, for consistency.

In the process, deduplicate a QStringList look-up.
Added tests to exercise the code (but the one that exercises the
formerly UB case doesn't crash before the fix, so isn't very useful;
the invalid read is only outside the array it's scanning, not outside
allocated memory).

Change-Id: I7051bbbc0267dd7ec0a8f75eee2034d0b7eb75a2
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-02-08 13:56:25 +00:00
Morten Johan Sørvig
b611eb81c8 Fix QDeadlineTimer::Forever case in QWaitCondition
The timeout will never be larger than numeric_limits<quint64>::max(),
especially on platforms with 32-bit longs.

Instead, test if the timeout is exactly numeric_limits<unsigned long>::max(),
which matches the ULONG_MAX value which is documented
to indicate no timeout.

Change-Id: Ib663eddb5703797c50c04fd4eae60bd64f379d1c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-02-08 13:48:32 +00:00