windeployqt combines all translations into one file.

This commit is contained in:
Roman Telezhynskyi 2023-01-18 14:57:38 +02:00
parent 521c156736
commit 7b755b6130
2 changed files with 6 additions and 0 deletions

View File

@ -268,6 +268,7 @@ void VAbstractApplication::LoadTranslation(QString locale)
LoadQM(qtTranslator, QStringLiteral("qt_"), locale, qtQmDir);
installTranslator(qtTranslator);
#if defined(Q_OS_WIN) && !defined(QBS_BUILD)
qtxmlTranslator = new QTranslator(this);
LoadQM(qtxmlTranslator, QStringLiteral("qtxmlpatterns_"), locale, qtQmDir);
installTranslator(qtxmlTranslator);
@ -275,6 +276,7 @@ void VAbstractApplication::LoadTranslation(QString locale)
qtBaseTranslator = new QTranslator(this);
LoadQM(qtBaseTranslator, QStringLiteral("qtbase_"), locale, qtQmDir);
installTranslator(qtBaseTranslator);
#endif // defined(Q_OS_WIN) && !defined(QBS_BUILD)
appTranslator = new QTranslator(this);
LoadQM(appTranslator, QStringLiteral("valentina_"), locale, appQmDir);
@ -296,6 +298,7 @@ void VAbstractApplication::ClearTranslation()
delete qtTranslator;
}
#if defined(Q_OS_WIN) && !defined(QBS_BUILD)
if (not qtxmlTranslator.isNull())
{
removeTranslator(qtxmlTranslator);
@ -307,6 +310,7 @@ void VAbstractApplication::ClearTranslation()
removeTranslator(qtBaseTranslator);
delete qtBaseTranslator;
}
#endif // defined(Q_OS_WIN) && !defined(QBS_BUILD)
if (not appTranslator.isNull())
{

View File

@ -99,8 +99,10 @@ protected:
VCommonSettings *settings{nullptr};
QPointer<QTranslator> qtTranslator{nullptr};
#if defined(Q_OS_WIN) && !defined(QBS_BUILD)
QPointer<QTranslator> qtxmlTranslator{nullptr};
QPointer<QTranslator> qtBaseTranslator{nullptr};
#endif // defined(Q_OS_WIN) && !defined(QBS_BUILD)
QPointer<QTranslator> appTranslator{nullptr};
QPointer<QTranslator> pmsTranslator{nullptr};