File tree 1 file changed +13
-2
lines changed
1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -242,7 +242,15 @@ void QgsEditFormConfig::readXml( const QDomNode& node )
242
242
for ( int j = 0 ; j < cfgElem.attributes ().size (); ++j )
243
243
{
244
244
QDomAttr attr = cfgElem.attributes ().item ( j ).toAttr ();
245
- cfg[attr.name ()] = attr.value ();
245
+ cfg.insert ( attr.name (), attr.value () );
246
+ }
247
+
248
+ QDomNodeList optionElements = cfgElem.elementsByTagName ( " option" );
249
+ for ( int j = 0 ; j < optionElements.size (); ++j )
250
+ {
251
+ QString key = optionElements.at ( j ).toElement ().attribute ( " key" );
252
+ QString value = optionElements.at ( j ).toElement ().attribute ( " value" );
253
+ cfg.insert ( key, value );
246
254
}
247
255
248
256
setWidgetConfig ( wdgElem.attribute ( " name" ), cfg );
@@ -337,7 +345,10 @@ void QgsEditFormConfig::writeXml( QDomNode& node ) const
337
345
338
346
while ( cfgIt != configIt.value ().constEnd () )
339
347
{
340
- configElem.setAttribute ( cfgIt.key (), cfgIt.value ().toString () );
348
+ QDomElement optionElem = doc.createElement ( " option" );
349
+ optionElem.setAttribute ( " key" , cfgIt.key () );
350
+ optionElem.setAttribute ( " value" , cfgIt.value ().toString () );
351
+ configElem.appendChild ( optionElem );
341
352
++cfgIt;
342
353
}
343
354
You can’t perform that action at this time.
0 commit comments