diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-11-26 19:07:29 +0100 |
---|---|---|
committer | Robert C. Helling <helling@atdotde.de> | 2020-11-26 21:45:17 +0100 |
commit | 7e8636d7be3a2de492ab0b62b2ff430044a4d3de (patch) | |
tree | 7bc8b41498d51091a066c7e466ea48333bc8d74f /desktop-widgets | |
parent | b36178a00a37f3679decebb52fffe6e41e5c5704 (diff) | |
download | subsurface-7e8636d7be3a2de492ab0b62b2ff430044a4d3de.tar.gz |
cleanup: remove unused function in templatelayout.cpp
This was removed with grantlee.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/templatelayout.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/desktop-widgets/templatelayout.cpp b/desktop-widgets/templatelayout.cpp index 045c33188..997213fd6 100644 --- a/desktop-widgets/templatelayout.cpp +++ b/desktop-widgets/templatelayout.cpp @@ -100,31 +100,6 @@ TemplateLayout::TemplateLayout(print_options *printOptions, template_options *te this->templateOptions = templateOptions; } -/* a HTML pre-processor stage. acts like a compatibility layer - * between some Grantlee variables and DiveObjectHelperGrantlee Q_PROPERTIES: - * dive.weights -> dive.weightList - * dive.weight# -> dive.weights.# - * dive.cylinders -> dive.cylinderList - * dive.cylinder# -> dive.cylinders.# - * The Grantlee parser works with a single or no space next to the variable - * markers - e.g. '{{ var }}'. We're graceful and support an arbitrary number of - * whitespace. */ -static QRegularExpression weightsRegExp(R"({{\*?([A-Za-z]+[A-Za-z0-9]*).weights\s*}})"); -static QRegularExpression weightRegExp(R"({{\*?([A-Za-z]+[A-Za-z0-9]*).weight(\d+)\s*}})"); -static QRegularExpression cylindersRegExp(R"({{\*?([A-Za-z]+[A-Za-z0-9]*).cylinders\s*}})"); -static QRegularExpression cylinderRegExp(R"({{\s*([A-Za-z]+[A-Za-z0-9]*).cylinder(\d+)\s*}})"); -static QString preprocessTemplate(const QString &in) -{ - QString out = in; - - out.replace(weightsRegExp, QStringLiteral(R"({{\1.weightList}})")); - out.replace(weightRegExp, QStringLiteral(R"({{\1.weights.\2}})")); - out.replace(cylindersRegExp, QStringLiteral(R"({{\1.cylinderList}})")); - out.replace(cylindersRegExp, QStringLiteral(R"({{\1.cylinders.\2}})")); - - return out; -} - QString TemplateLayout::generate() { int progress = 0; |