* @brief Enables or disables data export. */
| 301 | * @brief Enables or disables data export. |
| 302 | */ |
| 303 | void Console::Export::setExportEnabled(const bool enabled) |
| 304 | { |
| 305 | #ifdef BUILD_COMMERCIAL |
| 306 | const auto& tk = Licensing::CommercialToken::current(); |
| 307 | if (tk.isValid() && SS_LICENSE_GUARD() && tk.featureTier() >= Licensing::FeatureTier::Trial) { |
| 308 | if (!enabled && isOpen()) |
| 309 | closeFile(); |
| 310 | |
| 311 | setConsumerEnabled(enabled); |
| 312 | if (m_persistSettings) |
| 313 | m_settings.setValue("ConsoleExport", enabled); |
| 314 | |
| 315 | Q_EMIT enabledChanged(); |
| 316 | return; |
| 317 | } |
| 318 | |
| 319 | setConsumerEnabled(false); |
| 320 | #endif |
| 321 | |
| 322 | closeFile(); |
| 323 | m_exportEnabled.store(false, std::memory_order_relaxed); |
| 324 | if (m_persistSettings) |
| 325 | m_settings.setValue("ConsoleExport", false); |
| 326 | |
| 327 | Q_EMIT enabledChanged(); |
| 328 | |
| 329 | if (enabled) |
| 330 | Misc::Utilities::showMessageBox( |
| 331 | tr("Console Export is a Pro feature."), |
| 332 | tr("This feature requires a license. Please purchase one to enable console export.")); |
| 333 | } |
| 334 | |
| 335 | /** |
| 336 | * @brief Appends console data from a specific device to the output buffer. |
nothing calls this directly
no test coverage detected