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
master
sniperbeamer 15 years ago
parent 0afbf7b534
commit 5aedd1f3e8
  1. 39
      changelog
  2. 6
      share/macx_bundle/Info.plist
  3. 36
      src/Database.h
  4. 64
      src/Kdb3Database.cpp
  5. 36
      src/Kdb3Database.h
  6. 8
      src/export/Export_KeePassX_Xml.cpp
  7. 2
      src/export/Export_Txt.cpp
  8. 2
      src/forms/AboutDlg.ui
  9. 12
      src/mainwindow.cpp
  10. 1087
      src/translations/keepassx-cs_CZ.ts
  11. 1789
      src/translations/keepassx-de_DE.ts
  12. 1279
      src/translations/keepassx-es_ES.ts
  13. 1088
      src/translations/keepassx-fr_FR.ts
  14. 1073
      src/translations/keepassx-gl_ES.ts
  15. 1073
      src/translations/keepassx-it_IT.ts
  16. 1077
      src/translations/keepassx-ja_JP.ts
  17. 1091
      src/translations/keepassx-ru_RU.ts
  18. 1127
      src/translations/keepassx-xx_XX.ts

@ -1,3 +1,42 @@
----------------------------
0.4.0beta1 ()
----------------------------
- Added pronounceable password generator
- Added action "Copy URL to Clipboard"
- Added "Tools" button to EditEntryDlg: Window List and Auto-Type sequence
- Improved Auto-Typing: ability to type all unicode characters
- Added option to save database after every change
- Associate KeePassX with *.kdb files on Linux and Mac OS
- Display warning when opening a database that is already opened
- Distinguish between adding groups and subgroups (Bug #2194057)
- Store list of preferred characters in password generator (Bug #2432748)
- Implemented backup feature
- Don't include entries from "Backup" group in search results
- Clear Klipper history when clearing clipboard
- Redesigned the Settings dialog and added ability to select language
- Added gl_ES and it_IT translations
- Cache and protect MasterKey - speeds up saving database
- Added 2 new password generator options
- Fixed: Unnamed Database saved as ".kdb" (Bugs #2109972, #2118340)
- Fixed: Date of Modification isn't updated (Bugs #2108658, #2121768)
- Fixed: Predefined expire times don't work (Bug #2109987)
- Fixed: Sorting isn't consistent (Bug #2108655)
- Fixed: KeepassX fails to lock itself after Ctrl-V (Bug #2106604)
- Fixed: Position of main window not properly restored (Bugs #2090649, #2371738, #2336064)
- Fixed: No password generated using list of very special characters (Bug #2230887)
- Fixed: Crash if minimize to systray with locked workbench on Mac OS (Bug #2482531)
- Fixed: Exports aren't sorted consistently (Bug #2108661)
- Improved the initialization of the Windows RNG and fallback random number source (Bug #2091784)
- Improved Mac OS bundle information (Bugs #2096992, #1921260)
- Improve tab order in many dialogs (Bug #2130397)
- Added nostrip qmake option
----------------------------
0.3.4 (2008-11-09)
----------------------------
- fixed crash when auto-typing special characters (Bug #2111588)
- only allow plain text in comment field
----------------------------
0.3.3 (2008-08-11)
----------------------------

@ -16,7 +16,7 @@
<string>APPL</string>
<key>CFBundleGetInfoString</key>
<string>KeePassX 0.4.0b</string>
<string>KeePassX 0.4.0beta1</string>
<key>CFBundleSignature</key>
<string>kpsx</string>
@ -25,10 +25,10 @@
<string>KeePassX</string>
<key>CFBundleVersion</key>
<string>0.4.0b</string>
<string>0.4.0beta1</string>
<key>CFBundleShortVersionString</key>
<string>0.4.0b</string>
<string>0.4.0b1</string>
<key>CFBundleName</key>
<string>KeePassX</string>

@ -122,22 +122,22 @@ public:
virtual void setExpire(const KpxDateTime& Expire)=0;
virtual void setBinary(const QByteArray& BinaryData)=0;
virtual KpxUuid uuid()=0;
virtual IGroupHandle* group()=0;
virtual quint32 image()=0;
virtual QString title()=0;
virtual QString url()=0;
virtual QString username()=0;
virtual SecString password()=0;
virtual QString comment()=0;
virtual QString binaryDesc()=0;
virtual KpxDateTime creation()=0;
virtual KpxDateTime lastMod()=0;
virtual KpxDateTime lastAccess()=0;
virtual KpxDateTime expire()=0;
virtual QByteArray binary()=0;
virtual quint32 binarySize()=0;
virtual QString friendlySize()=0;
virtual KpxUuid uuid()const=0;
virtual IGroupHandle* group()const=0;
virtual quint32 image()const=0;
virtual QString title()const=0;
virtual QString url()const=0;
virtual QString username()const=0;
virtual SecString password()const=0;
virtual QString comment()const=0;
virtual QString binaryDesc()const=0;
virtual KpxDateTime creation()const=0;
virtual KpxDateTime lastMod()const=0;
virtual KpxDateTime lastAccess()const=0;
virtual KpxDateTime expire()const=0;
virtual QByteArray binary()const=0;
virtual quint32 binarySize()const=0;
virtual QString friendlySize()const=0;
//! \return the index of the entry amongst the entries of its group. The index of the first entry is 0.
virtual int visualIndex()const=0;
@ -280,6 +280,10 @@ public:
//! \return a list of pointers to the handles of all entries which belong to the given group. The list contains only valid handles and is sorted in an ascending order regarding to the entry indices.
virtual QList<IEntryHandle*> entries(IGroupHandle* Group)=0;
//! \param Group The group which contains the wanted entries.
//! \return a list of pointers to the handles of all entries which belong to the given group. The list contains only valid handles and is sorted in an ascending order (title, username).
virtual QList<IEntryHandle*> entriesSortedStd(IGroupHandle* Group)=0;
//! \return a list with the pointers to the handles of all expired entries of the database. The list contains only valid handles. The list is not sorted.
virtual QList<IEntryHandle*> expiredEntries()=0;

@ -28,15 +28,26 @@
const QDateTime Date_Never(QDate(2999,12,28),QTime(23,59,59));
bool EntryHandleLessThan(const IEntryHandle* This,const IEntryHandle* Other){
bool Kdb3Database::EntryHandleLessThan(const IEntryHandle* This,const IEntryHandle* Other){
if(!This->isValid() && Other->isValid())return true;
if(This->isValid() && !Other->isValid())return false;
if(!This->isValid() && !Other->isValid())return false;
return This->visualIndex()<Other->visualIndex();
}
bool Kdb3Database::EntryHandleLessThanStd(const IEntryHandle* This,const IEntryHandle* Other){
int comp = This->title().compare(Other->title());
if (comp < 0) return true;
else if (comp > 0) return false;
comp = This->username().compare(Other->username());
if (comp < 0) return true;
else if (comp > 0) return false;
return true;
}
bool StdEntryLessThan(const Kdb3Database::StdEntry& This,const Kdb3Database::StdEntry& Other){
bool Kdb3Database::StdEntryLessThan(const Kdb3Database::StdEntry& This,const Kdb3Database::StdEntry& Other){
return This.Index<Other.Index;
}
@ -951,10 +962,10 @@ QList<IEntryHandle*> Kdb3Database::expiredEntries(){
return handles;
}
QList<IEntryHandle*> Kdb3Database::entries(IGroupHandle* group){
QList<IEntryHandle*> Kdb3Database::entries(IGroupHandle* Group){
QList<IEntryHandle*> handles;
for(int i=0; i<EntryHandles.size(); i++){
if(EntryHandles[i].isValid() && (EntryHandles[i].group()==group))
if(EntryHandles[i].isValid() && (EntryHandles[i].group()==Group))
handles.append(&EntryHandles[i]);
}
qSort(handles.begin(),handles.end(),EntryHandleLessThan);
@ -962,6 +973,17 @@ QList<IEntryHandle*> Kdb3Database::entries(IGroupHandle* group){
return handles;
}
QList<IEntryHandle*> Kdb3Database::entriesSortedStd(IGroupHandle* Group){
QList<IEntryHandle*> handles;
for(int i=0; i<EntryHandles.size(); i++){
if(EntryHandles[i].isValid() && (EntryHandles[i].group()==Group))
handles.append(&EntryHandles[i]);
}
qSort(handles.begin(),handles.end(),EntryHandleLessThanStd);
return handles;
}
void Kdb3Database::deleteEntry(IEntryHandle* entry){
if(!entry)return;
int j;
@ -1085,23 +1107,23 @@ void Kdb3Database::EntryHandle::setBinaryDesc(const QString& s){Entry->BinaryDes
void Kdb3Database::EntryHandle::setComment(const QString& s){Entry->Comment=s;}
void Kdb3Database::EntryHandle::setBinary(const QByteArray& s){Entry->Binary=s;}
void Kdb3Database::EntryHandle::setImage(const quint32& s){Entry->Image=s;}
KpxUuid Kdb3Database::EntryHandle::uuid(){return Entry->Uuid;}
IGroupHandle* Kdb3Database::EntryHandle::group(){return Entry->Group->Handle;}
quint32 Kdb3Database::EntryHandle::image(){return Entry->Image;}
QString Kdb3Database::EntryHandle::title(){return Entry->Title;}
QString Kdb3Database::EntryHandle::url(){return Entry->Url;}
QString Kdb3Database::EntryHandle::username(){return Entry->Username;}
SecString Kdb3Database::EntryHandle::password(){return Entry->Password;}
QString Kdb3Database::EntryHandle::comment(){return Entry->Comment;}
QString Kdb3Database::EntryHandle::binaryDesc(){return Entry->BinaryDesc;}
KpxDateTime Kdb3Database::EntryHandle::creation(){return Entry->Creation;}
KpxDateTime Kdb3Database::EntryHandle::lastMod(){return Entry->LastMod;}
KpxDateTime Kdb3Database::EntryHandle::lastAccess(){return Entry->LastAccess;}
KpxDateTime Kdb3Database::EntryHandle::expire(){return Entry->Expire;}
QByteArray Kdb3Database::EntryHandle::binary(){return Entry->Binary;}
quint32 Kdb3Database::EntryHandle::binarySize(){return Entry->Binary.size();}
QString Kdb3Database::EntryHandle::friendlySize()
KpxUuid Kdb3Database::EntryHandle::uuid()const{return Entry->Uuid;}
IGroupHandle* Kdb3Database::EntryHandle::group()const{return Entry->Group->Handle;}
quint32 Kdb3Database::EntryHandle::image()const{return Entry->Image;}
QString Kdb3Database::EntryHandle::title()const{return Entry->Title;}
QString Kdb3Database::EntryHandle::url()const{return Entry->Url;}
QString Kdb3Database::EntryHandle::username()const{return Entry->Username;}
SecString Kdb3Database::EntryHandle::password()const{return Entry->Password;}
QString Kdb3Database::EntryHandle::comment()const{return Entry->Comment;}
QString Kdb3Database::EntryHandle::binaryDesc()const{return Entry->BinaryDesc;}
KpxDateTime Kdb3Database::EntryHandle::creation()const{return Entry->Creation;}
KpxDateTime Kdb3Database::EntryHandle::lastMod()const{return Entry->LastMod;}
KpxDateTime Kdb3Database::EntryHandle::lastAccess()const{return Entry->LastAccess;}
KpxDateTime Kdb3Database::EntryHandle::expire()const{return Entry->Expire;}
QByteArray Kdb3Database::EntryHandle::binary()const{return Entry->Binary;}
quint32 Kdb3Database::EntryHandle::binarySize()const{return Entry->Binary.size();}
QString Kdb3Database::EntryHandle::friendlySize()const
{
quint32 binsize = binarySize();
QString unit;

@ -60,25 +60,25 @@ public:
virtual void setLastAccess(const KpxDateTime& LastAccess);
virtual void setExpire(const KpxDateTime& Expire);
virtual void setBinary(const QByteArray& BinaryData);
virtual KpxUuid uuid();
virtual IGroupHandle* group();
virtual quint32 image();
virtual KpxUuid uuid()const;
virtual IGroupHandle* group()const;
virtual quint32 image()const;
virtual int visualIndex() const;
virtual void setVisualIndex(int i);
virtual void setVisualIndexDirectly(int i);
virtual QString title();
virtual QString url();
virtual QString username();
virtual SecString password();
virtual QString comment();
virtual QString binaryDesc();
virtual KpxDateTime creation();
virtual KpxDateTime lastMod();
virtual KpxDateTime lastAccess();
virtual KpxDateTime expire();
virtual QByteArray binary();
virtual quint32 binarySize();
virtual QString friendlySize();
virtual QString title()const;
virtual QString url()const;
virtual QString username()const;
virtual SecString password()const;
virtual QString comment()const;
virtual QString binaryDesc()const;
virtual KpxDateTime creation()const;
virtual KpxDateTime lastMod()const;
virtual KpxDateTime lastAccess()const;
virtual KpxDateTime expire()const;
virtual QByteArray binary()const;
virtual quint32 binarySize()const;
virtual QString friendlySize()const;
virtual bool isValid() const;
virtual CEntry data()const;
private:
@ -164,6 +164,7 @@ public:
virtual QList<IEntryHandle*> entries();
virtual QList<IEntryHandle*> entries(IGroupHandle* Group);
virtual QList<IEntryHandle*> entriesSortedStd(IGroupHandle* Group);
virtual QList<IEntryHandle*> expiredEntries();
virtual IEntryHandle* cloneEntry(const IEntryHandle* entry);
@ -212,6 +213,9 @@ private:
void rebuildIndices(QList<StdGroup*>& list);
void restoreGroupTreeState();
//void copyTree(Kdb3Database* db, GroupHandle* orgGroup, IGroupHandle* parent);
static bool EntryHandleLessThan(const IEntryHandle* This,const IEntryHandle* Other);
static bool EntryHandleLessThanStd(const IEntryHandle* This,const IEntryHandle* Other);
static bool StdEntryLessThan(const Kdb3Database::StdEntry& This,const Kdb3Database::StdEntry& Other);
StdEntry* getEntry(const KpxUuid& uuid);
StdEntry* getEntry(EntryHandle* handle);

@ -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();

@ -138,7 +138,7 @@
<item>
<widget class="QLabel" name="label_4" >
<property name="text" >
<string>Copyright (C) 2005 - 2008 KeePassX Team
<string>Copyright (C) 2005 - 2009 KeePassX Team
KeePassX is distributed under the terms of the
General Public License (GPL) version 2.</string>
</property>

@ -1067,7 +1067,9 @@ void KeepassMainWindow::hideEvent(QHideEvent* event){
void KeepassMainWindow::showEvent(QShowEvent* event){
if (IsLocked && !InUnLock && event->spontaneous()){
#ifndef Q_WS_MAC
showNormal(); // workaround for some graphic glitches
#endif
OnUnLockWorkspace();
}
@ -1081,7 +1083,15 @@ void KeepassMainWindow::OnExtrasSettings(){
if (config->language() != oldLang){
retranslateUi(this);
EntryView->updateColumns();
if (FileOpen) {
if (db->file())
setWindowTitle(QString("%1[*] - KeePassX").arg(db->file()->fileName()));
else
setWindowTitle(QString("[%1][*] - KeePassX").arg(tr("new")));
}
else {
setWindowTitle(APP_DISPLAY_NAME);
}
}
EntryView->setAlternatingRowColors(config->alternatingRowColors());

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff