diff options
author | Katja Marttila <katja.marttila@theqtcompany.com> | 2016-06-21 11:51:10 +0300 |
---|---|---|
committer | Katja Marttila <katja.marttila@theqtcompany.com> | 2016-06-21 12:32:42 +0300 |
commit | e87c58548ae1e412491210e1951a2527ac0ff381 (patch) | |
tree | ca5efe41f021f431873318b66daa859d1021b7aa /tests | |
parent | 76fd6e8f2953347ea0bf7a57b643968784bc9acc (diff) | |
parent | 6a06b8adc5d6fabac4401219044b928043e7e8a9 (diff) |
Merge remote-tracking branch 'origin/2.0'
Conflicts:
Changelog
dist/config/config.xml
dist/packages/org.qtproject.ifw.binaries/meta/package.xml
dist/packages/org.qtproject.ifw/meta/package.xml
installerfw.pri
src/libs/7zip/7zip.pro
src/libs/7zip/win/CPP/7zip/UI/Common/Update.cpp
src/libs/installer/component.cpp
src/libs/installer/lib7z_facade.cpp
src/libs/installer/packagemanagercore.cpp
src/libs/installer/proxycredentialsdialog.h
src/sdk/translations/ja.ts
tests/auto/installer/messageboxhandler/tst_messageboxhandler.cpp
tests/auto/installer/scriptengine/tst_scriptengine.cpp
tests/auto/installer/settings/tst_settings.cpp
Change-Id: I3bb98b8490b3c3eb7f664c1abb7417155b5430b2
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/installer/scriptengine/tst_scriptengine.cpp | 1 | ||||
-rw-r--r-- | tests/auto/installer/settings/tst_settings.cpp | 17 |
2 files changed, 13 insertions, 5 deletions
diff --git a/tests/auto/installer/scriptengine/tst_scriptengine.cpp b/tests/auto/installer/scriptengine/tst_scriptengine.cpp index e6dd5db45..0377b8c3a 100644 --- a/tests/auto/installer/scriptengine/tst_scriptengine.cpp +++ b/tests/auto/installer/scriptengine/tst_scriptengine.cpp @@ -198,7 +198,6 @@ private slots: m_component->setValue("Default", "Script"); m_component->setValue(scName, "component.test.name"); - Component *component = new Component(&m_core); component->setValue(scName, "component.test.addOperation"); m_core.appendRootComponent(component); diff --git a/tests/auto/installer/settings/tst_settings.cpp b/tests/auto/installer/settings/tst_settings.cpp index 0b1987b3d..8ff5329a1 100644 --- a/tests/auto/installer/settings/tst_settings.cpp +++ b/tests/auto/installer/settings/tst_settings.cpp @@ -110,12 +110,21 @@ void tst_Settings::loadEmptyConfig() void tst_Settings::loadNotExistingConfig() { + QString configFile = QLatin1String(":/data/inexisting_config.xml"); + QFile file(configFile); + QString errorString; + + if (!file.open(QIODevice::ReadOnly)) { + errorString = file.errorString(); + } + QTest::ignoreMessage(QtDebugMsg, QString::fromLatin1("create Error-Exception: \"Could not open" + " settings file %1 for reading: %2\"") + .arg(configFile).arg(errorString).toLatin1()); try { - Settings::fromFileAndPrefix(":/data/inexisting_config.xml", ":/data"); + Settings::fromFileAndPrefix(configFile, ":/data"); } catch (const Error &error) { - QCOMPARE(error.message(), QLatin1String("Cannot open settings file " - ":/data/inexisting_config.xml for reading: " - "Unknown error")); + QCOMPARE(error.message(), QString::fromLatin1("Could not open settings file " + "%1 for reading: %2").arg(configFile).arg(errorString)); return; } QFAIL("No exception thrown"); |