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
+3 -3
View File
@@ -87,7 +87,7 @@ CommandPage::CommandPage()
auto *view = layout
.emplace<EditableModelView>(
getIApp()->getCommands()->createModel(nullptr))
getApp()->getCommands()->createModel(nullptr))
.getElement();
view->setTitles({"Trigger", "Command", "Show In\nMessage Menu"});
@@ -95,7 +95,7 @@ CommandPage::CommandPage()
1, QHeaderView::Stretch);
// We can safely ignore this signal connection since we own the view
std::ignore = view->addButtonPressed.connect([] {
getIApp()->getCommands()->items.append(
getApp()->getCommands()->items.append(
Command{"/command", "I made a new command HeyGuys"});
});
@@ -114,7 +114,7 @@ CommandPage::CommandPage()
{
if (int index = line.indexOf(' '); index != -1)
{
getIApp()->getCommands()->items.insert(
getApp()->getCommands()->items.insert(
Command(line.mid(0, index), line.mid(index + 1)));
}
}