mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-14 04:42:03 +08:00
进度更新
This commit is contained in:
20
inc/telemetry/collectid.h
Normal file
20
inc/telemetry/collectid.h
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
#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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user