chore: remove Singleton & replace getIApp with getApp (#5514)

This commit is contained in:
pajlada
2024-07-21 15:09:59 +02:00
committed by GitHub
parent 21186df058
commit 5deec1f02f
145 changed files with 802 additions and 856 deletions
+5 -5
View File
@@ -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);
});
+1 -1
View File
@@ -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()