QStringList LmdbApi::callTips(const QStringList& context, int commas, QsciScintilla::CallTipsStyle style, QList<int>& shifts) { for(QStringList::const_iterator it = context.begin(); it != context.end() - 1; ++it){ QString val = *it; for(int i = 0; i < SIZEOFMASS(lmdbCommands); ++i){ CommandInfo cmd = lmdbCommands[i]; QString jval = common::convertFromString<QString>(cmd.name_); if(QString::compare(jval, val, Qt::CaseInsensitive) == 0){ return QStringList() << makeCallTip(cmd); } } } return QStringList(); }
QStringList BaseQsciApiCommandHolder::callTips(const QStringList& context, int commas, QsciScintilla::CallTipsStyle style, QList<int>& shifts) { UNUSED(commas); UNUSED(style); UNUSED(shifts); for (auto it = context.begin(); it != context.end(); ++it) { QString val = *it; for (size_t i = 0; i < commands_.size(); ++i) { core::CommandInfo cmd = commands_[i]; QString jval = common::ConvertFromString<QString>(cmd.name); if (QString::compare(jval, val, Qt::CaseInsensitive) == 0) { return QStringList() << makeCallTip(cmd); } } } return QStringList(); }
QStringList BaseCommandsQsciApi::callTips(const QStringList& context, int commas, QsciScintilla::CallTipsStyle style, QList<int>& shifts) { UNUSED(commas); UNUSED(style); UNUSED(shifts); BaseCommandsQsciLexer* lex = static_cast<BaseCommandsQsciLexer*>(lexer()); auto commands = lex->commands(); for (auto it = context.begin(); it != context.end(); ++it) { QString val = *it; for (size_t i = 0; i < commands.size(); ++i) { core::CommandInfo cmd = commands[i]; QString jval; common::ConvertFromString(cmd.name, &jval); if (QString::compare(jval, val, Qt::CaseInsensitive) == 0) { return QStringList() << makeCallTip(cmd); } } } return QStringList(); }