X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fcliparser.cpp;fp=src%2Fcommon%2Fcliparser.cpp;h=5168ea22e0a9fc27ad0259d91b0751d6b8e0ecb9;hp=350d8125a559d653aaaf7025b3ee2b7617802149;hb=40601ae070413b727a68e35e5b8c619176c661b1;hpb=73b7e9b2e6b0742e344238c6ebac05919efd914b diff --git a/src/common/cliparser.cpp b/src/common/cliparser.cpp index 350d8125..5168ea22 100644 --- a/src/common/cliparser.cpp +++ b/src/common/cliparser.cpp @@ -126,8 +126,8 @@ bool CliParser::init(const QStringList &args) // if next arg is a short/long option/switch the current arg is one too if (nextArg == argsRaw.constEnd() || nextArg->startsWith("-")) { // switch - for (int i = 0; i < currentArg->mid(1).toAscii().size(); i++) { - name = currentArg->mid(1).toAscii().at(i); + for (int i = 0; i < currentArg->mid(1).toLatin1().size(); i++) { + name = currentArg->mid(1).toLatin1().at(i); if (!addShortArg(CliParserArg::CliArgSwitch, name)) return false; } } @@ -135,7 +135,7 @@ bool CliParser::init(const QStringList &args) else { // option // short options are not freely mixable with other shortargs - if (currentArg->mid(1).toAscii().size() > 1) { + if (currentArg->mid(1).toLatin1().size() > 1) { qWarning() << "Warning: Shortoptions may not be combined with other shortoptions or switches"; return false; } @@ -146,7 +146,7 @@ bool CliParser::init(const QStringList &args) skipNext = true; } else value = currentArg->toLocal8Bit(); - name = currentArg->mid(1).toAscii().at(0); + name = currentArg->mid(1).toLatin1().at(0); // we took one argument as argument to an option so skip it next time if (skipNext) currentArg++; if (!addShortArg(CliParserArg::CliArgOption, name, value)) return false;