summaryrefslogtreecommitdiffstats
path: root/src/crsm.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/crsm.hpp')
-rw-r--r--src/crsm.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/crsm.hpp b/src/crsm.hpp
index cdce0d1..3e11054 100644
--- a/src/crsm.hpp
+++ b/src/crsm.hpp
@@ -65,8 +65,8 @@ public:
void setValue(const QString& val)
{
- QStringList parts = val.split(':', QString::KeepEmptyParts);
- if(parts.length() < 3)
+ QStringList parts = Util::splitEscaped(val, ':', '|');
+ if(parts.length() != 3)
{
throw ConfigException("Cannot read corrupt ScenarioSettings");
}
@@ -77,11 +77,11 @@ public:
config.league = ConfigValueBase::getValue<bool>(parts.first());
parts.removeFirst();
config.randomLeague = false;
- config.wishClient = ConfigValueBase::getValue<ClientInfo>(parts.join(':'));
+ config.wishClient = ConfigValueBase::getValue<ClientInfo>(parts.first());
}
}
- QString value() { return ConfigValueBase::getStringValue(config.name) + ":" + ConfigValueBase::getStringValue(config.league) + ":" + ConfigValueBase::getStringValue(config.wishClient); }
+ QString value() { return Util::joinEscape({ConfigValueBase::getStringValue(config.name), ConfigValueBase::getStringValue(config.league), ConfigValueBase::getStringValue(config.wishClient)}, ':', '|'); }
};
class CRSM : public QObject