Commit 62c837f1 authored by Pino Toscano's avatar Pino Toscano Committed by Albert Astals Cid
Browse files

Store the untranslated name in division

It will be needed to distinguish them without using translations.
parent d2f3ac47
...@@ -41,6 +41,11 @@ bool division::canAsk(askMode am) const ...@@ -41,6 +41,11 @@ bool division::canAsk(askMode am) const
return can; return can;
} }
QString division::getUntranslatedName() const
{
return p_untranslatedName;
}
QString division::getName() const QString division::getName() const
{ {
return p_name; return p_name;
...@@ -81,6 +86,11 @@ void division::setCanAsk(int askMode) ...@@ -81,6 +86,11 @@ void division::setCanAsk(int askMode)
p_askMode = askMode; p_askMode = askMode;
} }
void division::setUntranslatedName(const QString &name)
{
p_untranslatedName = name;
}
void division::setName(const QString &name) void division::setName(const QString &name)
{ {
p_name = name; p_name = name;
......
...@@ -25,6 +25,7 @@ class division ...@@ -25,6 +25,7 @@ class division
eFlag = 4}; eFlag = 4};
bool canAsk(askMode am) const; bool canAsk(askMode am) const;
QString getUntranslatedName() const;
QString getName() const; QString getName() const;
QRgb getRGB() const; QRgb getRGB() const;
QString getFlagFile() const; QString getFlagFile() const;
...@@ -34,12 +35,13 @@ class division ...@@ -34,12 +35,13 @@ class division
void setCapital(const QString &name); void setCapital(const QString &name);
void setFalseCapitals(const QStringList &falseCapitals); void setFalseCapitals(const QStringList &falseCapitals);
void setCanAsk(int askMode); void setCanAsk(int askMode);
void setUntranslatedName(const QString &name);
void setName(const QString &name); void setName(const QString &name);
void setRGB(int r, int g, int b); void setRGB(int r, int g, int b);
bool setFlagFile(const QString &path); bool setFlagFile(const QString &path);
private: private:
QString p_name, p_flagFile, p_capital; QString p_untranslatedName, p_name, p_flagFile, p_capital;
QStringList p_falseCapitals; QStringList p_falseCapitals;
QRgb p_color; QRgb p_color;
int p_askMode; int p_askMode;
......
...@@ -107,7 +107,8 @@ KGmap *mapReader::parseMap(const QString &path) ...@@ -107,7 +107,8 @@ KGmap *mapReader::parseMap(const QString &path)
division *kgdiv = new division(); division *kgdiv = new division();
// division name // division name
kgdiv -> setName( getElementString(QStringLiteral("name"), divisionTag, Mandatory) ); kgdiv -> setUntranslatedName( getElementString(QStringLiteral("name"), divisionTag, Mandatory) );
kgdiv -> setName( kgdiv -> getUntranslatedName() );
// division capital // division capital
QString capital = getElementString(QStringLiteral("capital"), divisionTag, Optional); QString capital = getElementString(QStringLiteral("capital"), divisionTag, Optional);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment