Commit Graph

42578 Commits

Author SHA1 Message Date
Alexander Akulich
c08b0cec2f QLocalSocket: Deprecate 'error' signal, use 'errorOccurred' instead
[ChangeLog][Deprecation Notice] QLocalSocket::error() (the signal) is deprecated; superseded by errorOccurred()

Change-Id: I579c07564f5c470cf2867864755e0a26e6afce3b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-11 16:54:59 +03:00
Alexander Akulich
1c573ba47c QLocalSocket: Rename private errorOccurred method to setErrorAndEmit()
The method named like a signal and can lead to confusion especially
if such a signal will be added.

The new name taken from QAbstractSocketPrivate::setErrorAndEmit(),
though in QLocalSocket the method is NOT the only place of the error
set and the signal emission.

Change-Id: I7cdc487a39ec290203cced7359527f888342a0ad
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-11 16:54:50 +03:00
Alexander Akulich
c034f92fc2 Revert "QLocalSocket - deprecate ambiguous 'error' overloads"
This reverts commit 0de6c26ac1.

The patch fixes ambiguity between a getter and a signal by changing the
getter name, but we still have to rename the signal to follow the signals
naming convention.

Revert the commit to keep the getter as is and change the signal name instead.

Change-Id: I67dbb5cada25da473bdd02e71b1e2d9bd03f039e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-11 16:54:33 +03:00
Vitaly Fanaskov
11dc7b35c8 QComboBox: deprecate currentIndexChanged(const QString&)
Task-number: QTBUG-81845
Change-Id: Ia0ff5321423a5d3d4853bd425dd7236926f16047
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-02-11 10:37:10 +01:00
BogDan Vatra
dd04fb639b Set also ndk.dir
It's needed when ANDROID_NDK_HOME is not set

Fixes: QTBUG-81978
Change-Id: Id6108083ae62757ca839d652793d98a89e6cb6b5
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-02-11 11:16:42 +02:00
BogDan Vatra
59121d2980 Fix ANDROID_XXXX replace qmake function call
The second parameter of replace is a regex, therefore trying to replace strings like
"plugins/sensors/libplugins_sensors_qtsensors_android.so" will result to super strange
results.

Fixes: QTBUG-81974
Change-Id: I887e70f4fd8fa2af482a60f63af371f954b56ce1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-02-11 09:16:42 +00:00
Cristian Adam
4d798801e0 CMake Support: Fix dependent libraries search for MinGW and CMake 3.17
Fixes: QTBUG-81903
Change-Id: Ie2847e38c196c1f9d664b1a35339cca5ebf424cc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-10 22:36:32 +01:00
Andy Shaw
288d5d8a71 Android: Make sure that it can find qrc files created via the pro file
Since Android will place the created qrc files in their own architecture
then we need to make sure that we account for this when returning a list
of all the resources. This is so that when other files are created that
depend on this list, it is able to find them.

Fixes: QTBUG-81477
Change-Id: I4a083c1c5c3e0aec35649cf7f5419cf3c6a75eae
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-02-10 21:04:03 +00:00
Kai Koehne
e541a3f099 QTranslator: Expose language of translation file
This allows for instance to show the current UI language in the UI,
or to load additional translations that match the .qm file by other
means.

This is especially useful in the case of QTranslator::load(QLocale(),
...), in which case different language and country combinations might
be tried.

Another option is to inspect the file name via QTranslator::filePath();
however, this is more error-prone, and might also miss information
(if the .qm file name doesn't have a country suffix, or no suffix at
all).

Change-Id: I6f565d53d8f50e21241ccae6c4de264747ac8f81
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-10 15:14:55 +00:00
Kai Koehne
dce61f0450 QTranslator: Expose origin file of the translation
Task-number: QTBUG-36608
Change-Id: I8ef0968404370b8fc25dc8b4c1e2c9e4484ae55c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-10 15:14:48 +00:00
Joerg Bornemann
5b59b2ea15 Doc: Document the ltcg CONFIG value
Fixes: QTBUG-81035
Change-Id: I41bff3aef3ac0ce7c117ab2245491dceb6f2685b
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-02-10 15:09:20 +01:00
Assam Boudjelthia
a84c895b17 Android: Fix native fileDialog not waiting for user selection
Add an event loop to wait for user file selection in native fileDialog

