MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / tierFromVariant

Function tierFromVariant

app/src/Licensing/LemonSqueezy.cpp:47–61  ·  view source on GitHub ↗

* @brief Derives a feature tier from the Lemon Squeezy variant name; any * non-empty variant that is not Enterprise maps to Pro on purpose, so a legacy * variant such as "Hobbyist" still unlocks the full feature set. */

Source from the content-addressed store, hash-verified

45 * variant such as "Hobbyist" still unlocks the full feature set.
46 */
47static Licensing::FeatureTier tierFromVariant(const QString& variant)
48{
49 const auto lower = variant.toLower();
50
51 if (lower.startsWith("enterprise"))
52 return Licensing::FeatureTier::Enterprise;
53
54 if (lower.startsWith("pro") || lower.startsWith("team"))
55 return Licensing::FeatureTier::Pro;
56
57 if (!lower.isEmpty())
58 return Licensing::FeatureTier::Pro;
59
60 return Licensing::FeatureTier::None;
61}
62
63//--------------------------------------------------------------------------------------------------
64// Constructor & singleton access functions

Callers 1

applyValidatedLicenseMethod · 0.85

Calls 1

isEmptyMethod · 0.80

Tested by

no test coverage detected