[PC-BSD Commits] r19690 - pcbsd-projects/PCDM
svn at pcbsd.org
svn at pcbsd.org
Tue Oct 16 07:49:18 PDT 2012
Author: kenmoore
Date: 2012-10-16 14:49:18 +0000 (Tue, 16 Oct 2012)
New Revision: 19690
Modified:
pcbsd-projects/PCDM/pcdm-gui.cpp
Log:
Add a couple additional checks before loading/unloading the translator for PCDM
Modified: pcbsd-projects/PCDM/pcdm-gui.cpp
===================================================================
--- pcbsd-projects/PCDM/pcdm-gui.cpp 2012-10-16 13:50:05 UTC (rev 19689)
+++ pcbsd-projects/PCDM/pcdm-gui.cpp 2012-10-16 14:49:18 UTC (rev 19690)
@@ -285,10 +285,13 @@
this->setLocale(locale);
//this->setDefaultLocale(locale);
//Change the translator
- Backend::log("Remove the translator");
- QCoreApplication::removeTranslator(m_translator);
- Backend::log("load the new translator");
+ if( !m_translator->isEmpty() ){
+ Backend::log("Remove the translator");
+ QCoreApplication::removeTranslator(m_translator);
+ }
+
if(m_translator->load(translationFile)){
+ Backend::log("Install the new translator");
QCoreApplication::installTranslator(m_translator);
}
//Re-draw the interface
More information about the Commits
mailing list