mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 07:46:17 -07:00
Drop Qt 4 support
This commit is contained in:
parent
60998a68eb
commit
e64bb1de8c
67 changed files with 48 additions and 8809 deletions
|
@ -271,20 +271,12 @@ void AbstractWebApplication::translateDocument(QString& data)
|
|||
if (isTranslationNeeded) {
|
||||
QString context = regex.cap(4);
|
||||
if (context.length() > 0) {
|
||||
#ifndef QBT_USES_QT5
|
||||
translation = qApp->translate(context.toUtf8().constData(), word.constData(), 0, QCoreApplication::UnicodeUTF8, 1);
|
||||
#else
|
||||
translation = qApp->translate(context.toUtf8().constData(), word.constData(), 0, 1);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
size_t context_index = 0;
|
||||
while ((context_index < context_count) && (translation == word)) {
|
||||
#ifndef QBT_USES_QT5
|
||||
translation = qApp->translate(contexts[context_index].c_str(), word.constData(), 0, QCoreApplication::UnicodeUTF8, 1);
|
||||
#else
|
||||
translation = qApp->translate(contexts[context_index].c_str(), word.constData(), 0, 1);
|
||||
#endif
|
||||
++context_index;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue