diff options
author | Christian Stenger <christian.stenger@qt.io> | 2018-10-23 13:32:39 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2018-10-23 11:56:57 +0000 |
commit | 6796839da3544753053554285ca8196967179f9e (patch) | |
tree | a9e25b3c5d3d03416f6cf48058e1f5d78ff81d08 /src/plugins/projectexplorer/jsonwizard | |
parent | 85fcd67538d5f3558294089a3abd1fde7be1c81b (diff) |
ProjectExplorer: Fix test
Change-Id: Iac8e6a74543f5ad19f91dc42c0fc666890f114fc
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/jsonwizard')
-rw-r--r-- | src/plugins/projectexplorer/jsonwizard/jsonwizard_test.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizard_test.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizard_test.cpp index 1b8b84d8c8..890291f701 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonwizard_test.cpp +++ b/src/plugins/projectexplorer/jsonwizard/jsonwizard_test.cpp @@ -25,6 +25,8 @@ #include "jsonwizardfactory.h" +#include <coreplugin/icore.h> + #include <projectexplorer/projectexplorer.h> #include <QJsonDocument> @@ -246,6 +248,12 @@ void ProjectExplorer::ProjectExplorerPlugin::testJsonWizardsComboBox() QCOMPARE(qPrintable(disabledComboBox->currentText()), "fgh"); } +static const char *iconInsideResource(const QString &relativePathToIcon) +{ + const QDir resourcePath(Core::ICore::resourcePath()); + return resourcePath.filePath(relativePathToIcon).toLocal8Bit().data(); +} + void ProjectExplorer::ProjectExplorerPlugin::testJsonWizardsIconList() { QString errorMessage; @@ -255,8 +263,7 @@ void ProjectExplorer::ProjectExplorerPlugin::testJsonWizardsIconList() QJsonObject{ {"trKey", "item no1"}, {"condition", true}, - {"icon", "../share/qtcreator/templates/wizards/qtquickstyleicons/default.png"} - + {"icon", iconInsideResource("templates/wizards/qtquickstyleicons/default.png")} }, QJsonObject{ {"trKey", "item no2"}, @@ -268,7 +275,7 @@ void ProjectExplorer::ProjectExplorerPlugin::testJsonWizardsIconList() {"trKey", "item no3"}, {"condition", true}, {"trToolTip", "MyToolTip"}, - {"icon", "../share/qtcreator/templates/wizards/qtquickstyleicons/default.png"} + {"icon", iconInsideResource("templates/wizards/qtquickstyleicons/default.png")} } }); |