Don't always load the timetracker

It has a timer that wakes up every 2 seconds and drains my battery just
simply because I have debug builds. This make it on demand.

Don't track containments twice.
Containments inherit from Applets which also have the same line

Change-Id: Ia9a9b58a0b1197083d692c58e4ce75838c311db4
REVIEW: 126472
This commit is contained in:
David Edmundson 2015-12-27 19:37:30 +00:00 committed by David Edmundson
parent 97ef641566
commit ab135f4e8e
3 changed files with 6 additions and 6 deletions

View File

@ -60,7 +60,9 @@ Corona::Corona(QObject *parent)
d->init();
#ifndef NDEBUG
new Plasma::TimeTracker(this);
if (qEnvironmentVariableIsSet("PLASMA_TRACK_STARTUP")) {
new TimeTracker(this);
}
#endif
}

View File

@ -84,7 +84,9 @@ AppletPrivate::AppletPrivate(KService::Ptr service, const KPluginInfo *info, int
QObject::connect(actions->action(QStringLiteral("configure")), SIGNAL(triggered()),
q, SLOT(requestConfiguration()));
#ifndef NDEBUG
new TimeTracker(q);
if (qEnvironmentVariableIsSet("PLASMA_TRACK_STARTUP")) {
new TimeTracker(q);
}
#endif
}

View File

@ -57,10 +57,6 @@ ContainmentPrivate::ContainmentPrivate(Containment *c):
if (appletParent) {
QObject::connect(appletParent->containment(), &Containment::screenChanged, c, &Containment::screenChanged);
}
#ifndef NDEBUG
new TimeTracker(q);
#endif
}
Plasma::ContainmentPrivate::~ContainmentPrivate()