chore: remove Singleton & replace getIApp with getApp (#5514)
This commit is contained in:
@@ -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)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user