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:
parent
97ef641566
commit
ab135f4e8e
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user