Skip to content
Permalink
Browse files

Simplify default arguments in signatures

  • Loading branch information...
steveire committed Jul 20, 2019
1 parent 61de952 commit 9b42eab18b2278605ce4504cc153b0525d992021
Showing with 222 additions and 282 deletions.
  1. +8 −12 templates/defaultfilters/datetime.h
  2. +2 −2 templates/defaultfilters/defaultfilters.h
  3. +4 −6 templates/defaultfilters/integers.h
  4. +20 −30 templates/defaultfilters/lists.h
  5. +8 −12 templates/defaultfilters/logic.h
  6. +52 −78 templates/defaultfilters/stringfilters.h
  7. +1 −1 templates/defaulttags/autoescape.h
  8. +1 −1 templates/defaulttags/comment.h
  9. +1 −1 templates/defaulttags/cycle.h
  10. +1 −1 templates/defaulttags/debug.h
  11. +2 −2 templates/defaulttags/defaulttags.h
  12. +1 −1 templates/defaulttags/filtertag.h
  13. +1 −1 templates/defaulttags/firstof.h
  14. +1 −1 templates/defaulttags/for.h
  15. +1 −1 templates/defaulttags/if.h
  16. +1 −1 templates/defaulttags/if_p.h
  17. +1 −1 templates/defaulttags/ifchanged.h
  18. +1 −1 templates/defaulttags/ifequal.h
  19. +1 −1 templates/defaulttags/load.h
  20. +1 −1 templates/defaulttags/mediafinder.h
  21. +1 −1 templates/defaulttags/now.h
  22. +2 −3 templates/defaulttags/range.h
  23. +1 −1 templates/defaulttags/regroup.h
  24. +1 −1 templates/defaulttags/spaceless.h
  25. +1 −1 templates/defaulttags/templatetag.h
  26. +1 −1 templates/defaulttags/widthratio.h
  27. +1 −1 templates/defaulttags/with.h
  28. +2 −2 templates/i18n/i18n.h
  29. +2 −2 templates/i18n/i18nc.h
  30. +2 −2 templates/i18n/i18ncp.h
  31. +2 −2 templates/i18n/i18np.h
  32. +1 −1 templates/i18n/i18ntags.h
  33. +2 −2 templates/i18n/l10n_money.h
  34. +1 −1 templates/i18n/with_locale.h
  35. +12 −16 templates/lib/abstractlocalizer.h
  36. +1 −1 templates/lib/engine.h
  37. +2 −2 templates/lib/engine_p.h
  38. +2 −2 templates/lib/filter.h
  39. +3 −3 templates/lib/lexer_p.h
  40. +2 −2 templates/lib/node.h
  41. +2 −2 templates/lib/nodebuiltins_p.h
  42. +5 −6 templates/lib/nulllocalizer_p.h
  43. +3 −4 templates/lib/parser.h
  44. +1 −1 templates/lib/pluginpointer_p.h
  45. +5 −6 templates/lib/qtlocalizer.h
  46. +2 −2 templates/lib/safestring.h
  47. +3 −3 templates/lib/statemachine_p.h
  48. +3 −3 templates/lib/taglibraryinterface.h
  49. +2 −2 templates/lib/template.h
  50. +1 −1 templates/lib/templateloader.h
  51. +2 −2 templates/loadertags/block.h
  52. +2 −2 templates/loadertags/extends.h
  53. +2 −2 templates/loadertags/include.h
  54. +1 −1 templates/loadertags/loadertags.h
  55. +1 −1 templates/scriptabletags/scriptablecontext.h
  56. +1 −1 templates/scriptabletags/scriptablefilter.h
  57. +2 −2 templates/scriptabletags/scriptablefilterexpression.h
  58. +3 −3 templates/scriptabletags/scriptablenode.h
  59. +1 −2 templates/scriptabletags/scriptableparser.h
  60. +1 −1 templates/scriptabletags/scriptablesafestring.h
  61. +4 −4 templates/scriptabletags/scriptabletags.h
  62. +1 −1 templates/scriptabletags/scriptabletemplate.h
  63. +2 −2 templates/scriptabletags/scriptablevariable.h
  64. +1 −1 templates/tests/pluginpointertest/myobject.h
  65. +2 −2 templates/tests/testbuiltins.cpp
  66. +2 −2 templates/tests/testdefaulttags.cpp
  67. +3 −3 templates/tests/testgenericcontainers.cpp
  68. +7 −7 templates/tests/testgenerictypes.cpp
  69. +1 −1 templates/tests/testinternationalization.cpp
  70. +1 −2 textdocument/lib/abstractmarkupbuilder.h
  71. +1 −2 textdocument/lib/bbcodebuilder.h
  72. +1 −2 textdocument/lib/mediawikimarkupbuilder.h
  73. +1 −2 textdocument/lib/plaintextmarkupbuilder.h
  74. +1 −2 textdocument/lib/texthtmlbuilder.h
