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

Method Trial

app/src/Licensing/Trial.cpp:58–80  ·  view source on GitHub ↗

* @brief Constructs the Trial licensing system. */

Source from the content-addressed store, hash-verified

56 * @brief Constructs the Trial licensing system.
57 */
58Licensing::Trial::Trial()
59 : m_busy(false)
60 , m_trialEnabled(false)
61 , m_deviceRegistered(false)
62 , m_trialExpiry(QDateTime::currentDateTimeUtc())
63{
64 connect(this,
65 &Licensing::Trial::enabledChanged,
66 &Licensing::LemonSqueezy::instance(),
67 &Licensing::LemonSqueezy::activatedChanged);
68 connect(&Licensing::LemonSqueezy::instance(),
69 &Licensing::LemonSqueezy::activatedChanged,
70 this,
71 &Licensing::Trial::availableChanged);
72
73 connect(&m_manager, &QNetworkAccessManager::finished, this, &Licensing::Trial::onServerReply);
74
75 m_crypt.setKey(MachineID::instance().machineSpecificKey());
76 m_crypt.setIntegrityProtectionMode(Licensing::SimpleCrypt::ProtectionHash);
77
78 if (!Licensing::LemonSqueezy::instance().isActivated())
79 readSettings();
80}
81
82/**
83 * @brief Gets the singleton instance of the Trial licensing class.

Callers

nothing calls this directly

Calls 4

machineSpecificKeyMethod · 0.80
setKeyMethod · 0.45
isActivatedMethod · 0.45

Tested by

no test coverage detected