* @brief Constructs the Trial licensing system. */
| 56 | * @brief Constructs the Trial licensing system. |
| 57 | */ |
| 58 | Licensing::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. |
nothing calls this directly
no test coverage detected