mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-10-09 11:52:21 +08:00
21 lines
385 B
C++
21 lines
385 B
C++
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QFile>
|
|
|
|
namespace SpkTelemetry
|
|
{
|
|
void FunCollectId()
|
|
{
|
|
#if !defined(NDEBUG) || !defined(SPARK_FORCE_TELEMETRY) // Debug builds shouldn't transmit telemetry data unless asked for
|
|
return;
|
|
#else
|
|
QFile idFile("/etc/machine-id");
|
|
if(!idFile.open(QFile::ReadOnly))
|
|
return;
|
|
auto machineId = idFile.readAll();
|
|
#endif
|
|
}
|
|
}
|