| 91 | } |
| 92 | |
| 93 | void PartController::setShowTextEditorStatusBar(bool show) |
| 94 | { |
| 95 | Q_D(PartController); |
| 96 | |
| 97 | if (d->m_showTextEditorStatusBar == show) |
| 98 | return; |
| 99 | |
| 100 | d->m_showTextEditorStatusBar = show; |
| 101 | |
| 102 | // update |
| 103 | const auto areas = Core::self()->uiControllerInternal()->allAreas(); |
| 104 | for (Sublime::Area* area : areas) { |
| 105 | const auto views = area->views(); |
| 106 | for (const auto* const view : views) { |
| 107 | auto* const widget = view->widget(); |
| 108 | if (!widget) { |
| 109 | continue; |
| 110 | } |
| 111 | |
| 112 | auto* const textView = qobject_cast<KTextEditor::View*>(widget); |
| 113 | if (textView) { |
| 114 | textView->setStatusBarEnabled(show); |
| 115 | } |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | // also notify active view that it should update the "view status" |
| 120 | auto* textView = qobject_cast<TextView*>(Core::self()->uiControllerInternal()->activeSublimeWindow()->activeView()); |
| 121 | if (textView) { |
| 122 | emit textView->statusChanged(textView); |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | //MOVE BACK TO DOCUMENTCONTROLLER OR MULTIBUFFER EVENTUALLY |
| 127 | bool PartController::isTextType(const QMimeType& mimeType) |
nothing calls this directly
no test coverage detected