QPointer<KoUpdater> KoProgressUpdater::startSubtask(int weight, const QString &name) { KoUpdaterPrivate *p = new KoUpdaterPrivate(this, weight, name); d->totalWeight += weight; d->subtasks.append(p); connect(p, SIGNAL(sigUpdated()), SLOT(update())); QPointer<KoUpdater> updater = new KoUpdater(p); d->subTaskWrappers.append(updater); return updater; }
bool FPSCalculator::funck() { long long diff; long long now = direct_clock_get_millis(); _frames++; diff = now - _fpsTime; if (diff >= 1000) { _fps = _frames * 1000 / (float) (diff); _fpsTime = now; _frames = 0; sigUpdated(_fps); } return true; }