diff --git a/src/plugins/projectexplorer/customwizard/customwizard.cpp b/src/plugins/projectexplorer/customwizard/customwizard.cpp index 45cc86eaff2..057b49840d1 100644 --- a/src/plugins/projectexplorer/customwizard/customwizard.cpp +++ b/src/plugins/projectexplorer/customwizard/customwizard.cpp @@ -51,6 +51,18 @@ static const char templatePathC[] = "templates/wizards"; static const char configFileC[] = "wizard.xml"; +namespace { +bool enableLoadTemplateFiles() +{ +#ifdef WITH_TESTS + static bool value = qEnvironmentVariableIsEmpty("QTC_DISABLE_LOAD_TEMPLATES_FOR_TEST"); +#else + static bool value = true; +#endif + return value; +} +} + namespace ProjectExplorer { namespace Internal { @@ -394,7 +406,7 @@ QList CustomWizard::createWizards() QList toCreate; - while (!dirs.isEmpty()) { + while (enableLoadTemplateFiles() && !dirs.isEmpty()) { const QFileInfo dirFi = dirs.takeFirst(); const QDir dir(dirFi.absoluteFilePath()); if (CustomWizardPrivate::verbose)