mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-07 14:44:01 +00:00
Remove letter case constraint on URI Handler (BYE==bye==Bye etc.)
This commit is contained in:
parent
aa11d879ef
commit
cdaf53f2aa
1 changed files with 4 additions and 4 deletions
|
|
@ -395,7 +395,7 @@ QString Cli::Command::getFunctionSyntax () const {
|
|||
// FIXME: Do not accept args without value like: cmd toto.
|
||||
// In the future `toto` could be a boolean argument.
|
||||
QRegExp Cli::mRegExpArgs("(?:(?:([\\w-]+)\\s*)=\\s*(?:\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\"|([^\\s]+)\\s*))");
|
||||
QRegExp Cli::mRegExpFunctionName("^\\s*([a-z-]+)\\s*");
|
||||
QRegExp Cli::mRegExpFunctionName("^\\s*([A-Z-]+)\\s*");
|
||||
|
||||
QMap<QString, Cli::Command> Cli::mCommands = {
|
||||
createCommand("show", QT_TR_NOOP("showFunctionDescription"), cliShow, QHash<QString, Argument>(), true),
|
||||
|
|
@ -503,13 +503,13 @@ pair<QString, Cli::Command> Cli::createCommand (
|
|||
const QHash<QString, Argument> &argsScheme,
|
||||
const bool &genericArguments
|
||||
) {
|
||||
return { functionName, Cli::Command(functionName, functionDescription, function, argsScheme, genericArguments) };
|
||||
return { functionName.toUpper(), Cli::Command(functionName.toUpper(), functionDescription, function, argsScheme, genericArguments) };
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
QString Cli::parseFunctionName (const QString &command) {
|
||||
mRegExpFunctionName.indexIn(command);
|
||||
mRegExpFunctionName.indexIn(command.toUpper());
|
||||
if (mRegExpFunctionName.pos(1) == -1) {
|
||||
qWarning() << QStringLiteral("Unable to parse function name of command: `%1`.").arg(command);
|
||||
return QString("");
|
||||
|
|
@ -530,7 +530,7 @@ QHash<QString, QString> Cli::parseArgs (const QString &command) {
|
|||
QHash<QString, QString> args;
|
||||
int pos = 0;
|
||||
|
||||
while ((pos = mRegExpArgs.indexIn(command, pos)) != -1) {
|
||||
while ((pos = mRegExpArgs.indexIn(command.toUpper(), pos)) != -1) {
|
||||
pos += mRegExpArgs.matchedLength();
|
||||
args[mRegExpArgs.cap(1)] = (mRegExpArgs.cap(2).isEmpty() ? mRegExpArgs.cap(3) : mRegExpArgs.cap(2));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue