Add some tests for NotebookTab (#5070)
* EmptyApplication: Add asserts to rest of getters (except for getSeventvAPI) * Theme: make getTheme call getIApp()->getThemes() instead this allows it to be used in tests realistically this should be deprecated & users of it should just call getIApp()->getThemes() directly * Use getIApp() instead of getApp() in a few places
This commit is contained in:
@@ -588,11 +588,13 @@ void Notebook::updateTabVisibility()
|
||||
|
||||
void Notebook::updateTabVisibilityMenuAction()
|
||||
{
|
||||
auto toggleSeq = getApp()->hotkeys->getDisplaySequence(
|
||||
const auto *hotkeys = getIApp()->getHotkeys();
|
||||
|
||||
auto toggleSeq = hotkeys->getDisplaySequence(
|
||||
HotkeyCategory::Window, "setTabVisibility", {std::vector<QString>()});
|
||||
if (toggleSeq.isEmpty())
|
||||
{
|
||||
toggleSeq = getApp()->hotkeys->getDisplaySequence(
|
||||
toggleSeq = hotkeys->getDisplaySequence(
|
||||
HotkeyCategory::Window, "setTabVisibility", {{"toggle"}});
|
||||
}
|
||||
|
||||
@@ -601,12 +603,12 @@ void Notebook::updateTabVisibilityMenuAction()
|
||||
// show contextual shortcuts
|
||||
if (this->getShowTabs())
|
||||
{
|
||||
toggleSeq = getApp()->hotkeys->getDisplaySequence(
|
||||
toggleSeq = hotkeys->getDisplaySequence(
|
||||
HotkeyCategory::Window, "setTabVisibility", {{"off"}});
|
||||
}
|
||||
else if (!this->getShowTabs())
|
||||
{
|
||||
toggleSeq = getApp()->hotkeys->getDisplaySequence(
|
||||
toggleSeq = hotkeys->getDisplaySequence(
|
||||
HotkeyCategory::Window, "setTabVisibility", {{"on"}});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user