| 790 | Q_ASSERT(editor); |
| 791 | } |
| 792 | void operator()(const QString& cmd) { |
| 793 | KTextEditor::Command* command = editor->queryCommand( cmd ); |
| 794 | Q_ASSERT(command); |
| 795 | QString msg; |
| 796 | qCDebug(SHELL) << "calling" << cmd; |
| 797 | const auto views = doc->views(); |
| 798 | for (KTextEditor::View* view : views) { |
| 799 | if (!command->exec(view, cmd, msg)) |
| 800 | qCWarning(SHELL) << "setting indentation width failed: " << msg; |
| 801 | } |
| 802 | } |
| 803 | |
| 804 | KTextEditor::Document* doc; |
| 805 | KTextEditor::Editor* editor; |