KUserFeedback

cpuinfosource.cpp
1/*
2 SPDX-FileCopyrightText: 2017 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: MIT
5*/
6
7#include "cpuinfosource.h"
8
9#include <QSysInfo>
10#include <QThread>
11#include <QVariant>
12
13using namespace KUserFeedback;
14
15CpuInfoSource::CpuInfoSource()
16 : AbstractDataSource(QStringLiteral("cpu"), Provider::DetailedSystemInformation)
17{
18}
19
21{
22 return tr("The amount and type of CPUs in the system.");
23}
24
26{
27 QVariantMap m;
28 m.insert(QStringLiteral("architecture"), QSysInfo::currentCpuArchitecture());
29 m.insert(QStringLiteral("count"), QThread::idealThreadCount());
30 return m;
31}
32
34{
35 return tr("CPU information");
36}
Base class for data sources for telemetry data.
QString description() const override
Returns a human-readable, translated description of what this source provides.
QVariant data() override
Returns the data gathered by this source.
QString name() const override
Returns a short name of this data source.
The central object managing data sources and transmitting feedback to the server.
Definition provider.h:32
Classes for integrating telemetry collection, survey targeting, and contribution encouragenemt and co...
QString currentCpuArchitecture()
int idealThreadCount()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.