valueObject = new IniFileValue(currentPos);
valueObject->name = name;
valueObject->paramValue = value;
+ valueObject->thisOsOnly = thisOsOnly;
section.values.insert(name, valueObject);
}
else {
valueObject = *it;
valueObject->name = name;
valueObject->paramValue = value;
+ valueObject->thisOsOnly = thisOsOnly;
}
// Is this the parameter vwe are looking for?
QVariant IniFileImpl::getValue(QString const & paramName, QVariant const & defaultValue)
{
// Locate the '/' character that separates section names from key names
- int idx = paramName.indexOf('/');
+ int idx = paramName.lastIndexOf('/');
if (idx < 0)
return defaultValue;
bool IniFileImpl::setValue(QString const & paramName, QVariant const & value)
{
// Locate the '/' character that separates section names from key names
- int idx = paramName.indexOf('/');
+ int idx = paramName.lastIndexOf('/', -1);
if (idx < 0)
return false;
#ifdef Q_OS_LINUX
prefix = "linux:";
#endif
-#if Q_OS_WIN32
+#ifdef Q_OS_WIN32
prefix = "windows:";
#endif
}
if (diff)
updateCache(currentPos, diff);
+ // Update the parameter value in the internal cache
+ valueObject->paramValue = valueString;
+
}
f.close();