summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-01-19 10:00:53 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2016-01-19 10:03:01 +0100
commit8f569c740a91b98365dcdaee2444038ce4957a76 (patch)
tree749302d8bf9023ae51873a74dc641fd005744502 /tests/auto/corelib/kernel/qobject/tst_qobject.cpp
parent465e93aa95d99f799300867b07f81bdd5162c9f1 (diff)
parente8ad49d6cba6521f20b1b08bf65d92fc81c158e4 (diff)
Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts: config.tests/common/atomic64/atomic64.cpp configure src/3rdparty/forkfd/forkfd.c src/corelib/io/forkfd_qt.cpp src/widgets/kernel/qwidgetwindow.cpp tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp tools/configure/configureapp.cpp Change-Id: Ic6168d82e51a0ef1862c3a63bee6722e8f138414
Diffstat (limited to 'tests/auto/corelib/kernel/qobject/tst_qobject.cpp')
-rw-r--r--tests/auto/corelib/kernel/qobject/tst_qobject.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
index a3c6d8e9df..f7c1f03c0f 100644
--- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
+++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
@@ -5987,7 +5987,7 @@ class GetSenderObject : public QObject
{
Q_OBJECT
public:
- QObject *accessSender() { return sender(); }
+ using QObject::sender; // make public
public Q_SLOTS:
void triggerSignal() { Q_EMIT aSignal(); }
@@ -6003,8 +6003,8 @@ struct CountedStruct
CountedStruct(GetSenderObject *sender) : sender(sender) { ++countedStructObjectsCount; }
CountedStruct(const CountedStruct &o) : sender(o.sender) { ++countedStructObjectsCount; }
CountedStruct &operator=(const CountedStruct &) { return *this; }
- // accessSender here allows us to check if there's a deadlock
- ~CountedStruct() { --countedStructObjectsCount; if (sender != Q_NULLPTR) (void)sender->accessSender(); }
+ // calling sender() here allows us to check if there's a deadlock
+ ~CountedStruct() { --countedStructObjectsCount; if (sender) (void)sender->sender(); }
void operator()() const { }
GetSenderObject *sender;
@@ -6396,7 +6396,8 @@ void tst_QObject::noDeclarativeParentChangedOnDestruction()
QObject *parent = new QObject;
QObject *child = new QObject;
- QAbstractDeclarativeData dummy;
+ QAbstractDeclarativeDataImpl dummy;
+ dummy.ownedByQml1 = false;
QObjectPrivate::get(child)->declarativeData = &dummy;
parentChangeCalled = false;