mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 01:33:07 -07:00
Use lightweight printf instead of iostream
Using iostream usually adds a lot of other operators (<<, endl), whereas *printf takes only 1 function call. Also use qUtf8Printable whenever possible.
This commit is contained in:
parent
ccc91e2e52
commit
37ea01bd44
6 changed files with 29 additions and 26 deletions
|
@ -32,7 +32,7 @@
|
|||
|
||||
#include "cmdoptions.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <cstdio>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QFileInfo>
|
||||
|
@ -578,7 +578,7 @@ QString makeUsage(const QString &prgName)
|
|||
void displayUsage(const QString &prgName)
|
||||
{
|
||||
#ifndef Q_OS_WIN
|
||||
std::cout << qPrintable(makeUsage(prgName)) << std::endl;
|
||||
printf("%s\n", qUtf8Printable(makeUsage(prgName)));
|
||||
#else
|
||||
QMessageBox msgBox(QMessageBox::Information, QObject::tr("Help"), makeUsage(prgName), QMessageBox::Ok);
|
||||
msgBox.show(); // Need to be shown or to moveToCenter does not work
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue