Commit c229beef authored by Volker Krause's avatar Volker Krause
Browse files

Don't leak data sources

parent 0786ffba
......@@ -48,6 +48,7 @@ class ProviderPrivate
{
public:
ProviderPrivate(Provider *qq);
~ProviderPrivate();
void reset();
int currentApplicationTime() const;
......@@ -121,6 +122,11 @@ ProviderPrivate::ProviderPrivate(Provider *qq)
QObject::connect(&encouragementTimer, SIGNAL(timeout()), q, SLOT(emitShowEncouragementMessage()));
}
ProviderPrivate::~ProviderPrivate()
{
qDeleteAll(dataSources);
}
void ProviderPrivate::reset()
{
startCount = 0;
......
......@@ -63,7 +63,7 @@ public:
void setStatisticsCollectionMode(StatisticsCollectionMode mode);
/** Adds a data source for statistical data collection.
* @param source The data source to add.
* @param source The data source to add. The Provider takes ownership of @p source.
* @param mode The statistics collection mode this source belongs to. Data is only
* send to the server for this source is a sufficiently high collection mode is configured
* by the user. @c NoStatistics is not allowed.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment