Add widget to select langage, must relauch qet for make change

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2762 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2014-01-21 19:23:44 +00:00
parent f426aba3a6
commit e8475c833e
7 changed files with 78 additions and 14 deletions

View File

@@ -16,6 +16,8 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "nameslist.h"
#include "qetapp.h"
// make this class usable with QVariant
int NamesList::MetaTypeId = qRegisterMetaType<NamesList>("NamesList");
@@ -201,8 +203,7 @@ bool NamesList::operator==(const NamesList &nl) const {
@return The adequate name regarding the current system locale.
*/
QString NamesList::name(const QString &fallback_name) const {
// recupere les deux premiers caracteres de la locale en cours du systeme
QString system_language = QLocale::system().name().left(2);
QString system_language = QETApp::langFromSetting();
QString returned_name;
if (!hash_names[system_language].isEmpty()) {
returned_name = hash_names[system_language];