From f60ca93db1c7b947a8a3c5f2ec3749350e9cca09 Mon Sep 17 00:00:00 2001 From: sln Date: Fri, 3 Feb 2012 07:05:27 +0000 Subject: [PATCH] GUITHARE 0000928: Performance C3 Protection against loading translators --- src/Qtx/QtxResourceMgr.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Qtx/QtxResourceMgr.cxx b/src/Qtx/QtxResourceMgr.cxx index a6bc30ef7..80e27ee95 100644 --- a/src/Qtx/QtxResourceMgr.cxx +++ b/src/Qtx/QtxResourceMgr.cxx @@ -35,6 +35,7 @@ #endif #include +#include /*! \class QtxResourceMgr::Resources @@ -2488,6 +2489,12 @@ void QtxResourceMgr::removeTranslators( const QString& prefix ) */ void QtxResourceMgr::raiseTranslators( const QString& prefix ) { + static QSet< QString > done; + if ( done.contains( prefix ) ) + return; + + done << prefix; + if ( !myTranslator.contains( prefix ) ) return; -- 2.39.2