mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Rename literal operator
Qt 6.4 introduced `QString operator""_s()` and the previous `""_qs` is deprecated since Qt 6.8.
This commit is contained in:
parent
f6b58f36e2
commit
e6d85a468b
141 changed files with 3610 additions and 3604 deletions
|
@ -127,7 +127,7 @@ int main(int argc, char *argv[])
|
|||
if (envValue.isEmpty())
|
||||
qputenv(envName, Application::applicationDirPath().toLocal8Bit());
|
||||
else
|
||||
qputenv(envName, u"%1;%2"_qs.arg(envValue, Application::applicationDirPath()).toLocal8Bit());
|
||||
qputenv(envName, u"%1;%2"_s.arg(envValue, Application::applicationDirPath()).toLocal8Bit());
|
||||
#endif
|
||||
|
||||
const QBtCommandLineParameters params = app->commandLineArgs();
|
||||
|
@ -146,7 +146,7 @@ int main(int argc, char *argv[])
|
|||
return EXIT_SUCCESS;
|
||||
}
|
||||
throw CommandLineParameterError(QCoreApplication::translate("Main", "%1 must be the single command line parameter.")
|
||||
.arg(u"-v (or --version)"_qs));
|
||||
.arg(u"-v (or --version)"_s));
|
||||
}
|
||||
#endif
|
||||
if (params.showHelp)
|
||||
|
@ -157,7 +157,7 @@ int main(int argc, char *argv[])
|
|||
return EXIT_SUCCESS;
|
||||
}
|
||||
throw CommandLineParameterError(QCoreApplication::translate("Main", "%1 must be the single command line parameter.")
|
||||
.arg(u"-h (or --help)"_qs));
|
||||
.arg(u"-h (or --help)"_s));
|
||||
}
|
||||
|
||||
const bool firstTimeUser = !Preferences::instance()->getAcceptedLegal();
|
||||
|
@ -189,7 +189,7 @@ int main(int argc, char *argv[])
|
|||
if (params.shouldDaemonize)
|
||||
{
|
||||
throw CommandLineParameterError(QCoreApplication::translate("Main", "You cannot use %1: qBittorrent is already running for this user.")
|
||||
.arg(u"-d (or --daemon)"_qs));
|
||||
.arg(u"-d (or --daemon)"_s));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -276,11 +276,11 @@ int main(int argc, char *argv[])
|
|||
#if !defined(DISABLE_GUI)
|
||||
void showSplashScreen()
|
||||
{
|
||||
QPixmap splashImg(u":/icons/splash.png"_qs);
|
||||
QPixmap splashImg(u":/icons/splash.png"_s);
|
||||
QPainter painter(&splashImg);
|
||||
const auto version = QStringLiteral(QBT_VERSION);
|
||||
painter.setPen(QPen(Qt::white));
|
||||
painter.setFont(QFont(u"Arial"_qs, 22, QFont::Black));
|
||||
painter.setFont(QFont(u"Arial"_s, 22, QFont::Black));
|
||||
painter.drawText(224 - painter.fontMetrics().horizontalAdvance(version), 270, version);
|
||||
QSplashScreen *splash = new QSplashScreen(splashImg);
|
||||
splash->show();
|
||||
|
@ -317,10 +317,10 @@ bool userAgreesWithLegalNotice()
|
|||
Q_ASSERT(!pref->getAcceptedLegal());
|
||||
|
||||
#ifdef DISABLE_GUI
|
||||
const QString eula = u"\n*** %1 ***\n"_qs.arg(QCoreApplication::translate("Main", "Legal Notice"))
|
||||
const QString eula = u"\n*** %1 ***\n"_s.arg(QCoreApplication::translate("Main", "Legal Notice"))
|
||||
+ QCoreApplication::translate("Main", "qBittorrent is a file sharing program. When you run a torrent, its data will be made available to others by means of upload. Any content you share is your sole responsibility.") + u"\n\n"
|
||||
+ QCoreApplication::translate("Main", "No further notices will be issued.") + u"\n\n"
|
||||
+ QCoreApplication::translate("Main", "Press %1 key to accept and continue...").arg(u"'y'"_qs) + u'\n';
|
||||
+ QCoreApplication::translate("Main", "Press %1 key to accept and continue...").arg(u"'y'"_s) + u'\n';
|
||||
printf("%s", qUtf8Printable(eula));
|
||||
|
||||
const char ret = getchar(); // Read pressed key
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue