Commit Graph

40980 Commits

Author SHA1 Message Date
Timur Pocheptsov
4300dccba5 Fix a broken build
QHttp2Configuration is using entities (read definitions) from http2,
which is only conditionally included in the *.pri file (requires http).
So as a result we had linker errors.

Fixes: QTBUG-77759
Change-Id: I8b33b0a4802a295f67edad03da3743b24f7ce514
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-08-22 11:21:34 +02:00
Joerg Bornemann
9db230efa9 Fix "conflicting targets" warning when generating VS projects
The VS project generator never calls the Win32MakefileGenerator code
that sets up DEST_TARGET which is used for checking for conflicting
DESTDIR/TARGET combinations on Windows. Replicate the setup in
VcprojGenerator::initProject().

This amends commit e75aed1a.

Change-Id: I4238eb2f57615095c372cee9ada9fc961cc36133
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-08-22 11:21:31 +02:00
Mårten Nordheim
6a2112c28c Remove use of QByteDataBuffer in QNetworkReplyHttpImpl
It's temporarily storing QByteArrays before we copy them directly to
QIODevice's internal buffer. We can save the extra work by just push
them directly into the buffer.

The signal compression is no longer useful performance-wise, but is
kept as it will throttle the amount of readyRead emissions the users has
to handle.

Reorder some of the operations as a result to make it more natural.

Change-Id: Ifc0481d56fec42545e95970125d883a5c68d647a
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-08-22 11:21:28 +02:00
Volker Hilsheimer
d97009a9f1 Remove obsolete API after qtdeclarative migrated
This is a follow-up to commit b7d073e990,
which refactored memory allocation of QMetaCallEvent.

Change-Id: I363256c80ee941b545e6f9c659c65556fff5c907
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-08-22 11:21:24 +02:00
Christian Ehrlicher
62015adadd QFont: remove unused member QFontPrivate::screen
QFontPrivate::screen was not used anywhere so remove it.

Change-Id: Ie9381d08b59b93c4e7bcaad58ebf1b389aa0a2e6
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-08-22 11:21:21 +02:00
Ulf Hermann
c8c724a3ce Cbor: Add overloads for QStringView
Change-Id: I8d22d0741c4d3852b438b12099f81ed87244871d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-08-22 11:21:17 +02:00
Tor Arne Vestbø
a8cc4cea92 widgets: Merge QWidgetRepaintManager::begin/endPaint into callsite
Change-Id: Iff5f78dcc8124bcecf53d42d920e74467937412a
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-08-22 09:44:53 +02:00
Tor Arne Vestbø
a0484b8277 widgets: Rename QWidgetRepaintManager::doSync to paintAndFlush
Change-Id: Ie41bb76d33d59f70eb418f845defc212396d3915
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-08-22 09:44:42 +02:00
Tor Arne Vestbø
68cc2c2779 widgets: Don't rely on QWidget friending QWidgetRepaintManager
Change-Id: Id9fc28eb62103d38eaa51261f61a2294db85e0d6
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-08-22 09:44:20 +02:00
Tor Arne Vestbø
c937f80fe5 widgets: Simplify QWidgetRepaintManager::qt_flush
No longer static, so we can access the members directly instead of
passing them as arguments. Renamed to flush() while we're at it.
Otherwise no changes to the code, just moved the function.

Change-Id: Id491a8628c8cecf7cf3b33d3458e7427f5bcd22e
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-08-22 09:44:08 +02:00
Tor Arne Vestbø
44fc2914be Goodbye showYellowThing
The code hasn't been working for at least 5 years, and is just making
the repaint manager more complex. We can always re-introduce the feature
at a later point.

Change-Id: Ib07c782c821f3e653f9452f6fbfe2f87effccc92
Fixes: QTBUG-36435
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-08-22 09:43:48 +02:00
Friedemann Kleint
b455a863a1 Add screen() accessor to QWidget
Base it on QWidgetPrivate::associatedScreen(), but make a larger
effort to find a screen in case the widget is not shown yet.

Rename QDesktopScreenWidget::screen() to something else to avoid
clashes.

Task-number: QTBUG-62094
Task-number: QTBUG-53022
Change-Id: I36ba5ef5f0645a4ac89da0b38a391f7057b2f49c
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-08-21 22:18:52 +02:00
Soroush Rabiei
e71bf9d5c7 Add support for the Jalali (Solar Hijri or Persian) calendar
This has its own locale data, extracted from CLDR.

[ChangeLog][QtCore][QCalendar] Added support for the Jalali (Persian
or Solar Hijri) calendar, controlled by feature jalalicalendar.

Fixes: QTBUG-58404
Change-Id: Id5c56a10db05a4fd612aafc01615273db81ec743
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-08-21 22:18:48 +02:00
Soroush Rabiei
3e771a8b09 Add support for Julian and Milankovic calendars
These share their locale data with the Gregorian calendar, making them
virtually free to add. Still leave them out of the boot-strap build,
though.

[ChangeLog][QtCore][QCalendar] Added support for Julian and Milankovic
calendars. These are enabled by default, except in bootstrap builds.

Change-Id: I585045ed9e78c1e959957f6772b3e144093b701c
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-08-21 22:18:45 +02:00
Alexandru Croitor
6743b174c0 CMake: Fix invalid setting of QT_PLUGIN_TYPES on interface libraries
It is forbidden to set upper case named properties on CMake
interface libraries which do not start with the "INTERFACE_"
prefix. Rename QT_PLUGIN_TYPES to INTERFACE_QT_PLUGIN_TYPES.

There does not seem to be any usage of the property, so it's just for
informational purposes, so it's a one line change.

Fixes: QTBUG-77754
Change-Id: I3621f2b6188c3c72c4c2446f93ba1e078b755f72
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-08-21 22:18:42 +02:00
Friedemann Kleint
764f488c96 QTextDocumentFragment: Fix deprecation warning
Fix
text/qtextdocumentfragment.cpp: In member function 'bool QTextHtmlImporter::appendNodeText()':
text/qtextdocumentfragment.cpp:613:125: warning: 'constexpr QChar::QChar(char)' is deprecated: Use fromUtf8, QStringLiteral, or QLatin1String [-Wdeprecated-declarations]

Change-Id: I90b23fa949e5cd979f2955b523060c8b1752f893
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-08-21 09:50:10 +02:00
Timur Pocheptsov
4c6e549b25 QHttp2Configuration: remove setters/getter for indexing
Upon reading the Apple's documentation it would appear the indexing
is more complicated (they name the specific fields and which kind
of indexing must be applied to each). This requires a finer level
of configuration/control and probably a separate class (aka
QHpackConfiguration? ;). We'll provide it in future, if requested
by our users.

Fixes: QTBUG-77412
Change-Id: I6e9461b3966ed59c8b70873eab999a07a04eb289
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-08-21 06:21:58 +02:00
Timur Pocheptsov
fb462102b7 QHttp2Configuration - respect the value returned by huffmanCompressionEnabled()
And either compress or not.

Task-number: QTBUG-77412
Change-Id: I3b09385d2b3caf4f7de0455ad6e22c0f068c33a9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-08-21 06:21:33 +02:00
Thiago Macieira
1b9274573e forkfd: move the FreeBSD system implementation to a separate file
Simplifies the code a bit and will be helpful when I add the Linux
equivalent.

Change-Id: Iec9c051acd73484c8d94fffd15b99879dc269db9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-08-20 16:57:02 -07:00
Thiago Macieira
8784ab7ba8 forkfd: Add C11 and C++11 atomic support
For forkfd, this is extremely useful, since users can rely on proper
atomic API, not the old GCC API or the internal API that backs the C11 /
C++11 implementation itself.

This also caught one more mistaken use of seq_cst.

Change-Id: Iec9c051acd73484c8d94fffd15b9985fe545e8b5
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2019-08-20 16:56:55 -07:00
Thiago Macieira
5e74d0e80c forkfd: fix compilation in C mode without precompiled headers
Missing one "struct" and one #include <sys/wait.h> for
struct rusage.

Change-Id: Iec9c051acd73484c8d94fffd15b9a1274703afca
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-08-20 23:56:50 +00:00
Tor Arne Vestbø
ce73b4db62 Remove dead code from Qt 4 times
The benefit of keeping this code around was to inspire or inform
changes in the areas to take into account possibly missing features
in Qt 5, but at this point that benefit is questionable. We can
always use the history to learn about missing pieces if needed.

