diff options
author | Dominik Holland <dominik.holland@pelagicore.com> | 2018-06-21 10:42:21 +0200 |
---|---|---|
committer | Dominik Holland <dominik.holland@pelagicore.com> | 2018-07-05 10:49:22 +0000 |
commit | 5febab3d31cc48d0527709d84fe2cd165453be11 (patch) | |
tree | bc52e80fb64ff89410c3533da955583470b7ce21 /tests | |
parent | a0fb6f20cb5d21b820236c0c4707ec2fe18748a5 (diff) |
Add a generic backend() function to QIviAbstractFeaturePrivate
Using this function in the derived classes makes the code much cleaner
and less error-prone as always interfaceName() is used to get the
backend object, which makes sure deriving the interface works as well.
Also get rid of the disconnectServiceObject reimplementation where
possible and document when it makes sense to reimplement this function.
Change-Id: I05ade6e8ca8d3829cabcbbdf312db4b46a25044d
Reviewed-by: Antti Hölttä <ahoelttae@luxoft.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/core/qiviabstractfeature/tst_qiviabstractfeature.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/tests/auto/core/qiviabstractfeature/tst_qiviabstractfeature.cpp b/tests/auto/core/qiviabstractfeature/tst_qiviabstractfeature.cpp index 6315d1e..4b979c6 100644 --- a/tests/auto/core/qiviabstractfeature/tst_qiviabstractfeature.cpp +++ b/tests/auto/core/qiviabstractfeature/tst_qiviabstractfeature.cpp @@ -91,11 +91,6 @@ public: QIviAbstractFeature::connectToServiceObject(serviceObject); } - virtual void disconnectFromServiceObject(QIviServiceObject*) - { - disconnect(); - } - virtual void clearServiceObject() { } @@ -140,11 +135,6 @@ public: QIviAbstractFeatureListModel::connectToServiceObject(serviceObject); } - virtual void disconnectFromServiceObject(QIviServiceObject*) - { - disconnect(); - } - virtual void clearServiceObject() { } @@ -519,7 +509,7 @@ void BaseTest::testResetServiceObject() m_manager->unloadAllBackends(); QCOMPARE(soDestroyedSpy.count(), 1); - QCOMPARE(serviceObjectChangedSpy.count(), 0); + QCOMPARE(serviceObjectChangedSpy.count(), 1); } //This construction is used to run the test twice once for a Feature and once for the FeatureListModel but show the results as separate tests. |