mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Proper use of QString::arg
This commit is contained in:
parent
3291300d51
commit
0a2f7bd2af
@ -353,7 +353,7 @@ void TranslationLoader::run()
|
|||||||
connect(&manager, &QNetworkAccessManager::finished, &q, &QEventLoop::quit);
|
connect(&manager, &QNetworkAccessManager::finished, &q, &QEventLoop::quit);
|
||||||
|
|
||||||
QString url = "http://api.microsofttranslator.com/V2/Ajax.svc/Translate?appid=%1&from=%2&to=%3&text=%4&contentType=text/plain";
|
QString url = "http://api.microsofttranslator.com/V2/Ajax.svc/Translate?appid=%1&from=%2&to=%3&text=%4&contentType=text/plain";
|
||||||
url = url.arg(APPID).arg(from).arg(to).arg(text);
|
url = url.arg(APPID, from, to, text);
|
||||||
|
|
||||||
QNetworkReply *reply = manager.get(QNetworkRequest(QUrl(url)));
|
QNetworkReply *reply = manager.get(QNetworkRequest(QUrl(url)));
|
||||||
|
|
||||||
@ -396,7 +396,7 @@ void TextToSpeachLoader::run()
|
|||||||
connect(&manager, &QNetworkAccessManager::finished, &q, &QEventLoop::quit);
|
connect(&manager, &QNetworkAccessManager::finished, &q, &QEventLoop::quit);
|
||||||
|
|
||||||
QString url = "http://api.microsofttranslator.com/V2/Ajax.svc/Speak?appid=%1&language=%2&text=%3&contentType=text/plain";
|
QString url = "http://api.microsofttranslator.com/V2/Ajax.svc/Speak?appid=%1&language=%2&text=%3&contentType=text/plain";
|
||||||
url = url.arg(APPID).arg(language).arg(text);
|
url = url.arg(APPID, language, text);
|
||||||
|
|
||||||
QNetworkReply *reply = manager.get(QNetworkRequest(QUrl(url)));
|
QNetworkReply *reply = manager.get(QNetworkRequest(QUrl(url)));
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ void HelpAboutDialog::loadAboutInformation(const QString &path)
|
|||||||
buildNumber = BUILD_NUMBER;
|
buildNumber = BUILD_NUMBER;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
aboutText->setHtml(fileToString(path).arg(VERSION).arg(buildNumber));
|
aboutText->setHtml(fileToString(path).arg(VERSION, buildNumber));
|
||||||
aboutText->moveCursor(QTextCursor::Start);
|
aboutText->moveCursor(QTextCursor::Start);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user