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

Function installTrialToken

app/src/Licensing/Trial.cpp:40–49  ·  view source on GitHub ↗

* @brief Builds and installs a commercial token for an active trial. */

Source from the content-addressed store, hash-verified

38 * @brief Builds and installs a commercial token for an active trial.
39 */
40static void installTrialToken(int daysRemaining)
41{
42 Licensing::CommercialToken token;
43 token.setVariantName(QStringLiteral("Trial"));
44 token.setInstanceName(Licensing::MachineID::instance().machineId());
45 token.setGraceDaysRemaining(daysRemaining);
46 token.setFeatureTier(Licensing::FeatureTier::Trial);
47 token.seal();
48 Licensing::CommercialToken::setCurrent(token);
49}
50
51//--------------------------------------------------------------------------------------------------
52// Constructor & singleton access

Callers 2

readSettingsMethod · 0.85
onServerReplyMethod · 0.85

Calls 5

setVariantNameMethod · 0.80
setInstanceNameMethod · 0.80
setGraceDaysRemainingMethod · 0.80
setFeatureTierMethod · 0.80
sealMethod · 0.80

Tested by

no test coverage detected