Task-number: QTBUG-77214
Change-Id: I3d97d6c3f46cf2a8ed0ee6f98e555e8d62e12cc3
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-02-10 16:09:20 +02:00
Marc Mutz
b1089787d1 QMimeData: Extract Method QMimeDataPrivate::find()
Centralize the search for the QMimeDataStruct with a given format in
find() (overloaded on const and non-const, but implemented only once),
and use it in the three other functions that performed lookup before.

In setData(), optimize the case where data is overwritten.

Use a std::vector to not have to think about hidden detaches when
implementing the const find() in terms of the non-const one.

Change-Id: I874e5c6ef9c97d98b42f29faccbc3043e8c6a855
Reviewed-by: David Faure <david.faure@kdab.com>
2020-02-10 14:09:12 +00:00
Tor Arne Vestbø
4777c6d76b testlib: Improve error message when detecting line count mismatch
Change-Id: I0e19b4c0dd7aa77063e02e6aac7e345dd7c8a5f5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-10 15:06:14 +01:00
Tor Arne Vestbø
93b8cdc974 testlib: Make testlogs enumerable and printable
Change-Id: Id0ac30fe0a63757ef722634e6dd90806015467aa
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-10 15:06:06 +01:00
Dmitriy Purgin
9557715016 std::chrono overload added to QStateMachine::postDelayedEvent()
Some Qt classes already accept std::chrono durations in their methods
(see, for example, QTimer). The proposed change adds an overload
with std::chrono::milliseconds to QStateMachine::postDelayedEvent().

Change-Id: I360fd2bb54fedc7415e9ec17e096095be3604d41
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
2020-02-10 15:04:39 +01:00
Jan Arve Sæther
f415c5ad23 Remove unused variable
Change-Id: I774b1647eff5fcfa0de5bcc50ca2638644b03613
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-02-10 15:04:39 +01:00
Laszlo Agocs
71e9c2f036 rhi: vulkan: Fix descriptor update with more objects involved
Once the number of buffers or images exceeds the QVarLengthArray limit,
it moves over to heap-based allocation, and then reallocated to grow as
needed. Problem is, if we keep references to the elements, those may get
invalidated on every grow. This was not an issue until the element count
reached the preallocated (stack) count.

So instead, store indices and fill in the pointers in the VkWriteDescriptorSet
only before issuing vkUpdateDescriptorSets().

Change-Id: I99f26f5e14cb28107edb1db86a21afa135858589
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2020-02-10 10:40:02 +01:00
Thiago Macieira
23d42a6a30 QStorageInfo/Linux: resolve non-existent devices via /dev/block
On systems with very simple boot sequences, the kernel will create a
device called /dev/root and use that to mount the root filesystem.
However, that doesn't actually exist in /dev and could cause
confusion. So we try to resolve using /dev/block if the /dev entry does
not exist but udev is in use (udevd has the string "/dev/%s/%u:%u").

[ChangeLog][QtCore][QStorageInfo] Improved discovery of device nodes on
Linux if the /dev entry was renamed after the filesystem was mounted and
udev is in use.

Fixes: QTBUG-81464
Change-Id: If79a52e476594446baccfffd15eec573ae3deb0d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-02-09 22:19:20 -08:00
Marc Mutz
6b9a1824a4 Extend tst_qstringapisymmetry for member compare()
There were a few surprises:

- QByteArray::compare() are missing noexcept (will add)
- ibid., called with non-ascii content and CaseInsensitive fails
  (this was discussed on the ML, with tentative agreement that
  it's a feature, not a bug; waiting for QUtf8String(View) for a
  fix, then).
- As was the case when we did this exercise with the relational
  operators, QString(Ref)/QChar is not noexcept (will fix)

These have been QEXPECT_FAIL'ed.

Not much of the cartesian product is implemented at all, yet.  These
have been #ifdef'ed with NOT_YET_IMPLEMENTED to see what's still
missing.

Change-Id: I7d9b21e292b98f980aacdc6248e88188f7472ba2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-02-09 17:43:20 +00:00
Timur Pocheptsov
1a54165756 QMacStyle: fix NSBox geometry for Aqua theme
Apparently vertical shift and increased height were not enough, more
adjustment needed horizontally also: the default NSBox draws itself
smaller in both dimensions and shifted from the origin we wanted.
Thus we trick it to think it's drawing a bigger thing. It will
draw a smaller one (again), but closer to what we need.

