renamed getInstance() -> instance() for singletons
This commit is contained in:
@@ -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); });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user