1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:37:34 +00:00

LibCore: Convert CTimer to ObjectPtr

This commit is contained in:
Andreas Kling 2019-09-20 15:19:46 +02:00
parent c34fd10b5b
commit 50a6560413
22 changed files with 91 additions and 70 deletions

View file

@ -44,7 +44,7 @@ int main(int argc, char** argv)
button2->set_enabled(false);
auto* progress1 = new GProgressBar(main_widget);
new CTimer(100, [progress1] {
auto timer = CTimer::create(100, [progress1] {
progress1->set_value(progress1->value() + 1);
if (progress1->value() == progress1->max())
progress1->set_value(progress1->min());