Fixes: QTBUG-72365
Change-Id: Ib3a4c0b3eafb9f2f9d3b24bcbdd8335e73053622
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-02-08 05:58:38 +01:00
Qt Forward Merge Bot
9634055543 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I5d80d84d1fd9f52e7c8e4895cc34d4d29043f400
2020-02-08 01:00:08 +01:00
Mårten Nordheim
2c189ac79b QMultiMap: fix QDoc warning
The iterator is a QMultiMap iterator, not QMap, so the QDoc would
complain.

Change-Id: I1e3d2b454e21049d676387945e1e860e50854de8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-02-07 18:13:54 +01:00
Volker Hilsheimer
e79979ba40 On Windows 7, fall back to SHFileOperation to avoid confirmation dialogs
Moving a file to the trash should preferably done via IFileOperation.
However, the implementation on Windows 7 ignores the operation flags
that request the shell not to show any confirmation dialogs or other UI
elements.

SHFileOperation is an old API that doesn't show any UI, but has the
limitation that it doesn't report the location of the file in the trash
after the move. So an application cannot restore the file, but the user
can do so via Explorer.

Overall, the better compromise is to not have dialogs at the expense of
not being able to report the new path. This allows us to run the unit
test on Windows 7 as well.

Change-Id: Ib8e651a69e2c6750f668b52d2a70925d156cc8ae
Fixes: QTBUG-81927
Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
2020-02-07 12:21:13 +01:00
Volker Hilsheimer
5c520f4b0a Discover the conditions under which registerTimer is flaky, and skip
On macOS, the registerTimer test case fails frequently, and blocks
valid integrations. With this change we try to detect the condition
and skip the test.

Change-Id: Id2065f606abfd431971becf63034a4c1f0fdb9e5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-02-07 04:51:16 +01:00
Wang Chuan
75285b64ad QComboBox: send font change event to popup menu when font changed
The font change in QComboBox might cause incorrect appearance of popup
menu since it doesn't notify popup menu to relayout itself

Fixes the issue by send font change event to the item view of popup
menu when received a font change event in QComboBox

Fixes: QTBUG-75846
Change-Id: I4821015cca95a7e233a22262596a6fbf27f10aef
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-02-07 09:18:47 +08:00
Tor Arne Vestbø
8237e39f5d testlib: Move subtest argument handling to individual tests
The test orchestrator shouldn't have to deal with the individual options
needed for each test.

Change-Id: I78bbf4850cc649e625bd08a7aedf02267ba1314d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-02-06 23:43:05 +01:00
Tor Arne Vestbø
dbdb3cbc90 Reduce scope of testlib selftest regular expressions
Change-Id: I2fd7a39684bde44d82c4d877086f606413d68520
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-06 23:43:04 +01:00
Tor Arne Vestbø
a2832c577f Remove tst prefix for testlib selftests
These tests are apparently not run at the moment, otherwise they would
have failed to even start, but they should definitely not have the tst
prefix.

Change-Id: Iafcec2764ebb3570e6bc6ebfba27d92a94639893
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-06 23:43:02 +01:00
Tor Arne Vestbø
1a58e78db0 testlib: Be more selective in choosing to show stacktraces on macOS
The built in crash reporter on macOS will by default not show the
dialog if the application is not one that will run in the foreground.

Change-Id: I0020520ae2f14a0e2f84fdca1d80ec6fe1247ffd
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-02-06 23:42:55 +01:00
Christian Ehrlicher
f9cd8fef5e QPushButton: fix text truncating when icon+text+menu is drawn
When a QPushButton has an icon, text and menu, the text is truncated. In
RTL mode the menu indicator is also drawn on the wrong side.

Fixes: QTBUG-81784
Change-Id: I27ecb67d12c68ac939540f0f836b2e2875706b4b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-02-06 18:00:26 +01:00
Volker Hilsheimer
ef7773e566 Doc: QPersistentModelIndex cannot be stored in a QStandardItem
As discussed in the bug report, making sure that the reference counts
are correct in such scenarios adds substantial complexity to the code,
only to support a bad use-case for which QStandardItemModel was not
designed.

Change-Id: I663b490ed3471875386add17e7eadb7d8df50489
Fixes: QTBUG-78142
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-02-06 16:46:21 +00:00
Andy Shaw
eb45c37be7 sqlite: Update to v3.31.1
Since the patches applied previously are no longer required, we have
removed those too.

[ChangeLog][QtSQL][sqlite] Updated to v3.31.1

