diff options
author | Egor Nemtsev <enemtsev@luxoft.com> | 2020-02-28 17:58:48 +0300 |
---|---|---|
committer | Egor Nemtsev <enemtsev@luxoft.com> | 2020-03-03 07:20:19 +0000 |
commit | df3f17c18766bb8e6862b42a1a304adedf9d6b40 (patch) | |
tree | 3e7b379fb82ad3f10c39e7f4c0e8d0d32ca9f246 /tests/neptune-qmlscene/neptune-qmlscene.cpp | |
parent | 3839a89e5e896c2d49d24e409f8382f123d0471c (diff) |
[tests] fix import styles for tests
- Qt Test allow only to import paths. Neptune components require Styles to
work. Styles can only be set via env variables. In Neptune's qmlscene we
add extra arguments: --style-conf and --styles-path. For testrunner we
initialize evn varibles from defined in pro file paths pointing to
build dir. We set QT_QUICK_CONTROLS_CONF and QT_QUICK_CONTROLS_STYLE_PATH
Task-number: AUTOSUITE-1497
Change-Id: I1304063bc7628bb921c7c6ee9f7562202d3efbce
Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
Diffstat (limited to 'tests/neptune-qmlscene/neptune-qmlscene.cpp')
-rw-r--r-- | tests/neptune-qmlscene/neptune-qmlscene.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/neptune-qmlscene/neptune-qmlscene.cpp b/tests/neptune-qmlscene/neptune-qmlscene.cpp index 74c442e3..b3750875 100644 --- a/tests/neptune-qmlscene/neptune-qmlscene.cpp +++ b/tests/neptune-qmlscene/neptune-qmlscene.cpp @@ -361,6 +361,8 @@ static void usage() puts(" -I <path> ........................ Add <path> to the list of import paths"); puts(" -P <path> ........................ Add <path> to the list of plugin paths"); puts(" -translation <translationfile> ... Set the language to run in"); + puts(" --style-conf <style conf file> ... Sets QT_QUICK_CONTROLS_CONF"); + puts(" --styles-path <styles path> ...... Sets QT_QUICK_CONTROLS_STYLE_PATH"); puts(" "); exit(1); @@ -529,6 +531,10 @@ int main(int argc, char ** argv) imports.append(arguments.at(++i)); else if (lowerArgument == QLatin1String("-p") && i + 1 < size) pluginPaths.append(arguments.at(++i)); + else if (lowerArgument == QLatin1String("--style-conf") && i + 1 < size) + qputenv("QT_QUICK_CONTROLS_CONF", arguments.at(++i).toLocal8Bit()); + else if (lowerArgument == QLatin1String("--styles-path") && i + 1 < size) + qputenv("QT_QUICK_CONTROLS_STYLE_PATH", arguments.at(++i).toLocal8Bit()); else if (lowerArgument == QLatin1String("--help") || lowerArgument == QLatin1String("-help") || lowerArgument == QLatin1String("--h") |