void EditorTab::FormatCode(void) { if (currentIndex() < 0) { return; } if (tabType(currentIndex() == MM::codeTab)) { Editor * editor = (Editor *)widget(currentIndex()); editor->CodeBeautifier(); } }