Fixed: Exports aren't sorted consistently (#2108661)
Merge changes from bdmayes (rev 249) Updated German translation git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@250 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
@@ -27,11 +27,11 @@ bool Export_KeePassX_Xml::exportDatabase(QWidget* GuiParent,IDatabase* database)
|
||||
QDomDocument doc("KEEPASSX_DATABASE");
|
||||
QDomElement root=doc.createElement("database");
|
||||
doc.appendChild(root);
|
||||
QList<IGroupHandle*> Groups=db->groups();
|
||||
QList<IGroupHandle*> Groups=db->sortedGroups();
|
||||
for(int i=0;i<Groups.size();i++){
|
||||
if(Groups[i]->parent()==NULL){
|
||||
addGroup(Groups[i],root,doc);
|
||||
}
|
||||
addGroup(Groups[i],root,doc);
|
||||
}
|
||||
}
|
||||
file->write(doc.toByteArray());
|
||||
file->close();
|
||||
@@ -52,7 +52,7 @@ void Export_KeePassX_Xml::addGroup(IGroupHandle* group,QDomElement& parent,QDomD
|
||||
for(int i=0;i<children.size();i++){
|
||||
addGroup(children[i],GroupElement,doc);
|
||||
}
|
||||
QList<IEntryHandle*> entries=db->entries(group);
|
||||
QList<IEntryHandle*> entries=db->entriesSortedStd(group);
|
||||
for(int i=0;i<entries.size();i++){
|
||||
addEntry(entries[i],GroupElement,doc);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ bool Export_Txt::exportDatabase(QWidget* GuiParent, IDatabase* db){
|
||||
QList<IGroupHandle*> groups=db->sortedGroups();
|
||||
for(int g=0;g<groups.size();g++){
|
||||
file->write(GroupTemplate.arg(groups[g]->title()).toUtf8());
|
||||
QList<IEntryHandle*> entries=db->entries(groups[g]);
|
||||
QList<IEntryHandle*> entries=db->entriesSortedStd(groups[g]);
|
||||
for(int e=0;e<entries.size();e++){
|
||||
SecString password=entries[e]->password();
|
||||
password.unlock();
|
||||
|
||||
Reference in New Issue
Block a user