renamed getInstance() -> instance() for singletons

This commit is contained in:
fourtf
2019-10-07 22:42:34 +02:00
parent aeab038bc8
commit 6f710823ed
37 changed files with 77 additions and 77 deletions
+5 -5
View File
@@ -27,7 +27,7 @@ void initUpdateButton(Button &button,
}
break;
case UpdateDialog::Install: {
Updates::getInstance().installUpdates();
Updates::instance().installUpdates();
}
break;
}
@@ -39,18 +39,18 @@ void initUpdateButton(Button &button,
// update image when state changes
auto updateChange = [&button](auto) {
button.setVisible(Updates::getInstance().shouldShowUpdateButton());
button.setVisible(Updates::instance().shouldShowUpdateButton());
auto imageUrl = Updates::getInstance().isError()
auto imageUrl = Updates::instance().isError()
? ":/buttons/updateError.png"
: ":/buttons/update.png";
button.setPixmap(QPixmap(imageUrl));
};
updateChange(Updates::getInstance().getStatus());
updateChange(Updates::instance().getStatus());
signalHolder.managedConnect(
Updates::getInstance().statusUpdated,
Updates::instance().statusUpdated,
[updateChange](auto status) { updateChange(status); });
}