Replace single-character string with character literal

Also remove unnecessary dynamic allocation.
This commit is contained in:
Chocobo1 2018-07-21 13:28:13 +08:00
parent 7e3cf99bb9
commit 0217d5b4c0
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
32 changed files with 96 additions and 96 deletions

View file

@ -402,7 +402,7 @@ QBtCommandLineParameters parseCommandLine(const QStringList &args)
const QString &arg = args[i];
if ((arg.startsWith("--") && !arg.endsWith(".torrent"))
|| (arg.startsWith("-") && (arg.size() == 2))) {
|| (arg.startsWith('-') && (arg.size() == 2))) {
// Parse known parameters
if (arg == SHOW_HELP_OPTION) {
result.showHelp = true;
@ -499,7 +499,7 @@ QString wrapText(const QString &text, int initialIndentation = USAGE_TEXT_COLUMN
foreach (const QString &word, words.mid(1)) {
if (lines.last().length() + word.length() + 1 < currentLineMaxLength) {
lines.last().append(" " + word);
lines.last().append(' ' + word);
}
else {
lines.append(QString(initialIndentation, ' ') + word);