summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernd Weimer <bernd.weimer@pelagicore.com>2020-05-20 14:18:37 +0200
committerBernd Weimer <bernd.weimer@pelagicore.com>2020-05-22 14:53:11 +0200
commitf8550ca52f767fcb39feb359809a2ccb90b2e990 (patch)
tree39c1c86d8443232c1fdfcd75459d6251de7d85ac
parentc4a7a646d92f1600eae44fb7cc93a6dea157fbac (diff)
Enable installer explicitly in tests that need it
Change-Id: Ie471b636fbfab8e0b20dd467f98f3df0cda8504a Reviewed-by: Robert Griebl <robert.griebl@qt.io>
-rw-r--r--doc/singlevsmultiprocess.qdoc2
-rw-r--r--tests/applicationinstaller/tst_applicationinstaller.cpp1
-rw-r--r--tests/packager-tool/tst_packager-tool.cpp1
3 files changed, 3 insertions, 1 deletions
diff --git a/doc/singlevsmultiprocess.qdoc b/doc/singlevsmultiprocess.qdoc
index 767aa099..f66c5943 100644
--- a/doc/singlevsmultiprocess.qdoc
+++ b/doc/singlevsmultiprocess.qdoc
@@ -138,7 +138,7 @@ application crashes and can react on it, for example by restarting the applicati
The usage of QML singletons in an application has some implications. In QML, singletons live in
their own private, but global context - they are even shared between multiple QML engine instances.
-Singletons are instantiated on once and for all, on first use, and remain as long as the process
+Singletons are instantiated once and for all, on first use, and remain as long as the process
exists. This means that if an application is terminated in single-process mode, any singleton that
was already instantiated will persist and keep its current state. Consequently, when the
application is restarted again, the singleton's state may differ from the multi-process case, where
diff --git a/tests/applicationinstaller/tst_applicationinstaller.cpp b/tests/applicationinstaller/tst_applicationinstaller.cpp
index 7128e18e..c08fa224 100644
--- a/tests/applicationinstaller/tst_applicationinstaller.cpp
+++ b/tests/applicationinstaller/tst_applicationinstaller.cpp
@@ -253,6 +253,7 @@ void tst_PackageManager::initTestCase()
PackageDatabase *pdb = new PackageDatabase(QStringList(), pathTo(Internal0));
m_pm = PackageManager::createInstance(pdb, pathTo(Documents0));
m_pm->setHardwareId(m_hardwareId);
+ m_pm->enableInstaller();
// simulate the ApplicationManager stopping blocked applications
connect(&m_pm->internalSignals, &PackageManagerInternalSignals::registerApplication,
diff --git a/tests/packager-tool/tst_packager-tool.cpp b/tests/packager-tool/tst_packager-tool.cpp
index c97a8317..1fca9021 100644
--- a/tests/packager-tool/tst_packager-tool.cpp
+++ b/tests/packager-tool/tst_packager-tool.cpp
@@ -103,6 +103,7 @@ void tst_PackagerTool::initTestCase()
try {
m_pm = PackageManager::createInstance(pdb, pathTo("documents-0"));
m_pm->setHardwareId(m_hardwareId);
+ m_pm->enableInstaller();
} catch (const Exception &e) {
QVERIFY2(false, e.what());
}