diff options
Diffstat (limited to 'tests/auto/installer/brokeninstaller/tst_brokeninstaller.cpp')
-rw-r--r-- | tests/auto/installer/brokeninstaller/tst_brokeninstaller.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/auto/installer/brokeninstaller/tst_brokeninstaller.cpp b/tests/auto/installer/brokeninstaller/tst_brokeninstaller.cpp index 95f4ac77d..5978b3bb2 100644 --- a/tests/auto/installer/brokeninstaller/tst_brokeninstaller.cpp +++ b/tests/auto/installer/brokeninstaller/tst_brokeninstaller.cpp @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2018 The Qt Company Ltd. +** Copyright (C) 2023 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -100,7 +100,7 @@ private slots: QList<Component*> rootComponents = loadComponents(core); ComponentModel *model = new ComponentModel(1, &core); - model->setRootComponents(rootComponents); + model->reset(rootComponents); // all names should be resolvable QStringList all; all << m_checkedComponentsWithBrokenScript << m_uncheckedComponentsWithBrokenScript << m_partiallyCheckedComponentsWithBrokenScript; @@ -125,9 +125,9 @@ private slots: const QString debugMessage = QString("Exception while loading the component script"); const QRegularExpression re(debugMessage); QTest::ignoreMessage(QtWarningMsg, re); - invalidScriptComponent->loadComponentScript(":///data/broken_script.qs"); + invalidScriptComponent->evaluateComponentScript(":///data/broken_script.qs"); - model->setRootComponents(components); + model->reset(components); testModelState(model, m_checkedComponentsWithBrokenScript, m_partiallyCheckedComponentsWithBrokenScript, m_uncheckedComponentsWithBrokenScript); } @@ -145,8 +145,8 @@ private slots: Component *componentDependingOnMissingDependency = core.componentByName("componentd"); componentDependingOnMissingDependency->addDependency("componentmissingdependency"); - core.componentsToInstallNeedsRecalculation(); - model->setRootComponents(components); + core.recalculateAllComponents(); + model->reset(components); testModelState(model, m_checkedComponentsWithMissingDependency, m_partiallyCheckedComponentsWithBrokenScript, m_uncheckedComponentsWithMissingDependency); } @@ -157,6 +157,7 @@ private: { UpdatesInfo updatesInfo; updatesInfo.setFileName(":///data/updates.xml"); + updatesInfo.parseFile(); const QList<UpdateInfo> updateInfos = updatesInfo.updatesInfo(); QList <Component*> components; |