Change-Id: I87a02dc451e9027be9b97554427bf8a1c6b2c025
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-08-20 22:27:46 +00:00
Allan Sandfeld Jensen
2cddaf0071 Fix tst_bench_qimagereader
It couldn't find the test images if not build in sources.

Change-Id: Ieeb5a76694a37d05b3e9a4ed0154885040b0812f
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-08-20 22:47:09 +02:00
Tor Arne Vestbø
4dab6184f5 widgets: Remove stale documentation of QWidgetRepaintManager::flush
Change-Id: I5c4df4a8694bc56014beaec34a81219d91332fec
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-08-20 21:09:15 +02:00
Tor Arne Vestbø
5085f8e211 widgets: Remove unused arguments from QWidgetRepaintManager::beginPaint
Change-Id: I3720d8ef31e623e514fc2e382192d3c4f99fb4ed
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-08-20 21:09:04 +02:00
Tor Arne Vestbø
e2a1fb9015 widgets: Remove unused function qt_dirtyRegion
Change-Id: I7e6dbc4fb777a2323d65b73164d8645d6efc95a4
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2019-08-20 21:08:48 +02:00
Tor Arne Vestbø
38e55a26a4 widgets: Remove dead members from BeginPaintInfo
The flags haven't been used since 2011 (6ce6b8a37) and is dead code.

Change-Id: Ic5c47b30326ff70534bbf1aa37b25bae666b6b96
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-08-20 21:08:32 +02:00
Joerg Bornemann
1d89748772 Fix .sln generation for sub-projects with same TARGET
Sub-projects in VS solutions must have unique project names. If there
are multiple projects with the same TARGET then QMAKE_PROJECT_NAME must
be set to different values.

The .sln generation code did not use QMAKE_PROJECT_NAME and produced
.sln files with equally named sub-projects.

Replace the 'orig_target' member of VcsolutionDepend with a
'projectName' member and use it when writing the .sln file and for the
misnamed "GUID map" that's supposed to have unique keys.

This commit amends 9e750d34 (qt/qt.git).

Fixes: QTBUG-77639
Change-Id: I81c64f8bc6baeb6d99e9d5808fb73dfd7aaaeeb8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-08-20 20:28:18 +02:00
Joerg Bornemann
3b5f9678d7 Remove dead QMakeSourceFileInfo caching feature from QMake
Since its introduction in commit
65bb1a25419210e6097cad973fb847aa3719c09b (old internal history, 2005)
with the commit message "optimizations I've been sitting on here"
we're dragging along this dead code. It is time for removal.

Change-Id: Ic7902ebb8c402734974ad6651a1371d1e5bf93c5
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-08-20 20:27:52 +02:00
Morten Johan Sørvig
d46415c0af wasm: Add saveFileContent()
Saves a file by file download, where the user can choose
the file name and location using a file dialog.

Change-Id: I4d2ecc76fc33bb65fdf3d7ca3fcd9566c62547dd
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-08-20 19:34:53 +02:00
Sona Kurazyan
9f082b4e03 Clean up the docs of qevent.cpp
- Build the docs for deprecated APIs conditionally, based on
  deprecation version.

- Remove the docs of methods deprecated since 5.0.0, these methods
  are not compiled anymore.

Change-Id: I2c1b038ce125ca737944f4fc4a28e2f6852eaded
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-08-20 19:34:08 +02:00
Marc Mutz
f556505f63 QWidget: replace manual memory management with unique_ptr [6/N]: extra
Had to port a lot of caching temporaries, too. Decided to leave them as
crefs to unique_ptr to catch any mischief users may be doing with the
raw pointer instead (like deleting it).

Also fixed a use of 0 as nullptr (by standardizing on pointer-to-bool
conversion, as is done everywhere else in qwidget.cpp), and made one
impregnable if condition readable.

Change-Id: Ifdc240bf352c52de0bc3c186fa7a5f4cb2882dd0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-08-20 17:36:04 +02:00
Allan Sandfeld Jensen
9e86fdb6e8 Support writing color space profile in JPEG
That way the image formats with color space supports all have both read
and write support.

