forked from qt-creator/qt-creator
Utils: Move template file processing from projectexplorer to utils
I want to use it e.g. for snippets and the TextEditor plugin may not depend on the ProjectExplorer, so the code has to move. This adds a dependency on QtQml to Utils, but that does not really matter since that is loaded into QtCreator anyway. Change-Id: Iada9f40b2966a1fc41631ab33da09812ad67d967 Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/macroexpander.h>
|
||||
#include <utils/templateengine.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDir>
|
||||
@@ -164,8 +165,8 @@ Core::GeneratedFiles JsonWizardFileGenerator::fileList(Utils::MacroExpander *exp
|
||||
});
|
||||
nested.registerExtraResolver([expander](QString n, QString *ret) { return expander->resolveMacro(n, ret); });
|
||||
|
||||
gf.setContents(JsonWizard::processText(&nested, QString::fromUtf8(reader.data()),
|
||||
errorMessage));
|
||||
gf.setContents(Utils::TemplateEngine::processText(&nested, QString::fromUtf8(reader.data()),
|
||||
errorMessage));
|
||||
if (!errorMessage->isEmpty()) {
|
||||
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizard", "When processing \"%1\":<br>%2")
|
||||
.arg(sourcePath, *errorMessage);
|
||||
|
||||
Reference in New Issue
Block a user