166 // Done with primitives, now save to a config file |
166 // Done with primitives, now save to a config file |
167 QString path = Config::FilePath ("prims.cfg"); |
167 QString path = Config::FilePath ("prims.cfg"); |
168 QFile conf (path); |
168 QFile conf (path); |
169 |
169 |
170 if (not conf.open (QIODevice::WriteOnly | QIODevice::Text)) |
170 if (not conf.open (QIODevice::WriteOnly | QIODevice::Text)) |
171 CriticalError (format ("Couldn't write primitive list %1: %2", |
171 Critical (format ("Couldn't write primitive list %1: %2", |
172 path, conf.errorString())); |
172 path, conf.errorString())); |
173 else |
173 else |
174 { |
174 { |
175 for (Primitive& info : m_prims) |
175 for (Primitive& info : m_prims) |
176 fprint (conf, "%1 %2\r\n", info.name, info.title); |
176 fprint (conf, "%1 %2\r\n", info.name, info.title); |