Fix template syntax for test case generation

This was broken by astyle in commit v4.95.0~5 (Code reformatted using
kde-dev-scripts/astyle-kdelibs. Use git blame -w 5d4c2df to show
authorship as it was before this commit., 2013-12-18), because despite
the filenames, this is not really c++ code.
wilder
Stephen Kelly 10 years ago
parent bb1eb0fa10
commit 0609bafdef
  1. 3
      autotests/proxymodeltestsuite/templates/init.cpp
  2. 25
      autotests/proxymodeltestsuite/templates/main.cpp

@ -1,5 +1,6 @@
{ % if event.interpretString % } { {% if event.interpretString %}
{
ModelInsertCommand insertCommand(&rootModel); ModelInsertCommand insertCommand(&rootModel);
insertCommand.setStartRow(0); insertCommand.setStartRow(0);
insertCommand.interpret( insertCommand.interpret(

@ -7,17 +7,9 @@ int main(int argc, char **argv)
QApplication app(argc, argv); QApplication app(argc, argv);
DynamicTreeModel rootModel; DynamicTreeModel rootModel;
{ {% if initEvent %} {% with initEvent as event %}
% if initEvent %
} {
% with initEvent as event %
}
// Include {{ "init.cpp" }}: {% include "init.cpp" %} // Include {{ "init.cpp" }}: {% include "init.cpp" %}
{ {% endwith %} {% endif %}
% endwith %
} {
% endif %
}
// Create and connect the proxy model here. // Create and connect the proxy model here.
// eg: // eg:
@ -27,17 +19,10 @@ int main(int argc, char **argv)
// proxy.setSourceModel(&rootModel); // proxy.setSourceModel(&rootModel);
// Have {{ events|length }} Events. // Have {{ events|length }} Events.
{ {% for event in events %} {% with event.type|lower|stringformat:"%1.cpp" as eventtemplate %}
% for event in events %
} {
% with event.type | lower | stringformat: "%1.cpp" as eventtemplate %
}
// Include {{ eventtemplate }}: {% include eventtemplate %} // Include {{ eventtemplate }}: {% include eventtemplate %}
{ {% endwith %} {% endfor %}
% endwith %
} {
% endfor %
}
return app.exec(); return app.exec();
} }

Loading…
Cancel
Save