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

Method setExportEnabled

app/src/Console/Export.cpp:303–333  ·  view source on GitHub ↗

* @brief Enables or disables data export. */

Source from the content-addressed store, hash-verified

301 * @brief Enables or disables data export.
302 */
303void 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.

Callers

nothing calls this directly

Calls 2

featureTierMethod · 0.80
isValidMethod · 0.45

Tested by

no test coverage detected