/* * show all the commands supported by KTextEditor * It's a debug function */ void EditorPage::aboutCommand() { KTextEditor::Editor *editor = m_pDoc->editor(); KTextEditor::CommandInterface *iface = qobject_cast<KTextEditor::CommandInterface *>(editor); if (iface == NULL) { qDebug("CommandInterface cast failed"); return; } QString msg; const QString cmd("set-tab-width"); KTextEditor::Command *pcmd = iface->queryCommand(cmd); QStringList list = pcmd->cmds(); #if 0 for (int i = 0; i < list.size(); i++) qDebug("cmd: %s", list[i].toAscii().data()); #endif if (pcmd) { pcmd->help(m_pView, cmd, msg); qDebug("%s", msg.toAscii().data()); } else { qDebug("no this cmd"); } }