From 4d9620977c81401f88212196b1d1a1094fc19699 Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Tue, 12 Jan 2021 16:28:06 +0200 Subject: Fix translating from component script Translate using QCoreApplication::translate instead of QObject::tr. Removed the use of obsolete installTranslatorFunctions() function. Task-number: QTIFW-392 Change-Id: Icdd67efb6889acd26d63297fb89945c3431c881c Reviewed-by: Arttu Tarkiainen --- src/libs/installer/scriptengine_p.h | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'src/libs/installer/scriptengine_p.h') diff --git a/src/libs/installer/scriptengine_p.h b/src/libs/installer/scriptengine_p.h index bf8240d98..c5f04c0dc 100644 --- a/src/libs/installer/scriptengine_p.h +++ b/src/libs/installer/scriptengine_p.h @@ -125,24 +125,6 @@ private: ScriptEngine *m_engine; }; -#if QT_VERSION < 0x050400 -class QCoreApplicationProxy : public QObject -{ - Q_OBJECT - Q_DISABLE_COPY(QCoreApplicationProxy) - -public: - QCoreApplicationProxy() {} - -public slots: - QString qsTr(const QString &text = QString(), const QString &disambiguation = QString(), int n = -1) const - { - return QCoreApplication::translate(QCoreApplication::applicationName().toUtf8().constData(), - text.toUtf8().constData(), disambiguation.toUtf8().constData(), n); - } -}; -#endif - class GuiProxy : public QObject { Q_OBJECT @@ -198,8 +180,5 @@ Q_DECLARE_METATYPE(QInstaller::ConsoleProxy*) Q_DECLARE_METATYPE(QInstaller::InstallerProxy*) Q_DECLARE_METATYPE(QInstaller::QFileDialogProxy*) Q_DECLARE_METATYPE(QInstaller::QDesktopServicesProxy*) -#if QT_VERSION < 0x050400 -Q_DECLARE_METATYPE(QInstaller::QCoreApplicationProxy*) -#endif #endif // SCRIPTENGINE_H -- cgit v1.2.3