Go to file
Thiago Macieira 2ec089bbc8 Add a non-implicit copy constructor to QEvent
Copying events is a bad idea but it is permitted, used at least in the
state machine framework and QApplication, which somehow found it
amusing to clone events. We can't forbid it because it would be
source-incompatible with Qt 4, and other ill-advised developer may be
doing this.

In the new copy functions and in the destructor, ensure that the d
pointer is null. We can't copy it if it isn't. The exception is for
DeferredDelete events, which use the d pointer to store the loop level
count. Such value must not be deleted.

In the future, if QEvent::d is used at the QEvent level, make sure to
adapt QCoreApplication::postEvent to store the counter somewhere else.

Task-number: QTBUG-25070
Change-Id: I1f2d3f3cfc891ec216df2e8b7dbe531524d21b26
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-05-16 07:00:31 +02:00
bin Fix qpa legacy headers installation 2012-05-09 06:42:25 +02:00
config.tests configure: Remove the -dwarf2 argument for Mac OS X builds 2012-05-11 12:52:21 +02:00
dist Remove const char *-based connectNotify() API 2012-05-15 04:57:37 +02:00
doc Doc: Add a default license footer. 2012-05-11 17:39:13 +02:00
examples Merge "Merge branch 'docs-refactoring' into master" into refs/staging/master 2012-05-10 11:34:25 +02:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs Use IF(NOT TARGET ...) before creating imported targets. 2012-05-15 23:03:23 +02:00
qmake Port away from QString::{to,from}Ascii in qmake 2012-05-14 17:33:04 +02:00
src Add a non-implicit copy constructor to QEvent 2012-05-16 07:00:31 +02:00
tests Limit the nesting depth of the Json parser 2012-05-16 04:25:11 +02:00
tools configure.exe: move a few things from qmodule.pri to qconfig.pri 2012-05-11 10:38:25 +02:00
util QChar: add isSurrogate() and isNonCharacter() to the public API 2012-05-16 04:24:56 +02:00
.gitattributes Added .tag file with Git revision. 2011-05-03 16:23:49 +02:00
.gitignore Add imports directory to ignore list 2012-04-11 01:42:12 +02:00
.tag Added .tag file with Git revision. 2011-05-03 16:23:49 +02:00
configure configure: save pkg-config env in qconfig.pri 2012-05-14 21:23:43 +02:00
configure.bat Remove Q_BYTE_ORDER and -*-endian arguments from configures 2012-03-02 14:48:00 +01:00
header.BSD Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.FDL Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.LGPL Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.LGPL-ONLY Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
INSTALL Remove Symbian specific code from qtbase. 2012-01-31 07:08:31 +01:00
LGPL_EXCEPTION.txt Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.LGPL Update contact information in license headers. 2012-01-23 04:04:33 +01:00
LICENSE.PREVIEW.COMMERCIAL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
qtbase.pro device: Add -device and -device-option to configure 2012-03-27 05:35:57 +02:00
sync.profile Expose QPA API under qpa/* 2012-05-07 20:25:24 +02:00