Change-Id: Ia80c31683a8cf92cfd114b6da32460ddcf38d502
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-02-06 17:46:21 +01:00
Friedemann Kleint
e9efd96e62 uic/Python: Add imports for Q(Date)Time, QKeySequence
Those types are used as properties of Q(Date)TimeEdit,
QKeySequenceEdit.

Fixes: PYSIDE-1215
Change-Id: I8b9ffebb8229fff447aa7dd6bee6e037d708333c
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-02-06 17:46:21 +01:00
Laszlo Agocs
19510abbff rhi: Add depth bias and slope scaled depth bias
Beware of the API terminology: GL 'factor' = 'slope scaled depth bias',
GL 'units' = '(constant) depth bias'.

Task-number: QTBUG-81843
Change-Id: I03e3618d007cbf7100add0de4950a6163d788cc7
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-02-06 13:06:34 +01:00
Laszlo Agocs
7e82d49cc5 rhi: d3d: Make DepthClipEnable set to true
...which is the natural default, and matches other backends.

Task-number: QTBUG-81852
Change-Id: I6d0788b18eb7601661ef646e650114a503a12215
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-02-06 13:06:28 +01:00
Laszlo Agocs
1d77945094 rhi: metal: Make sure the resources are sorted based on the native bindings
...before generating batches for the encoder's set* methods. Otherwise there
is a chance we end up in an assertion in case the native binding number for
a buffer/texture/sampler happens to be smaller than the native binding of the
previous. (we pre-sort based on the SPIR-V binding but that is not what the
Metal API works with in the end)

