+ QString newProfileName = ui.profile_name->text().simplified();
+ QString newGroupName = ui.group_name->text().simplified();
+ if (newGroupName.isEmpty()) newGroupName = i18n("Custom");
+ QString newMetaGroupId = ui.destination_list->itemData(ui.destination_list->currentIndex(), Qt::UserRole).toString();
+
+ QDomDocument doc;
+ QDomElement profileElement = doc.createElement("profile");
+ profileElement.setAttribute("name", newProfileName);
+ profileElement.setAttribute("category", newGroupName);
+ profileElement.setAttribute("destinationid", newMetaGroupId);
+ profileElement.setAttribute("extension", ui.extension->text().simplified());
+ profileElement.setAttribute("args", ui.parameters->toPlainText().simplified());
+ doc.appendChild(profileElement);
+ saveProfile(doc.documentElement());
+
+ parseProfiles(newMetaGroupId, newGroupName, newProfileName);
+ }
+ delete d;
+}
+
+
+void RenderWidget::saveProfile(QDomElement newprofile)
+{
+ QString exportFile = KStandardDirs::locateLocal("appdata", "export/customprofiles.xml");