NamesList: Use ‘Qmap’ instead of ‘Qhash’

to automatically sort the names of an element by
language code before saving the element-file.
Added English comment in header-file.
This commit is contained in:
plc-user
2025-02-03 13:23:32 +01:00
parent 7a39e69a32
commit 25a81f24fa
2 changed files with 25 additions and 18 deletions

View File

@@ -21,6 +21,12 @@
#include <QtXml>
/**
This class represents a list of names, used by elements and categories
to embed the same name in several languages.
Languages are represented by two or five letters (typically the first
two of the system locale); examples: en for English, fr for French,
pt_BR for Brazilian Portuguese.
French:
Cette classe represente une liste de noms, utilisee
par les elements et categories pour embarquer un meme nom en plusieurs
langues.
@@ -36,7 +42,7 @@ class NamesList {
// attributes
private:
QHash<QString, QString> hash_names;
QMap<QString, QString> map_names;
public:
static int MetaTypeId;