MCPcopy Create free account
hub / github.com/baldurk/renderdoc / Deserialize

Method Deserialize

qrenderdoc/Code/Interface/PersistantConfig.cpp:129–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129bool PersistantConfig::Deserialize(const rdcstr &filename)
130{
131 QFile f(filename);
132
133 m_Filename = filename;
134
135 // silently allow missing configs
136 if(!f.exists())
137 return true;
138
139 if(f.open(QIODevice::ReadOnly | QIODevice::Text))
140 {
141 QVariantMap values;
142
143 bool success = LoadFromJSON(values, f, JSON_ID, JSON_VER);
144
145 if(!success)
146 return false;
147
148 applyValues(values);
149
150 return true;
151 }
152
153 qInfo() << "Couldn't load layout from " << QString(filename) << " " << f.errorString();
154
155 return false;
156}
157
158bool PersistantConfig::Serialize(const rdcstr &filename)
159{

Callers

nothing calls this directly

Calls 5

LoadFromJSONFunction · 0.85
existsMethod · 0.80
errorStringMethod · 0.80
QStringFunction · 0.50
openMethod · 0.45

Tested by

no test coverage detected