last code patch from gta5sync
This commit is contained in:
parent
15255874ff
commit
f62b1b08c0
22 changed files with 208 additions and 201 deletions
|
@ -37,8 +37,7 @@ QMap<QString, QString> GlobalString::getGlobalMap()
|
|||
QSettings globalFile(getLanguageFile(), QSettings::IniFormat);
|
||||
globalFile.setIniCodec("UTF-8");
|
||||
globalFile.beginGroup("Global");
|
||||
QStringList globalStrList = globalFile.childKeys();
|
||||
foreach(const QString &globalStr, globalStrList)
|
||||
for (QString globalStr : globalFile.childKeys())
|
||||
{
|
||||
globalMap[globalStr] = globalFile.value(globalStr, globalStr).toString();
|
||||
}
|
||||
|
@ -55,7 +54,7 @@ QString GlobalString::getString(QString valueStr, bool *ok)
|
|||
QStringList globalStrList = globalFile.childKeys();
|
||||
if (globalStrList.contains(valueStr))
|
||||
{
|
||||
if (ok != NULL) *ok = true;
|
||||
if (ok != nullptr) *ok = true;
|
||||
globalString = globalFile.value(valueStr, valueStr).toString();
|
||||
}
|
||||
globalFile.endGroup();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue