chore: remove Singleton & replace getIApp with getApp (#5514)
This commit is contained in:
@@ -41,7 +41,7 @@ void initUpdateButton(Button &button,
|
||||
}
|
||||
break;
|
||||
case UpdateDialog::Install: {
|
||||
getIApp()->getUpdates().installUpdates();
|
||||
getApp()->getUpdates().installUpdates();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -53,17 +53,17 @@ void initUpdateButton(Button &button,
|
||||
|
||||
// update image when state changes
|
||||
auto updateChange = [&button](auto) {
|
||||
button.setVisible(getIApp()->getUpdates().shouldShowUpdateButton());
|
||||
button.setVisible(getApp()->getUpdates().shouldShowUpdateButton());
|
||||
|
||||
const auto *imageUrl = getIApp()->getUpdates().isError()
|
||||
const auto *imageUrl = getApp()->getUpdates().isError()
|
||||
? ":/buttons/updateError.png"
|
||||
: ":/buttons/update.png";
|
||||
button.setPixmap(QPixmap(imageUrl));
|
||||
};
|
||||
|
||||
updateChange(getIApp()->getUpdates().getStatus());
|
||||
updateChange(getApp()->getUpdates().getStatus());
|
||||
|
||||
signalHolder.managedConnect(getIApp()->getUpdates().statusUpdated,
|
||||
signalHolder.managedConnect(getApp()->getUpdates().statusUpdated,
|
||||
[updateChange](auto status) {
|
||||
updateChange(status);
|
||||
});
|
||||
|
||||
@@ -183,7 +183,7 @@ void openStreamlinkForChannel(const QString &channel)
|
||||
{
|
||||
static const QString INFO_TEMPLATE("Opening %1 in Streamlink ...");
|
||||
|
||||
auto *currentPage = dynamic_cast<SplitContainer *>(getIApp()
|
||||
auto *currentPage = dynamic_cast<SplitContainer *>(getApp()
|
||||
->getWindows()
|
||||
->getMainWindow()
|
||||
.getNotebook()
|
||||
|
||||
Reference in New Issue
Block a user