@@ -28,33 +28,29 @@ using namespace Grantlee;
class DateFilter : public Filter
{
public:
QVariant doFilter(const QVariant &input,
const QVariant &argument = QVariant(),
bool autoescape = false) const override;
QVariant doFilter(const QVariant &input, const QVariant &argument = {},
bool autoescape = {}) const override;
};

class TimeFilter : public Filter
{
public:
QVariant doFilter(const QVariant &input,
const QVariant &argument = QVariant(),
bool autoescape = false) const override;
QVariant doFilter(const QVariant &input, const QVariant &argument = {},
bool autoescape = {}) const override;
};

class TimeSinceFilter : public Filter
{
public:
QVariant doFilter(const QVariant &input,
const QVariant &argument = QVariant(),
bool autoescape = false) const override;
QVariant doFilter(const QVariant &input, const QVariant &argument = {},
bool autoescape = {}) const override;
};

class TimeUntilFilter : public Filter
{
public:
QVariant doFilter(const QVariant &input,
const QVariant &argument = QVariant(),
bool autoescape = false) const override;
QVariant doFilter(const QVariant &input, const QVariant &argument = {},
bool autoescape = {}) const override;
};

#endif
@@ -43,9 +43,9 @@ class DefaultFiltersLibrary : public QObject, public TagLibraryInterface
Q_INTERFACES(Grantlee::TagLibraryInterface)
Q_PLUGIN_METADATA(IID "org.grantlee.TagLibraryInterface")
public:
DefaultFiltersLibrary(QObject *parent = 0) : QObject(parent) {}
DefaultFiltersLibrary(QObject *parent = {}) : QObject(parent) {}

