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

Method deactivate

app/src/Licensing/OfflineLicense.cpp:180–201  ·  view source on GitHub ↗

* @brief Removes the offline certificate from this device after user confirmation; * an air-gapped device cannot report a deactivation, so the prompt explains the * seat stays consumed and reactivation works while the machine ID is unchanged. */

Source from the content-addressed store, hash-verified

178 * seat stays consumed and reactivation works while the machine ID is unchanged.
179 */
180void Licensing::OfflineLicense::deactivate()
181{
182 if (!m_activated)
183 return;
184
185 const int answer = Misc::Utilities::showMessageBox(
186 tr("Remove the offline license from this device?"),
187 tr("This does not free your license seat, because deactivations cannot be "
188 "verified on offline devices. You can reactivate this device with the "
189 "same license file as long as its machine ID does not change."),
190 QMessageBox::Question,
191 tr("Offline Activation"),
192 QMessageBox::Yes | QMessageBox::No,
193 QMessageBox::No);
194 if (answer != QMessageBox::Yes)
195 return;
196
197 if (!LemonSqueezy::instance().isOnlineActivated())
198 CommercialToken::clearCurrent();
199
200 clearOfflineLicense();
201}
202
203/**
204 * @brief Imports and activates a certificate from a local file or file URL.

Callers

nothing calls this directly

Calls 1

isOnlineActivatedMethod · 0.80

Tested by

no test coverage detected