Task-number: QTBUG-81822
Change-Id: Iddfed168e065e3c7f6a09ad6dd4efdafa891b339
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-02-06 13:06:23 +01:00
Edward Welbourne
26f6aa3e50 Configure the MS-Win long time format rather than assuming we know it
In tst_QLocale::windowsDefaultLocale(), we configure the long and
short date formats and the short time format eccentrically, then
verify that QLocale::system() does actually get these eccentric
formats. However, we did not configure the long time format (whose
MS-API name doesn't match that of the other formats), so had to rely
on a guess at the system locale's format. That, however, is not
robust; so now configure the long time format, too.

Removed a duplicated test, at the same time.

Fixes: QTBUG-36306
Change-Id: I04dc22c7eb1b58af55412b598873868f79e9c74f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-02-06 12:56:58 +01:00
Volker Hilsheimer
d75d22f785 Docs: tag newly added QFile and QFileInfo APIs as \since 5.15
Change-Id: I7d8605221a28cd05b4ebdbf20adf00ec3e121b58
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-02-06 12:21:25 +01:00
Qt Forward Merge Bot
d37f58e75b Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2020-02-06 11:38:18 +01:00
Qt Forward Merge Bot
8ce0ad805d Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/network/ssl/qsslsocket_openssl_symbols.cpp

Change-Id: I8c13b5c48a8ecce96540b39c6d5f8ca146eb2339
2020-02-06 11:10:34 +01:00
Jan Arve Sæther
8c6c4df3e8 Maintain at least 500ms timestamp distance between each test function
If we had one test function that just did

tst_Mouse::f1()
{
    QTest::mouseMove(w, QPoint(0,0));
}

and another test function that did

tst_Mouse::f2()
{
    QTest::mouseMove(w, QPoint(500,500));
}

their corresponding event timestamps were only 1 apart from each other.
This meant that any code that tried to estimate the velocity of a mouse
cursor would get a really high velocity estimate inside f2(). This would
come as a surprise to most people. So to avoid this, we add a 500 ms
timestamp delay between each test function call.

In theory this could also prevent generating a mouseDoubleClickEvent
when a pair of test functions containing a press-release sequence was
run, but there is a separate pre-existing mechanism to handle that case.

Change-Id: Icd4fc35853c09f080466d22411208c7b5c4174b5
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-02-06 09:31:47 +01:00
Assam Boudjelthia
6d6ca70538 Android: Allow requesting qtvirtualkeyboard with QT_IM_MODULE
Allow Android apps to request qtvirtualkeyboard using environment
variable QT_IM_MODULE.

Similar to commit b46fe39d94 for Windows
platform.

Task-number: QTBUG-80357
Change-Id: I584859729e60f5d73943ca5840a9dcd169cc9ecb
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-02-06 09:48:31 +02:00
Sze Howe Koh
c3050b6d96 Rename Qt::ReturnByValue_t -> Qt::ReturnByValueConstant
Copy the convention of QDeadlineTimer::ForeverConstant

Task-number: QTBUG-48701
Change-Id: Ic7760b7ffec630f1cd47361f5adda3f17fffb9f6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-02-06 07:37:15 +08:00
Volker Hilsheimer
74a2467edd Add QFile::moveToTrash, which moves a file to the trash
Due to the nature of QFile just operating on a file path, this also
works for paths that are actually directories.

The test covers files from different locations on which this
operation should typically succeed, but tries to handle the case
where trashing files will fail because of the file system
structure.

On Windows 7, running the test will open a confirmation dialog as
the implementation of IFileOperation doesn't respect the various
flags. This might depend on the specific Windows 7 patch level,
and the option to always use SHFileOperation on that platform needs
to be evaluated further.

[ChangeLog][QtCore][QFile] Introduce QFile::moveToTrash to allow
applications to move files to the trash.

Change-Id: I45019040c25b30f7db293b6933c63aca2f319514
Fixes: QTBUG-47703
Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
2020-02-05 20:21:45 +01:00
Morten Johan Sørvig
d29aaf598a tst_qnetworkreply: Print proxy warning to stderr instead of stdout
This way we produce valid xml also for the no-proxy case.

Change-Id: I5a277255d22c3814fe463c0cd013c04ddc6ad919
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-02-05 15:01:10 +00:00
Assam Boudjelthia
6839d297b3 Android: Fix native open fileDialog crash on Android
Unregister the ActivityResultListener() after the result is handled.

Fixes: QTBUG-78912
Change-Id: Ia2b45eca002e854492c409c70a3876fa8ce98de1
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-02-05 13:19:15 +02:00
Morten Johan Sørvig
7dd6d32657 wasm: Specify event targets by CSS selectors; Support emsdk >= 1.39.5
DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR is now on by default, which
means that functions like emscripten_set_keydown_callback() now expects
CSS selectors (e.g. "#canvas_id" instead of "canvas_id").

In addition, Module.canvas is no more. Add a deprecation warning in case
someone is setting it and expects Qt to use it. (qtloader.js sets
qtCanvasElements instead).

This bumps the minimum supported emsdk version to 1.39.5.

Fixes: QTBUG-74601
Change-Id: I8c46ce170143f969e6281824f78b1bb809c267ab
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2020-02-05 11:48:04 +01:00
BogDan Vatra
0947cf66e5 Fix AndroidAbstractFileEngine
"" it's the root folder of the assets, setting m_fileName = "" will make
AndroidAbstractFileEngine::setFileName to fail and it will not set the
proper flags.

Fixes: QTBUG-81535
Change-Id: I0653f83b55ee790c8edf188889ccb30ef54584c0
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-02-05 12:41:34 +02:00
VaL Doroshchuk
9ecc595d71 widgets: Don't create winId when the widget is being destroyed
When QWidget is being destroyed, its winId is cleared, and
a QEvent::WinIdChange is sent. If a listener of this event
reacted by calling winId() again, we might crash.

A crash can be observed when this child widget is destroyed in dtor of its parent.
E.g. here is a hierarchy of widgets:
1:QWidget
 2:QObject
 3:QWidget
  4:QWidget

If a listener subscribed for WinIdChange events from (4),
and there is a connection to destroy (4) when (2) is destroyed.

This will lead to infinite loop:

1. QWidget::~QWidget
2. QWidget::destroy
3. QWidgetPrivate::setWinId(0)
4. QCoreApplication::sendEvent(q, QEvent::WinIdChange);
5. eventFilter
6. QWidget::winId
7. QWidgetPrivate::createWinId (this=0x555555957600) at kernel/qwidget.cpp:2380
8. QWidgetPrivate::createWinId (this=0x55555596b040) at kernel/qwidget.cpp:2387
9. QWidget::create (this=0x5555558f2010, window=0, initializeWindow=true, destroyOldWindow=true) at kernel/qwidget.cpp:1163
10. QWidgetPrivate::createWinId (this=0x55555596b040) at kernel/qwidget.cpp:2387
11. QWidget::create (this=0x5555558f2010, window=0, initializeWindow=true, destroyOldWindow=true) at kernel/qwidget.cpp:1163
12. QWidgetPrivate::createWinId (this=0x55555596b040) at kernel/qwidget.cpp:2387

Fixes: QTBUG-81849
Change-Id: Ib4c33ac97d9a79c701431ae107bddfb22720ba0d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-02-05 11:05:24 +01:00