diff --git a/src/lib/AutoType_X11.cpp b/src/lib/AutoType_X11.cpp index 801b65e..e9fa21f 100644 --- a/src/lib/AutoType_X11.cpp +++ b/src/lib/AutoType_X11.cpp @@ -44,6 +44,7 @@ class AutoTypePrivate{ inline static void sleepKeyStrokeDelay(){ sleep(config->autoTypeKeyStrokeDelay()); }; static void templateToKeysyms(const QString& Template, QList& KeySymList,IEntryHandle* entry); static void stringToKeysyms(const QString& string,QList& KeySymList); + static QString getRootGroupName(IEntryHandle* entry); }; @@ -193,8 +194,11 @@ void AutoType::performGlobal(){ QRegExp lineMatch("Auto-Type-Window(?:-(\\d+)|):([^\\n]+)", Qt::CaseInsensitive, QRegExp::RegExp2); QDateTime now = QDateTime::currentDateTime(); for (int i=0; iexpire()!=Date_Never && entries[i]->expire()expire()!=Date_Never && entries[i]->expire()comment(); @@ -564,3 +568,12 @@ void AutoTypePrivate::stringToKeysyms(const QString& string,QListgroup(); + int level = group->level(); + for (int i=0; iparent(); + + return group->title(); +} diff --git a/src/lib/EntryView.cpp b/src/lib/EntryView.cpp index c404797..df364d4 100644 --- a/src/lib/EntryView.cpp +++ b/src/lib/EntryView.cpp @@ -613,17 +613,13 @@ EntryViewItem::EntryViewItem(QTreeWidgetItem *parent, QTreeWidgetItem *preceding bool EntryViewItem::operator<(const QTreeWidgetItem& other)const{ int SortCol=treeWidget()->header()->sortIndicatorSection(); int ListIndex=((KeepassEntryView*)treeWidget())->columnListIndex(SortCol); - if(ListIndex < 5 || ListIndex==9 || ListIndex==10){ //columns with string values (Title, Username, Password, URL, Comment, Group) - if(QString::localeAwareCompare(text(SortCol),other.text(SortCol)) < 0) - return true; - else - return false; + if(ListIndex < 5 || ListIndex > 8){ //columns with string values (Title, Username, Password, URL, Comment, Group) + return (QString::localeAwareCompare(text(SortCol),other.text(SortCol)) < 0); } KpxDateTime DateThis; KpxDateTime DateOther; - - switch(SortCol){ + switch(ListIndex){ case 5: DateThis=EntryHandle->expire(); DateOther=((EntryViewItem&)other).EntryHandle->expire(); break;