Change-Id: Ib52ebd56192c4a8a0897a6afc7c4a26020319270
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-08-20 17:10:19 +02:00
Sona Kurazyan
aa6e0e3e30 Remove the usage of deprecated APIs from QSysInfo
Replaced:
 QSysInfo::macVersion() -> QOperatingSystemVersion::current()
 Q_MV_OSX(10, 13) -> QOperatingSystemVersion::MacOSHighSierra

Task-number: QTBUG-76491
Change-Id: Iae4f9c319ff16314fb04bbefaa48935a0f618007
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-08-20 15:09:11 +00:00
Soroush Rabiei
aa8393c94f Add support for calendars beside Gregorian
Add QCalendarBackend as a base class for calendar implementations and
QCalendar as a facade via which to access it.

QDate's implicit implementation of the Gregorian calendar becomes
QGregorianCalendar and QDate methods now support choice of calendar.

Convert QLocale's CLDR data for month names to a locale-data component
of each supported calendar and relevant QLocale methods now support
choice of calendar. Adapt Python scripts for locale data generation to
extract month name data from CLDR (keeping on version v35.1) into the
new calendar-locale files. The locale data for the Gregorian calendar
is held in a Roman calendar base, for sharing with other calendars.

Add tests for basic uses of the new API.

[ChangeLog][QtCore][QCalendar] Added QCalendar to support diverse
calendars, supported by implementing QCalendarBackend.

[ChangeLog][QtCore][QDate] Allow choice of calendar in various
operations, with Gregorian remaining the default.

Done-with: Lars Knoll <lars.knoll@qt.io>
Done-with: Edward Welbourne <edward.welbourne@qt.io>
Fixes: QTBUG-17110
Fixes: QTBUG-950
Change-Id: I9d6278f394269a183aee8156e990cec4d5198ab8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-08-20 13:41:21 +02:00
Tor Arne Vestbø
8f083bade0 Remove dead macOS specific code from QWidgetPaintManager
Change-Id: I8fdde17d32f20407aed44e4708f30db21555b81a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-08-20 11:34:44 +02:00
Tor Arne Vestbø
380dd8cde9 Widgets: Simplify discardSyncRequest
Change-Id: I3bc66a0f958fed44eac5fee6642ef1b00d45a2c4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-08-20 11:34:20 +02:00
Tor Arne Vestbø
14fc3f4b0d Upgrade QWidgetPrivate::DrawWidgetFlag to QFlags
Allows for easier debugging of the paint cycle.

Change-Id: Iab85bccb99198a02f33c0beeccd4e3914375358d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-08-20 11:34:04 +02:00
Tor Arne Vestbø
6d9d4e6817 Rename QWidgetBackingStore to QWidgetRepaintManager
Quoting a blog from 2009, "this class is responsible for figuring out which parts
of the window surface needs to be updated prior to showing it to screen, so it's
really a repaint manager."

https://blog.qt.io/blog/2009/12/16/qt-graphics-and-performance-an-overview/

What better time to do the rename than 10 years later!

Change-Id: Ibf3c3bc8c7df64ac03d72e1f71d296b62d832fee
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-08-20 11:33:47 +02:00
Tasuku Suzuki
5248e895ad Fix build without features.mimetype
Change-Id: I9d3c20845b9ddecbafd6dfd756c5d17ae0c6b5fc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-08-20 17:23:01 +09:00
Timur Pocheptsov
8052755fd7 Add means to configure HTTP/2 protocol handler
Similar to TLS configuration that we can use on QNetworkRequest,
we can configure different options in our HTTP/2 handling by
providing QNetworkAccessManager with h2 configuration. Previously,
it was only possible internally in our auto-test - a hack with
QObject's properties and a private class. Now it's time to provide
a public API for this.

[ChangeLog][QtNetwork][QNetworkRequest] Add an ability to configure HTTP/2 protocol

Change-Id: I80266a74f6dcdfabb7fc05ed1dce17897bcda886
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-08-20 07:19:43 +02:00
Volker Hilsheimer
dcdfb6908d Remove workaround for compilers not supporting thread_local
With C++11, all compilers support thread_local, which replaces the non-
standardized __thread attribute as a storage class.

The storage class was specifically introduced so that applications do
not have to deal with pthread APIs for TLS key management. We still
need to have some of that logic for adopting foreign threads, but we
can rely on thread_local so that we get a fast implementation of
QThread::currentThread() on all platforms.