QHash<QString, Filter *> filters(const QString &name = QString()) override
QHash<QString, Filter *> filters(const QString &name = {}) override
{
Q_UNUSED(name);

@@ -30,17 +30,15 @@ using namespace Grantlee;
class AddFilter : public Filter
{
public:
QVariant doFilter(const QVariant &input,
const QVariant &argument = QVariant(),
bool autoescape = false) const override;
QVariant doFilter(const QVariant &input, const QVariant &argument = {},
bool autoescape = {}) const override;
};

class GetDigitFilter : public Filter
{
public:
QVariant doFilter(const QVariant &input,
const QVariant &argument = QVariant(),
bool autoescape = false) const override;
QVariant doFilter(const QVariant &input, const QVariant &argument = {},
bool autoescape = {}) const override;
};

#endif
@@ -30,85 +30,76 @@ using namespace Grantlee;
class JoinFilter : public Filter
{
public:
QVariant doFilter(const QVariant &input,
const QVariant &argument = QVariant(),
bool autoescape = false) const override;
QVariant doFilter(const QVariant &input, const QVariant &argument = {},
bool autoescape = {}) const override;

bool isSafe() const override { return true; }
};

class LengthFilter : public Filter
{
public:
QVariant doFilter(const QVariant &input,
const QVariant &argument = QVariant(),
bool autoescape = false) const override;
QVariant doFilter(const QVariant &input, const QVariant &argument = {},
bool autoescape = {}) const override;

bool isSafe() const override { return true; }
};

class LengthIsFilter : public Filter
{
public:
QVariant doFilter(const QVariant &input,
const QVariant &argument = QVariant(),
bool autoescape = false) const override;
QVariant doFilter(const QVariant &input, const QVariant &argument = {},
bool autoescape = {}) const override;

bool isSafe() const override { return true; }
};

class FirstFilter : public Filter
{
public:
QVariant doFilter(const QVariant &input,
const QVariant &argument = QVariant(),
bool autoescape = false) const override;
QVariant doFilter(const QVariant &input, const QVariant &argument = {},
bool autoescape = {}) const override;
};

class LastFilter : public Filter
{
public:
QVariant doFilter(const QVariant &input,
const QVariant &argument = QVariant(),
bool autoescape = false) const override;
QVariant doFilter(const QVariant &input, const QVariant &argument = {},
bool autoescape = {}) const override;
};

class RandomFilter : public Filter
{
public:
QVariant doFilter(const QVariant &input,
const QVariant &argument = QVariant(),
bool autoescape = false) const override;
QVariant doFilter(const QVariant &input, const QVariant &argument = {},
bool autoescape = {}) const override;

bool isSafe() const override { return true; }
};

class SliceFilter : public Filter
{
public:
QVariant doFilter(const QVariant &input,
const QVariant &argument = QVariant(),
bool autoescape = false) const override;
QVariant doFilter(const QVariant &input, const QVariant &argument = {},
bool autoescape = {}) const override;

bool isSafe() const override { return true; }
};

class MakeListFilter : public Filter
{
public:
QVariant doFilter(const QVariant &input,
const QVariant &argument = QVariant(),
bool autoescape = false) const override;
QVariant doFilter(const QVariant &input, const QVariant &argument = {},
bool autoescape = {}) const override;

bool isSafe() const override { return true; }
};

class UnorderedListFilter : public Filter
{
public:
QVariant doFilter(const QVariant &input,
const QVariant &argument = QVariant(),
bool autoescape = false) const override;
QVariant doFilter(const QVariant &input, const QVariant &argument = {},
bool autoescape = {}) const override;

bool isSafe() const override { return true; }

@@ -120,9 +111,8 @@ class UnorderedListFilter : public Filter
class DictSortFilter : public Filter
{
public:
QVariant doFilter(const QVariant &input,
const QVariant &argument = QVariant(),
bool autoescape = false) const override;
QVariant doFilter(const QVariant &input, const QVariant &argument = {},
bool autoescape = {}) const override;

bool isSafe() const override { return false; }
};
@@ -28,33 +28,29 @@ using namespace Grantlee;
class DefaultFilter : public Filter
{
public:
QVariant doFilter(const QVariant &input,
const QVariant &argument = QVariant(),
bool autoescape = false) const override;
QVariant doFilter(const QVariant &input, const QVariant &argument = {},
bool autoescape = {}) const override;
};

class DefaultIfNoneFilter : public Filter
{
public:
QVariant doFilter(const QVariant &input,
const QVariant &argument = QVariant(),
bool autoescape = false) const override;
QVariant doFilter(const QVariant &input, const QVariant &argument = {},
bool autoescape = {}) const override;
};

class DivisibleByFilter : public Filter
{
public:
QVariant doFilter(const QVariant &input,
const QVariant &argument = QVariant(),
bool autoescape = false) const override;
QVariant doFilter(const QVariant &input, const QVariant &argument = {},
bool autoescape = {}) const override;
};

class YesNoFilter : public Filter
{
public:
QVariant doFilter(const QVariant &input,
const QVariant &argument = QVariant(),
bool autoescape = false) const override;
QVariant doFilter(const QVariant &input, const QVariant &argument = {},
bool autoescape = {}) const override;
};

#endif

0 comments on commit 9b42eab

Please sign in to comment.
You can’t perform that action at this time.