| 156 | } |
| 157 | |
| 158 | bool PersistantConfig::Serialize(const rdcstr &filename) |
| 159 | { |
| 160 | if(!filename.isEmpty()) |
| 161 | m_Filename = filename; |
| 162 | |
| 163 | QVariantMap values = storeValues(); |
| 164 | |
| 165 | QFile f(m_Filename); |
| 166 | if(f.open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text)) |
| 167 | return SaveToJSON(values, f, JSON_ID, JSON_VER); |
| 168 | |
| 169 | qWarning() << "Couldn't write to " << QString(m_Filename) << " " << f.errorString(); |
| 170 | |
| 171 | return false; |
| 172 | } |
| 173 | |
| 174 | struct LegacyData |
| 175 | { |
nothing calls this directly
no test coverage detected