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
+6 -6
View File
@@ -86,8 +86,8 @@ NotebookTab::NotebookTab(Notebook *notebook)
[this]() {
this->notebook_->removePage(this->page);
},
getIApp()->getHotkeys()->getDisplaySequence(HotkeyCategory::Window,
"removeTab"));
getApp()->getHotkeys()->getDisplaySequence(HotkeyCategory::Window,
"removeTab"));
this->menu_.addAction(
"Popup Tab",
@@ -97,8 +97,8 @@ NotebookTab::NotebookTab(Notebook *notebook)
container->popup();
}
},
getIApp()->getHotkeys()->getDisplaySequence(HotkeyCategory::Window,
"popup", {{"window"}}));
getApp()->getHotkeys()->getDisplaySequence(HotkeyCategory::Window,
"popup", {{"window"}}));
this->menu_.addAction("Duplicate Tab", [this]() {
this->notebook_->duplicatePage(this->page);
@@ -199,7 +199,7 @@ int NotebookTab::normalTabWidthForHeight(int height) const
int width = 0;
QFontMetrics metrics =
getIApp()->getFonts()->getFontMetrics(FontStyle::UiTabs, scale);
getApp()->getFonts()->getFontMetrics(FontStyle::UiTabs, scale);
if (this->hasXButton())
{
@@ -291,7 +291,7 @@ const QString &NotebookTab::getTitle() const
void NotebookTab::titleUpdated()
{
// Queue up save because: Tab title changed
getIApp()->getWindows()->queueSave();
getApp()->getWindows()->queueSave();
this->notebook_->refresh();
this->updateSize();
this->update();