From 528b0414dd253d52bf50170f9704a01592fc117c Mon Sep 17 00:00:00 2001 From: Arttu Tarkiainen Date: Wed, 8 Apr 2020 15:55:04 +0300 Subject: Fix building and execution of SettingsOperation test on Linux Return QSettings value QVariant explicitly as a QStringList. Change the install script settings path to use generic '/' separator as this seemed to cause problems on Linux, also remove unused variable from the script. Change-Id: I647c18ef577b923f92cfc6c6c903d517dde479ce Reviewed-by: Iikka Eklund Reviewed-by: Katja Marttila --- .../settingsoperation/data/repository/A/1.0.2-1meta.7z | Bin 947 -> 927 bytes .../settingsoperation/tst_settingsoperation.cpp | 12 ++++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/auto/installer/settingsoperation/data/repository/A/1.0.2-1meta.7z b/tests/auto/installer/settingsoperation/data/repository/A/1.0.2-1meta.7z index fb1e30f49..b283108bb 100644 Binary files a/tests/auto/installer/settingsoperation/data/repository/A/1.0.2-1meta.7z and b/tests/auto/installer/settingsoperation/data/repository/A/1.0.2-1meta.7z differ diff --git a/tests/auto/installer/settingsoperation/tst_settingsoperation.cpp b/tests/auto/installer/settingsoperation/tst_settingsoperation.cpp index 3832b1c59..521880db4 100644 --- a/tests/auto/installer/settingsoperation/tst_settingsoperation.cpp +++ b/tests/auto/installer/settingsoperation/tst_settingsoperation.cpp @@ -302,20 +302,20 @@ private slots: QSettings testSettings(QDir(m_testSettingsDirPath).filePath(m_testSettingsFilename), QSettings::IniFormat); - QCOMPARE(testSettings.value("testcategory/categoryarrayvalue1"), QStringList() << "value1" << - "value2" << "value3"); + QCOMPARE(testSettings.value("testcategory/categoryarrayvalue1").toStringList(), + QStringList() << "value1" << "value2" << "value3"); core->installDefaultComponentsSilently(); - QCOMPARE(testSettings.value("testcategory/categoryarrayvalue1"), QStringList() << "value1" << - "value2" << "value3" << "valueFromScript"); + QCOMPARE(testSettings.value("testcategory/categoryarrayvalue1").toStringList(), + QStringList() << "value1" << "value2" << "value3" << "valueFromScript"); core->commitSessionOperations(); core->setPackageManager(); core->uninstallComponentsSilently(QStringList() << "A"); - QCOMPARE(testSettings.value("testcategory/categoryarrayvalue1"), QStringList() << "value1" << - "value2" << "value3"); + QCOMPARE(testSettings.value("testcategory/categoryarrayvalue1").toStringList(), + QStringList() << "value1" << "value2" << "value3"); QDir dir(installDir); QVERIFY(dir.removeRecursively()); core->deleteLater(); -- cgit v1.2.3