renamed getInstance() -> instance() for singletons
This commit is contained in:
@@ -26,7 +26,7 @@ UpdateDialog::UpdateDialog()
|
||||
auto dismiss = buttons->addButton("Dismiss", QDialogButtonBox::RejectRole);
|
||||
|
||||
QObject::connect(install, &QPushButton::clicked, this, [this] {
|
||||
Updates::getInstance().installUpdates();
|
||||
Updates::instance().installUpdates();
|
||||
this->close();
|
||||
});
|
||||
QObject::connect(dismiss, &QPushButton::clicked, this, [this] {
|
||||
@@ -34,9 +34,9 @@ UpdateDialog::UpdateDialog()
|
||||
this->close();
|
||||
});
|
||||
|
||||
this->updateStatusChanged(Updates::getInstance().getStatus());
|
||||
this->updateStatusChanged(Updates::instance().getStatus());
|
||||
this->connections_.managedConnect(
|
||||
Updates::getInstance().statusUpdated,
|
||||
Updates::instance().statusUpdated,
|
||||
[this](auto status) { this->updateStatusChanged(status); });
|
||||
|
||||
this->setScaleIndependantHeight(150);
|
||||
@@ -50,17 +50,17 @@ void UpdateDialog::updateStatusChanged(Updates::Status status)
|
||||
{
|
||||
case Updates::UpdateAvailable: {
|
||||
this->ui_.label->setText(
|
||||
(Updates::getInstance().isDowngrade()
|
||||
(Updates::instance().isDowngrade()
|
||||
? QString(
|
||||
"The version online (%1) seems to be lower than the "
|
||||
"current (%2).\nEither a version was reverted or "
|
||||
"you are running a newer build.\n\nDo you want to "
|
||||
"download and install it?")
|
||||
.arg(Updates::getInstance().getOnlineVersion(),
|
||||
Updates::getInstance().getCurrentVersion())
|
||||
.arg(Updates::instance().getOnlineVersion(),
|
||||
Updates::instance().getCurrentVersion())
|
||||
: QString("An update (%1) is available.\n\nDo you want to "
|
||||
"download and install it?")
|
||||
.arg(Updates::getInstance().getOnlineVersion())));
|
||||
.arg(Updates::instance().getOnlineVersion())));
|
||||
this->updateGeometry();
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user