Change-Id: Iba2b35d014044c4ab317a0e127c5d1f1fa4ecd4a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-08-20 00:32:31 +02:00
Tor Arne Vestbø
f4db381169 Get rid of QWidgetBackingStoreTracker
It was added for Symbian almost 10 years ago (d7057e7c1f1a), for a somewhat
dubious use-case. The Symbian code is since long gone (ae30d7141), so the
remaining pieces are just adding complexity to the already intricate workings
of the QtWidgets backingstore/painting logic.

Task-number: QTBUG-8697
Change-Id: I82af610a8ac26719c588ac63f06b4501f59b400d
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
(cherry picked from commit 2e0b0be2ce)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-08-19 23:20:27 +02:00
Nils Jeisecke
d8a9bec35f QTextDocument: add css-styling of table cell borders to HTML import/export
Supported style attributes:

<table>
style: supports "border-collapse: collapse" and "border-color".
border: width of the outer border
bordercolor: basic color for all borders

<tr>
style: not supported

<td>/</th>
style: supports the "border", "border-[top|left|bottom|right]]"
       shorthand styles and the "border-width", "border-color"
       and "border-style" (and the top/left/bottom/right variants)
       attributes

<table border=1 style="border-collapse: collapse"> will render
a simple 1px table grid.

Notes:

The QTextDocument table model is much simpler than the HTML table model.
It basically only has <table> and <td> support. So the HTML parser is
forced to map markup and styling to the QTextDocument model which
is not without loss.

In other words: While QTextDocument -> HTML -> QTextDocument should
preserve the QTextDocument structure, HTML -> QTextDocument -> HTML
does not preserve the HTML DOM at all.

So for now the HTML importer and writer only support border styles on
the <td> and <th> nodes. In future updates, the HTML parser might be
enhanced to map <tr> and <table> CSS styles to the cells.

Change-Id: If9e7312fa6cbf270cf8f7b3c72ba1fa094107517
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-08-19 20:59:12 +02:00
Tasuku Suzuki
8240c24866 Fix build without feature.codecs
Change-Id: I7113928c686319f132e6306f6925da009e8f41b1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-08-20 02:44:10 +09:00
Christian Ehrlicher
427995a518 Itemmodel tests: remove foreach usage
Replace foreach with range-based for loop, replace some int values with
the correct Qt flag enum as drive-by.

Change-Id: I41c52f6ae6c537fa9ad4f9e169485533936952d1
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-08-19 19:10:06 +02:00
Daniel Smith
f5c118b6b8 Fix escaping of additional app parameters in adb shell command
Change-Id: I80e5b98efbc9654c684b3d78ba0d6688c21bd0f3
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-08-19 18:22:57 +02:00
Daniel Smith
662fec6f0d Update for failures only on dev branch. Use general platform names
This patch was generated with tooling from patchset 31 of
https://codereview.qt-project.org/c/qt/qtqa/+/267034 in interactive
mode. General platform names were chosen if greater than 60% of the
currently active platforms of a given type in COIN recently failed.

Change-Id: Ia4bde7f0ec422bbb727dc9d7151295159094f146
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-08-19 18:22:11 +02:00
Tor Arne Vestbø
2e0b0be2ce Get rid of QWidgetBackingStoreTracker
It was added for Symbian almost 10 years ago (d7057e7c1f1a), for a somewhat
dubious use-case. The Symbian code is since long gone (ae30d7141), so the
remaining pieces are just adding complexity to the already intricate workings
of the QtWidgets backingstore/painting logic.

Task-number: QTBUG-8697
Change-Id: I82af610a8ac26719c588ac63f06b4501f59b400d
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-08-19 14:40:29 +02:00
Mårten Nordheim
e9eddfd856 Fix rare double-free in QObject machinery
As exposed by tst_QObjectRace::destroyRace we would sometimes end up
with a double-free when destroying a QSlotObject in multi-threaded
scenarios. One free would be done in ~QObject as the receiver was being
destroyed while the other free was done when deleting a QMetaCallEvent
object after we realized it was not needed because the receiver was
destroyed.

Since we can be in a separate thread from the receiver we should lock
before referencing the connection object.

Amends b7d073e990.

Change-Id: Icb53862dc880ae9a4e5581a1a9ee693573f7d9c7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-08-19 07:27:45 +00:00