Enable compiler warnings

Fix all the unused variable warnings
Disable incomplete translations
Compile the translation files
Add qt_* translations not part of Qt (from VirutalBox)

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@289 b624d157-de02-0410-bad0-e51aec6abb33
master
sniperbeamer 16 years ago
parent 4a64bd61e4
commit e3dcd73b89
  1. BIN
      share/keepassx/i18n/keepassx-cs_CZ.qm
  2. BIN
      share/keepassx/i18n/keepassx-de_DE.qm
  3. BIN
      share/keepassx/i18n/keepassx-es_ES.qm
  4. BIN
      share/keepassx/i18n/keepassx-fi_FI.qm
  5. BIN
      share/keepassx/i18n/keepassx-fr_FR.qm
  6. BIN
      share/keepassx/i18n/keepassx-gl_ES.qm
  7. BIN
      share/keepassx/i18n/keepassx-it_IT.qm
  8. BIN
      share/keepassx/i18n/keepassx-ja_JP.qm
  9. BIN
      share/keepassx/i18n/keepassx-ru_RU.qm
  10. BIN
      share/keepassx/i18n/keepassx-tr_TR.qm
  11. 9
      src/CMakeLists.txt
  12. 2
      src/Database.h
  13. 13
      src/Kdb3Database.cpp
  14. 6
      src/Kdb3Database.h
  15. 1
      src/dialogs/AutoTypeDlg.cpp
  16. 2
      src/dialogs/DatabaseSettingsDlg.cpp
  17. 2
      src/dialogs/DatabaseSettingsDlg.h
  18. 2
      src/dialogs/EditEntryDlg.cpp
  19. 2
      src/dialogs/EditEntryDlg.h
  20. 4
      src/dialogs/EditGroupDlg.cpp
  21. 4
      src/dialogs/EditGroupDlg.h
  22. 9
      src/dialogs/PasswordDlg.cpp
  23. 2
      src/dialogs/PasswordDlg.h
  24. 1
      src/dialogs/PasswordGenDlg.cpp
  25. 2
      src/dialogs/SelectIconDlg.cpp
  26. 2
      src/dialogs/SelectIconDlg.h
  27. 2
      src/dialogs/SimplePasswordDlg.cpp
  28. 2
      src/dialogs/SimplePasswordDlg.h
  29. 14
      src/lib/EntryView.cpp
  30. 6
      src/lib/EntryView.h
  31. 7
      src/lib/GroupView.cpp
  32. 2
      src/lib/WaitAnimationWidget.cpp
  33. 4
      src/lib/tools.cpp
  34. 14
      src/mainwindow.cpp
  35. 8
      src/mainwindow.h
  36. 47
      src/src.pro
  37. 4446
      src/translations/qt_fi.ts
  38. 4461
      src/translations/qt_it.ts
  39. 4459
      src/translations/qt_tr.ts

@ -119,16 +119,19 @@ SET(keepassx_FORMS
SET(keepassx_RESOURCES res/resources.qrc) SET(keepassx_RESOURCES res/resources.qrc)
set(keepassx_TRANSLATIONS set(keepassx_TRANSLATIONS
translations/keepassx-cs_CZ.ts # translations/keepassx-cs_CZ.ts
translations/keepassx-de_DE.ts translations/keepassx-de_DE.ts
translations/keepassx-es_ES.ts translations/keepassx-es_ES.ts
translations/keepassx-fi_FI.ts translations/keepassx-fi_FI.ts
translations/keepassx-fr_FR.ts translations/keepassx-fr_FR.ts
translations/keepassx-gl_ES.ts translations/keepassx-gl_ES.ts
translations/keepassx-it_IT.ts translations/keepassx-it_IT.ts
translations/keepassx-ja_JP.ts # translations/keepassx-ja_JP.ts
translations/keepassx-ru_RU.ts # translations/keepassx-ru_RU.ts
translations/keepassx-tr_TR.ts translations/keepassx-tr_TR.ts
translations/qt_fi.ts
translations/qt_it.ts
translations/qt_tr.ts
) )
#IF( MINGW ) #IF( MINGW )

@ -215,7 +215,7 @@ public:
/*! Sets the index of a group amongst the children of its parent. /*! Sets the index of a group amongst the children of its parent.
This function can be used to sort the groups of the database in a specific order. This function can be used to sort the groups of the database in a specific order.
\param index The new index of the group. The indices of the other groups which are affected by this operation will be automatically adjusted.*/ \param index The new index of the group. The indices of the other groups which are affected by this operation will be automatically adjusted.*/
virtual void setIndex(int index)=0; //virtual void setIndex(int index)=0;
/*! Tests the validity of the handle. /*! Tests the validity of the handle.
\return TRUE if the handle is valid and FALSE if the handle is invalid e.g. because the associated group was deleted.*/ \return TRUE if the handle is valid and FALSE if the handle is invalid e.g. because the associated group was deleted.*/

@ -377,7 +377,7 @@ switch(FieldType)
} }
//! Extracts one group from raw decrypted data. //! Extracts one group from raw decrypted data.
bool Kdb3Database::readGroupField(StdGroup* group,QList<quint32>& Levels,quint16 FieldType, quint32 FieldSize, quint8 *pData) bool Kdb3Database::readGroupField(StdGroup* group,QList<quint32>& Levels,quint16 FieldType, quint8 *pData)
{ {
switch(FieldType) switch(FieldType)
{ {
@ -663,7 +663,7 @@ bool Kdb3Database::loadReal(QString filename, bool readOnly, bool differentEncod
LOAD_RETURN_CLEANUP LOAD_RETURN_CLEANUP
} }
bRet = readGroupField(&group,Levels, FieldType, FieldSize, (quint8 *)pField); bRet = readGroupField(&group,Levels, FieldType, (quint8 *)pField);
if ((FieldType == 0xFFFF) && (bRet == true)){ if ((FieldType == 0xFFFF) && (bRet == true)){
Groups << group; Groups << group;
CurGroup++; // Now and ONLY now the counter gets increased CurGroup++; // Now and ONLY now the counter gets increased
@ -823,8 +823,8 @@ void Kdb3Database::deleteGroup(IGroupHandle* group){
deleteGroup(((GroupHandle*)group)->Group); deleteGroup(((GroupHandle*)group)->Group);
} }
/*
void Kdb3Database::GroupHandle::setIndex(int index){ void Kdb3Database::GroupHandle::setIndex(int index){
/*
quint32 ParentId=((GroupHandle*)parent())->Id; quint32 ParentId=((GroupHandle*)parent())->Id;
int Pos=pDB->getGroupListIndex(this); int Pos=pDB->getGroupListIndex(this);
int NewPos=0; int NewPos=0;
@ -857,9 +857,8 @@ void Kdb3Database::GroupHandle::setIndex(int index){
NewIndex++; NewIndex++;
} }
} }
*/
} }
*/
bool Kdb3Database::convHexToBinaryKey(char* HexKey, char* dst){ bool Kdb3Database::convHexToBinaryKey(char* HexKey, char* dst){
QString hex=QString::fromAscii(HexKey,64); QString hex=QString::fromAscii(HexKey,64);
@ -1397,7 +1396,7 @@ bool Kdb3Database::save(){
unsigned int pos=DB_HEADER_SIZE; // Skip the header, it will be written later unsigned int pos=DB_HEADER_SIZE; // Skip the header, it will be written later
serializeGroups(Groups,buffer,pos); serializeGroups(buffer,pos);
serializeEntries(saveEntries,buffer,pos); serializeEntries(saveEntries,buffer,pos);
serializeEntries(UnknownMetaStreams,buffer,pos); serializeEntries(UnknownMetaStreams,buffer,pos);
serializeEntries(MetaStreams,buffer,pos); serializeEntries(MetaStreams,buffer,pos);
@ -1556,7 +1555,7 @@ void Kdb3Database::appendChildrenToGroupList(QList<StdGroup*>& list,StdGroup& gr
} }
void Kdb3Database::serializeGroups(QList<StdGroup>& GroupList,char* buffer,unsigned int& pos){ void Kdb3Database::serializeGroups(char* buffer,unsigned int& pos){
quint16 FieldType; quint16 FieldType;
quint32 FieldSize; quint32 FieldSize;
quint32 Flags=0; //unused quint32 Flags=0; //unused

@ -101,7 +101,7 @@ public:
virtual IGroupHandle* parent(); virtual IGroupHandle* parent();
virtual QList<IGroupHandle*> children(); virtual QList<IGroupHandle*> children();
virtual int index(); virtual int index();
virtual void setIndex(int index); //virtual void setIndex(int index);
virtual int level(); virtual int level();
virtual bool expanded(); virtual bool expanded();
virtual void setExpanded(bool IsExpanded); virtual void setExpanded(bool IsExpanded);
@ -201,14 +201,14 @@ private:
void createCustomIconsMetaStream(StdEntry* e); void createCustomIconsMetaStream(StdEntry* e);
void createGroupTreeStateMetaStream(StdEntry* e); void createGroupTreeStateMetaStream(StdEntry* e);
bool readEntryField(StdEntry* entry, quint16 FieldType, quint32 FieldSize, quint8 *pData); bool readEntryField(StdEntry* entry, quint16 FieldType, quint32 FieldSize, quint8 *pData);
bool readGroupField(StdGroup* group,QList<quint32>& Levels,quint16 FieldType, quint32 FieldSize, quint8 *pData); bool readGroupField(StdGroup* group,QList<quint32>& Levels,quint16 FieldType, quint8 *pData);
bool createGroupTree(QList<quint32>& Levels); bool createGroupTree(QList<quint32>& Levels);
void createHandles(); void createHandles();
void invalidateHandle(StdEntry* entry); void invalidateHandle(StdEntry* entry);
bool convHexToBinaryKey(char* HexKey, char* dst); bool convHexToBinaryKey(char* HexKey, char* dst);
quint32 getNewGroupId(); quint32 getNewGroupId();
void serializeEntries(QList<StdEntry>& EntryList,char* buffer,unsigned int& pos); void serializeEntries(QList<StdEntry>& EntryList,char* buffer,unsigned int& pos);
void serializeGroups(QList<StdGroup>& GroupList,char* buffer,unsigned int& pos); void serializeGroups(char* buffer,unsigned int& pos);
void appendChildrenToGroupList(QList<StdGroup*>& list,StdGroup& group); void appendChildrenToGroupList(QList<StdGroup*>& list,StdGroup& group);
void appendChildrenToGroupList(QList<IGroupHandle*>& list,StdGroup& group); void appendChildrenToGroupList(QList<IGroupHandle*>& list,StdGroup& group);
bool searchStringContains(const QString& search, const QString& string,bool Cs, bool RegExp); bool searchStringContains(const QString& search, const QString& string,bool Cs, bool RegExp);

@ -86,6 +86,7 @@ void AutoTypeDlg::paintEvent(QPaintEvent* event){
} }
void AutoTypeDlg::resizeEvent(QResizeEvent* event){ void AutoTypeDlg::resizeEvent(QResizeEvent* event){
Q_UNUSED(event);
createBanner(&BannerPixmap,getPixmap("keepassx_large"),tr("Auto-Type"),width()); createBanner(&BannerPixmap,getPixmap("keepassx_large"),tr("Auto-Type"),width());
} }

@ -23,7 +23,7 @@
#include "Kdb3Database.h" #include "Kdb3Database.h"
CDbSettingsDlg::CDbSettingsDlg(QWidget* parent,IDatabase* db, bool modal, Qt::WFlags fl) CDbSettingsDlg::CDbSettingsDlg(QWidget* parent,IDatabase* db, Qt::WFlags fl)
: QDialog(parent,fl) : QDialog(parent,fl)
{ {
setupUi(this); setupUi(this);

@ -27,7 +27,7 @@ class CDbSettingsDlg : public QDialog, private Ui_DatabaseSettingsDlg
{ {
Q_OBJECT Q_OBJECT
public: public:
CDbSettingsDlg(QWidget* parent,IDatabase* db, bool modal = FALSE, Qt::WFlags fl = 0 ); CDbSettingsDlg(QWidget* parent,IDatabase* db, Qt::WFlags fl = 0 );
~CDbSettingsDlg(); ~CDbSettingsDlg();
virtual void paintEvent(QPaintEvent *); virtual void paintEvent(QPaintEvent *);

@ -28,7 +28,7 @@
#include "TargetWindowDlg.h" #include "TargetWindowDlg.h"
#endif #endif
CEditEntryDlg::CEditEntryDlg(IDatabase* _db, IEntryHandle* _entry,QWidget* parent, bool modal, bool newEntry) CEditEntryDlg::CEditEntryDlg(IDatabase* _db, IEntryHandle* _entry,QWidget* parent, bool newEntry)
: QDialog(parent) : QDialog(parent)
{ {
Q_ASSERT(_db); Q_ASSERT(_db);

@ -28,7 +28,7 @@ class CEditEntryDlg : public QDialog, private Ui_EditEntryDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
CEditEntryDlg(IDatabase* _db, IEntryHandle* _entry,QWidget* parent = 0, bool modal = FALSE, bool newEntry = FALSE); CEditEntryDlg(IDatabase* _db, IEntryHandle* _entry,QWidget* parent = 0, bool newEntry = FALSE);
~CEditEntryDlg(); ~CEditEntryDlg();
void InitGroupComboBox(); void InitGroupComboBox();
static void saveAttachment(IEntryHandle* pEntry, QWidget* ParentWidget=NULL); static void saveAttachment(IEntryHandle* pEntry, QWidget* ParentWidget=NULL);

@ -22,7 +22,7 @@
#include "EditGroupDlg.h" #include "EditGroupDlg.h"
#include "SelectIconDlg.h" #include "SelectIconDlg.h"
CEditGroupDialog::CEditGroupDialog(IDatabase* database,IGroupHandle* Handle,QWidget* parent, bool modal, Qt::WFlags fl) CEditGroupDialog::CEditGroupDialog(IDatabase* database,IGroupHandle* Handle,QWidget* parent, Qt::WFlags fl)
: QDialog(parent,fl) : QDialog(parent,fl)
{ {
setupUi(this); setupUi(this);
@ -40,7 +40,7 @@ CEditGroupDialog::CEditGroupDialog(IDatabase* database,IGroupHandle* Handle,QWid
} }
CEditGroupDialog::CEditGroupDialog(IDatabase* database,CGroup* Group,QWidget* parent, bool modal, Qt::WFlags fl) CEditGroupDialog::CEditGroupDialog(IDatabase* database,CGroup* Group,QWidget* parent, Qt::WFlags fl)
: QDialog(parent,fl) : QDialog(parent,fl)
{ {
setupUi(this); setupUi(this);

@ -27,8 +27,8 @@ class CEditGroupDialog : public QDialog, private Ui_EditGroupDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
CEditGroupDialog(IDatabase*,IGroupHandle*,QWidget* parent = 0, bool modal = FALSE, Qt::WFlags fl = 0 ); CEditGroupDialog(IDatabase*,IGroupHandle*,QWidget* parent = 0, Qt::WFlags fl = 0 );
CEditGroupDialog(IDatabase*,CGroup*,QWidget* parent = 0, bool modal = FALSE, Qt::WFlags fl = 0 ); CEditGroupDialog(IDatabase*,CGroup*,QWidget* parent = 0, Qt::WFlags fl = 0 );
~CEditGroupDialog(); ~CEditGroupDialog();
virtual void showEvent(QShowEvent *event); virtual void showEvent(QShowEvent *event);
private: private:

@ -23,6 +23,7 @@
PasswordDialog::PasswordDialog(QWidget* parent,DlgMode mode,DlgFlags flags,const QString& filename) PasswordDialog::PasswordDialog(QWidget* parent,DlgMode mode,DlgFlags flags,const QString& filename)
: QDialog(parent) : QDialog(parent)
{ {
Q_UNUSED(flags);
setupUi(this); setupUi(this);
Mode=mode; Mode=mode;
Filename=filename; Filename=filename;
@ -155,8 +156,8 @@ PasswordDialog::PasswordDialog(QWidget* parent,DlgMode mode,DlgFlags flags,const
connect(buttonBox->button(QDialogButtonBox::Ok), SIGNAL( clicked() ), this, SLOT( OnOK() ) ); connect(buttonBox->button(QDialogButtonBox::Ok), SIGNAL( clicked() ), this, SLOT( OnOK() ) );
connect(Button_Browse, SIGNAL( clicked() ), this, SLOT( OnButtonBrowse() ) ); connect(Button_Browse, SIGNAL( clicked() ), this, SLOT( OnButtonBrowse() ) );
connect(Button_GenKeyFile,SIGNAL(clicked()),this,SLOT(OnGenKeyFile())); connect(Button_GenKeyFile,SIGNAL(clicked()),this,SLOT(OnGenKeyFile()));
connect(Check_Password,SIGNAL(stateChanged(int)),this,SLOT(OnCheckBoxesChanged(int))); connect(Check_Password,SIGNAL(stateChanged(int)),this,SLOT(OnCheckBoxesChanged()));
connect(Check_KeyFile,SIGNAL(stateChanged(int)),this,SLOT(OnCheckBoxesChanged(int))); connect(Check_KeyFile,SIGNAL(stateChanged(int)),this,SLOT(OnCheckBoxesChanged()));
connect(Button_Back,SIGNAL(clicked()),this,SLOT(OnButtonBack())); connect(Button_Back,SIGNAL(clicked()),this,SLOT(OnButtonBack()));
if(!config->showPasswordsPasswordDlg()) if(!config->showPasswordsPasswordDlg())
ChangeEchoModeDatabaseKey(); ChangeEchoModeDatabaseKey();
@ -168,7 +169,7 @@ PasswordDialog::PasswordDialog(QWidget* parent,DlgMode mode,DlgFlags flags,const
setMinimumSize(size()); setMinimumSize(size());
createBanner(&BannerPixmap,getPixmap("key"),BannerTitle,width()); createBanner(&BannerPixmap,getPixmap("key"),BannerTitle,width());
Button_Bookmarks->setIcon(getIcon("bookmark")); Button_Bookmarks->setIcon(getIcon("bookmark"));
OnCheckBoxesChanged(0); OnCheckBoxesChanged();
} }
@ -295,7 +296,7 @@ void PasswordDialog::OnOK(){
done(Exit_Ok); done(Exit_Ok);
} }
void PasswordDialog::OnCheckBoxesChanged(int state){ void PasswordDialog::OnCheckBoxesChanged(){
Edit_Password->setEnabled(Check_Password->isChecked()); Edit_Password->setEnabled(Check_Password->isChecked());
Combo_KeyFile->setEnabled(Check_KeyFile->isChecked()); Combo_KeyFile->setEnabled(Check_KeyFile->isChecked());
Button_Browse->setEnabled(Check_KeyFile->isChecked()); Button_Browse->setEnabled(Check_KeyFile->isChecked());

@ -62,7 +62,7 @@ class PasswordDialog : public QDialog, private Ui_PasswordDlg {
void OnButtonBack(); void OnButtonBack();
void ChangeEchoModeDatabaseKey(); void ChangeEchoModeDatabaseKey();
void OnBookmarkTriggered(QAction* action); void OnBookmarkTriggered(QAction* action);
void OnCheckBoxesChanged(int state); void OnCheckBoxesChanged();
void done(int r); void done(int r);
private: private:

@ -473,6 +473,7 @@ PassCharValidator::PassCharValidator(QObject* parent) : QValidator(parent) {
} }
QValidator::State PassCharValidator::validate(QString& input, int& pos) const { QValidator::State PassCharValidator::validate(QString& input, int& pos) const {
Q_UNUSED(pos);
QSet<QChar> chars; QSet<QChar> chars;
for (int i=0; i<input.size(); i++) { for (int i=0; i<input.size(); i++) {

@ -21,7 +21,7 @@
#include "dialogs/SelectIconDlg.h" #include "dialogs/SelectIconDlg.h"
CSelectIconDlg::CSelectIconDlg(IDatabase* database,int CurrentId,QWidget* parent, bool modal, Qt::WFlags fl):QDialog(parent,fl){ CSelectIconDlg::CSelectIconDlg(IDatabase* database,int CurrentId,QWidget* parent, Qt::WFlags fl):QDialog(parent,fl){
setupUi(this); setupUi(this);
db=database; db=database;
Id=CurrentId; Id=CurrentId;

@ -27,7 +27,7 @@ class CSelectIconDlg:public QDialog, private Ui_SelectIconDlg{
Q_OBJECT Q_OBJECT
public: public:
CSelectIconDlg(IDatabase* db,int ImageID,QWidget* parent = 0, bool modal = false, Qt::WFlags fl = 0); CSelectIconDlg(IDatabase* db,int ImageID,QWidget* parent = 0, Qt::WFlags fl = 0);
private slots: private slots:
void OnAddIcon(); void OnAddIcon();

@ -21,7 +21,7 @@
#include "SimplePasswordDlg.h" #include "SimplePasswordDlg.h"
SimplePasswordDialog::SimplePasswordDialog(QWidget* parent, bool modal, Qt::WFlags fl) SimplePasswordDialog::SimplePasswordDialog(QWidget* parent, Qt::WFlags fl)
: QDialog(parent,fl) : QDialog(parent,fl)
{ {
setupUi(this); setupUi(this);

@ -28,7 +28,7 @@ class SimplePasswordDialog : public QDialog, private Ui_SimplePasswordDialog
Q_OBJECT Q_OBJECT
public: public:
SimplePasswordDialog(QWidget* parent = 0, bool modal = FALSE, Qt::WFlags fl = 0 ); SimplePasswordDialog(QWidget* parent = 0, Qt::WFlags fl = 0 );
~SimplePasswordDialog(); ~SimplePasswordDialog();
QString password; QString password;

@ -44,11 +44,11 @@ KeepassEntryView::KeepassEntryView(QWidget* parent):QTreeWidget(parent){
updateColumns(); updateColumns();
header()->setSortIndicator(config->columnSort(), config->columnSortOrder()); header()->setSortIndicator(config->columnSort(), config->columnSortOrder());
connect(header(),SIGNAL(sectionResized(int,int,int)),this,SLOT(OnColumnResized(int,int,int))); connect(header(),SIGNAL(sectionResized(int,int,int)),this,SLOT(OnColumnResized()));
connect(this,SIGNAL(itemSelectionChanged()),this,SLOT(OnItemsChanged())); connect(this,SIGNAL(itemSelectionChanged()),this,SLOT(OnItemsChanged()));
connect(&ClipboardTimer, SIGNAL(timeout()), this, SLOT(OnClipboardTimeOut())); connect(&ClipboardTimer, SIGNAL(timeout()), this, SLOT(OnClipboardTimeOut()));
connect(header(),SIGNAL(sectionClicked(int)),this,SLOT(OnHeaderSectionClicked(int))); connect(header(),SIGNAL(sectionClicked(int)),this,SLOT(OnHeaderSectionClicked(int)));
connect(header(),SIGNAL(sectionMoved(int,int,int)),this,SLOT(OnColumnMoved(int,int,int))); connect(header(),SIGNAL(sectionMoved(int,int,int)),this,SLOT(OnColumnMoved()));
Clipboard=QApplication::clipboard(); Clipboard=QApplication::clipboard();
ContextMenu=new QMenu(this); ContextMenu=new QMenu(this);
setAlternatingRowColors(config->alternatingRowColors()); setAlternatingRowColors(config->alternatingRowColors());
@ -260,7 +260,7 @@ void KeepassEntryView::OnNewEntry(){
} }
else else
NewEntry=db->newEntry(CurrentGroup); NewEntry=db->newEntry(CurrentGroup);
CEditEntryDlg dlg(db,NewEntry,this,true,true); CEditEntryDlg dlg(db,NewEntry,this,true);
if(!dlg.exec()){ if(!dlg.exec()){
db->deleteLastEntry(); db->deleteLastEntry();
} }
@ -473,9 +473,9 @@ void KeepassEntryView::updateIcons(){
} }
void KeepassEntryView::setEntry(IEntryHandle* entry){ /*void KeepassEntryView::setEntry(IEntryHandle* entry){
} }*/
void KeepassEntryView::updateColumns(){ void KeepassEntryView::updateColumns(){
setColumnCount(0); setColumnCount(0);
@ -529,7 +529,7 @@ void KeepassEntryView::refreshItems(){
updateEntry(Items.at(i)); updateEntry(Items.at(i));
} }
void KeepassEntryView::OnColumnMoved(int LogIndex,int OldVisIndex,int NewVisIndex){ void KeepassEntryView::OnColumnMoved(){
for(int i=0;i<header()->count();i++){ for(int i=0;i<header()->count();i++){
ColumnOrder[columnListIndex(header()->logicalIndex(i))]=i; ColumnOrder[columnListIndex(header()->logicalIndex(i))]=i;
} }
@ -595,7 +595,7 @@ int KeepassEntryView::columnListIndex(int LogicalIndex){
} }
void KeepassEntryView::OnColumnResized(int lindex, int Old, int New){ void KeepassEntryView::OnColumnResized(){
if(!AutoResizeColumns)return; if(!AutoResizeColumns)return;
for(int i=0;i<header()->count();i++){ for(int i=0;i<header()->count();i++){
ColumnSizes[columnListIndex(i)]=header()->sectionSize(i); ColumnSizes[columnListIndex(i)]=header()->sectionSize(i);

@ -47,7 +47,7 @@ class KeepassEntryView:public QTreeWidget{
void setCurrentEntry(IEntryHandle* entry); void setCurrentEntry(IEntryHandle* entry);
inline IGroupHandle* getCurrentGroup() { return CurrentGroup; }; inline IGroupHandle* getCurrentGroup() { return CurrentGroup; };
private: private:
void setEntry(IEntryHandle* entry); //void setEntry(IEntryHandle* entry);
void updateEntry(EntryViewItem*); void updateEntry(EntryViewItem*);
void editEntry(EntryViewItem*); void editEntry(EntryViewItem*);
void createItems(QList<IEntryHandle*>& entries); void createItems(QList<IEntryHandle*>& entries);
@ -73,7 +73,7 @@ class KeepassEntryView:public QTreeWidget{
void mouseMoveEvent(QMouseEvent *event); void mouseMoveEvent(QMouseEvent *event);
private slots: private slots:
void OnColumnResized(int index,int OldSize, int NewSize); void OnColumnResized();
void OnHeaderSectionClicked(int index); void OnHeaderSectionClicked(int index);
void OnGroupChanged(IGroupHandle* group); void OnGroupChanged(IGroupHandle* group);
void OnShowSearchResults(); void OnShowSearchResults();
@ -92,7 +92,7 @@ class KeepassEntryView:public QTreeWidget{
void OnAutoType(); void OnAutoType();
#endif #endif
void removeDragItems(); void removeDragItems();
void OnColumnMoved(int LogIndex,int OldVisIndex,int NewVisIndex); void OnColumnMoved();
void OnEditOpenUrl(); void OnEditOpenUrl();
void OnEditCopyUrl(); void OnEditCopyUrl();

@ -105,7 +105,7 @@ void KeepassGroupView::OnHideSearchResults(){
void KeepassGroupView::OnNewGroup(){ void KeepassGroupView::OnNewGroup(){
CGroup NewGroup; CGroup NewGroup;
CEditGroupDialog dlg(db,&NewGroup,parentWidget(),true); CEditGroupDialog dlg(db,&NewGroup,parentWidget());
if(dlg.exec()) if(dlg.exec())
createGroup(NewGroup.Title, NewGroup.Image, NULL); createGroup(NewGroup.Title, NewGroup.Image, NULL);
} }
@ -113,7 +113,7 @@ void KeepassGroupView::OnNewGroup(){
void KeepassGroupView::OnNewSubgroup(){ void KeepassGroupView::OnNewSubgroup(){
GroupViewItem* parent=(GroupViewItem*)currentItem(); GroupViewItem* parent=(GroupViewItem*)currentItem();
CGroup NewGroup; CGroup NewGroup;
CEditGroupDialog dlg(db,&NewGroup,parentWidget(),true); CEditGroupDialog dlg(db,&NewGroup,parentWidget());
if(dlg.exec()) if(dlg.exec())
createGroup(NewGroup.Title, NewGroup.Image, parent); createGroup(NewGroup.Title, NewGroup.Image, parent);
} }
@ -151,7 +151,7 @@ void KeepassGroupView::createGroup(const QString& title, quint32 image, GroupVie
void KeepassGroupView::OnEditGroup(){ void KeepassGroupView::OnEditGroup(){
GroupViewItem* item=(GroupViewItem*)currentItem(); GroupViewItem* item=(GroupViewItem*)currentItem();
CEditGroupDialog dlg(db,item->GroupHandle,parentWidget(),true); CEditGroupDialog dlg(db,item->GroupHandle,parentWidget());
int r=dlg.exec(); int r=dlg.exec();
if(r){ if(r){
item->setIcon(0,db->icon(item->GroupHandle->image())); item->setIcon(0,db->icon(item->GroupHandle->image()));
@ -212,6 +212,7 @@ void KeepassGroupView::dragEnterEvent ( QDragEnterEvent * event ){
void KeepassGroupView::dragLeaveEvent ( QDragLeaveEvent * event ){ void KeepassGroupView::dragLeaveEvent ( QDragLeaveEvent * event ){
Q_UNUSED(event);
if(LastHoverItem){ if(LastHoverItem){
LastHoverItem->setBackgroundColor(0,QApplication::palette().color(QPalette::Base)); LastHoverItem->setBackgroundColor(0,QApplication::palette().color(QPalette::Base));
LastHoverItem->setForeground(0,QBrush(QApplication::palette().color(QPalette::Text))); LastHoverItem->setForeground(0,QBrush(QApplication::palette().color(QPalette::Text)));

@ -68,6 +68,7 @@ void WaitAnimationWidget::refreshAnimation(){
} }
void WaitAnimationWidget::paintEvent(QPaintEvent* event){ void WaitAnimationWidget::paintEvent(QPaintEvent* event){
Q_UNUSED(event);
if(timer.isActive()){ if(timer.isActive()){
QPainter painter(this); QPainter painter(this);
painter.setRenderHints(QPainter::Antialiasing,true); painter.setRenderHints(QPainter::Antialiasing,true);
@ -82,6 +83,7 @@ void WaitAnimationWidget::paintEvent(QPaintEvent* event){
} }
void WaitAnimationWidget::resizeEvent(QResizeEvent* event){ void WaitAnimationWidget::resizeEvent(QResizeEvent* event){
Q_UNUSED(event);
float r; float r;
if(width()>height()) if(width()>height())
r=height()/2; r=height()/2;

@ -342,8 +342,8 @@ QList<Translation> getAllTranslations(){
QDir dir(paths[i]); QDir dir(paths[i]);
QStringList TrFiles=dir.entryList(QStringList()<<"*.qm",QDir::Files); QStringList TrFiles=dir.entryList(QStringList()<<"*.qm",QDir::Files);
for (int j=0;j<TrFiles.size();j++){ for (int j=0;j<TrFiles.size();j++){
if (filename.exactMatch(TrFiles[j]) && tmpTranslator.load(TrFiles[j],paths[i]) && if (filename.exactMatch(TrFiles[j]) && TrFiles[j]!="keepassx-xx_XX.qm" &&
!names.contains(filename.cap(1))) tmpTranslator.load(TrFiles[j],paths[i]) && !names.contains(filename.cap(1)))
{ {
Translation t; Translation t;
t.nameCode = filename.cap(1); t.nameCode = filename.cap(1);

@ -172,10 +172,10 @@ void KeepassMainWindow::setupConnections(){
connect(ViewShowToolbarAction,SIGNAL(toggled(bool)),this,SLOT(OnViewShowToolbar(bool))); connect(ViewShowToolbarAction,SIGNAL(toggled(bool)),this,SLOT(OnViewShowToolbar(bool)));
connect(ViewShowEntryDetailsAction,SIGNAL(toggled(bool)),this,SLOT(OnViewShowEntryDetails(bool))); connect(ViewShowEntryDetailsAction,SIGNAL(toggled(bool)),this,SLOT(OnViewShowEntryDetails(bool)));
connect(ViewHidePasswordsAction,SIGNAL(toggled(bool)), this, SLOT(OnUsernPasswVisibilityChanged(bool))); connect(ViewHidePasswordsAction,SIGNAL(toggled(bool)), this, SLOT(OnUsernPasswVisibilityChanged()));
connect(ViewHideUsernamesAction,SIGNAL(toggled(bool)), this, SLOT(OnUsernPasswVisibilityChanged(bool))); connect(ViewHideUsernamesAction,SIGNAL(toggled(bool)), this, SLOT(OnUsernPasswVisibilityChanged()));
connect(menuColumns,SIGNAL(triggered(QAction*)),this,SLOT(OnColumnVisibilityChanged(QAction*))); connect(menuColumns,SIGNAL(triggered(QAction*)),this,SLOT(OnColumnVisibilityChanged()));
connect(ViewToolButtonSize16Action,SIGNAL(toggled(bool)), this, SLOT(OnViewToolbarIconSize16(bool))); connect(ViewToolButtonSize16Action,SIGNAL(toggled(bool)), this, SLOT(OnViewToolbarIconSize16(bool)));
connect(ViewToolButtonSize22Action,SIGNAL(toggled(bool)), this, SLOT(OnViewToolbarIconSize22(bool))); connect(ViewToolButtonSize22Action,SIGNAL(toggled(bool)), this, SLOT(OnViewToolbarIconSize22(bool)));
connect(ViewToolButtonSize28Action,SIGNAL(toggled(bool)), this, SLOT(OnViewToolbarIconSize28(bool))); connect(ViewToolButtonSize28Action,SIGNAL(toggled(bool)), this, SLOT(OnViewToolbarIconSize28(bool)));
@ -1006,7 +1006,7 @@ void KeepassMainWindow::OnQuickSearch(){
GroupView->showSearchResults(); GroupView->showSearchResults();
} }
void KeepassMainWindow::OnColumnVisibilityChanged(QAction* action){ void KeepassMainWindow::OnColumnVisibilityChanged(){
EntryView->Columns[0]=ViewColumnsTitleAction->isChecked(); EntryView->Columns[0]=ViewColumnsTitleAction->isChecked();
EntryView->Columns[1]=ViewColumnsUsernameAction->isChecked(); EntryView->Columns[1]=ViewColumnsUsernameAction->isChecked();
EntryView->Columns[2]=ViewColumnsUrlAction->isChecked(); EntryView->Columns[2]=ViewColumnsUrlAction->isChecked();
@ -1022,7 +1022,7 @@ void KeepassMainWindow::OnColumnVisibilityChanged(QAction* action){
if(FileOpen) EntryView->refreshItems(); if(FileOpen) EntryView->refreshItems();
} }
void KeepassMainWindow::OnUsernPasswVisibilityChanged(bool value){ void KeepassMainWindow::OnUsernPasswVisibilityChanged(){
config->setHidePasswords(ViewHidePasswordsAction->isChecked()); config->setHidePasswords(ViewHidePasswordsAction->isChecked());
config->setHideUsernames(ViewHideUsernamesAction->isChecked()); config->setHideUsernames(ViewHideUsernamesAction->isChecked());
EntryView->refreshItems(); EntryView->refreshItems();
@ -1150,13 +1150,13 @@ config->setShowEntryDetails(show);
DetailView->setVisible(show); DetailView->setVisible(show);
} }
void KeepassMainWindow::OnItemExpanded(QTreeWidgetItem* item){ /*void KeepassMainWindow::OnItemExpanded(QTreeWidgetItem* item){
//((GroupViewItem*)item)->pGroup->UI_ItemIsExpanded=true; //((GroupViewItem*)item)->pGroup->UI_ItemIsExpanded=true;
} }
void KeepassMainWindow::OnItemCollaped(QTreeWidgetItem* item){ void KeepassMainWindow::OnItemCollaped(QTreeWidgetItem* item){
//((GroupViewItem*)item)->pGroup->UI_ItemIsExpanded=false; //((GroupViewItem*)item)->pGroup->UI_ItemIsExpanded=false;
} }*/
void KeepassMainWindow::OnGroupSelectionChanged(IGroupHandle* group){ void KeepassMainWindow::OnGroupSelectionChanged(IGroupHandle* group){
if(group) if(group)

@ -63,8 +63,8 @@ class KeepassMainWindow : public QMainWindow, private Ui_MainWindow{
void OnViewToolbarIconSize28(bool); void OnViewToolbarIconSize28(bool);
void OnGroupSelectionChanged(IGroupHandle*); void OnGroupSelectionChanged(IGroupHandle*);
void OnQuickSearch(); void OnQuickSearch();
void OnColumnVisibilityChanged(QAction* action); void OnColumnVisibilityChanged();
void OnUsernPasswVisibilityChanged(bool hide); void OnUsernPasswVisibilityChanged();
void OnFileModified(); void OnFileModified();
void OnExtrasSettings(); void OnExtrasSettings();
void OnExtrasPasswordGen(); void OnExtrasPasswordGen();
@ -72,8 +72,8 @@ class KeepassMainWindow : public QMainWindow, private Ui_MainWindow{
//void OnExtrasTrashCan(); //TODO TrashCan //void OnExtrasTrashCan(); //TODO TrashCan
void OnHelpAbout(); void OnHelpAbout();
//void OnHelpHandbook(); //TODO Handbook //void OnHelpHandbook(); //TODO Handbook
void OnItemExpanded(QTreeWidgetItem*); //void OnItemExpanded(QTreeWidgetItem*);
void OnItemCollaped(QTreeWidgetItem*); //void OnItemCollaped(QTreeWidgetItem*);
void OnShowSearchResults(); void OnShowSearchResults();
void OnEntryChanged(SelectionState); void OnEntryChanged(SelectionState);
void OnSysTrayActivated(QSystemTrayIcon::ActivationReason); void OnSysTrayActivated(QSystemTrayIcon::ActivationReason);

@ -1,7 +1,9 @@
CONFIG = qt uic resources thread stl warn_off CONFIG = qt uic resources thread stl warn_on
QT += xml QT += xml
contains(QMAKE_CXX, g++) : QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-compare
DEPENDPATH += crypto dialogs export forms import lib translations res DEPENDPATH += crypto dialogs export forms import lib translations res
INCLUDEPATH += . lib crypto plugins/interfaces export import dialogs INCLUDEPATH += . lib crypto plugins/interfaces export import dialogs
@ -113,7 +115,6 @@ isEqual(QMAKE_WIN32,1){
# SOURCES += main_win32.cpp # SOURCES += main_win32.cpp
} }
INSTALLS += target data INSTALLS += target data
contains(DEFINES,GLOBAL_AUTOTYPE){ contains(DEFINES,GLOBAL_AUTOTYPE){
@ -122,7 +123,6 @@ contains(DEFINES,GLOBAL_AUTOTYPE){
SOURCES += dialogs/AutoTypeDlg.cpp lib/AutoTypeTreeWidget.cpp dialogs/TargetWindowDlg.cpp SOURCES += dialogs/AutoTypeDlg.cpp lib/AutoTypeTreeWidget.cpp dialogs/TargetWindowDlg.cpp
} }
FORMS += forms/AboutDlg.ui \ FORMS += forms/AboutDlg.ui \
forms/AddBookmarkDlg.ui \ forms/AddBookmarkDlg.ui \
forms/CalendarDlg.ui \ forms/CalendarDlg.ui \
@ -143,17 +143,23 @@ FORMS += forms/AboutDlg.ui \
# forms/TrashCanDlg.ui \ # forms/TrashCanDlg.ui \
forms/WorkspaceLockedWidget.ui forms/WorkspaceLockedWidget.ui
TRANSLATIONS += translations/keepassx-cs_CZ.ts \ TRANSLATIONS_KX = translations/keepassx-de_DE.ts \
translations/keepassx-de_DE.ts \ # translations/keepassx-cs_CZ.ts \
translations/keepassx-es_ES.ts \ translations/keepassx-es_ES.ts \
translations/keepassx-fi_FI.ts \ translations/keepassx-fi_FI.ts \
translations/keepassx-fr_FR.ts \ translations/keepassx-fr_FR.ts \
translations/keepassx-gl_ES.ts \ translations/keepassx-gl_ES.ts \
translations/keepassx-it_IT.ts \ translations/keepassx-it_IT.ts \
translations/keepassx-ja_JP.ts \ # translations/keepassx-ja_JP.ts \
translations/keepassx-ru_RU.ts \ # translations/keepassx-ru_RU.ts \
translations/keepassx-tr_TR.ts \ translations/keepassx-tr_TR.ts
translations/keepassx-xx_XX.ts
TRANSLATIONS_QT = translations/qt_fi.ts \
translations/qt_it.ts \
translations/qt_tr.ts
TRANSLATIONS = $$TRANSLATIONS_KX translations/keepassx-xx_XX.ts
TRANSLATIONS_COMPILE = $$TRANSLATIONS_KX $$TRANSLATIONS_QT
HEADERS += main.h \ HEADERS += main.h \
global.h \ global.h \
@ -282,3 +288,26 @@ else {
} }
RESOURCES += res/resources.qrc RESOURCES += res/resources.qrc
isEmpty(QMAKE_LRELEASE) {
win32 {
QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe
}
else {
QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease-qt4
!exists($$QMAKE_LRELEASE) : QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
}
}
exists($$QMAKE_LRELEASE) {
updateqm.input = TRANSLATIONS_COMPILE
updateqm.output = ../share/keepassx/i18n/${QMAKE_FILE_BASE}.qm
updateqm.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm ../share/keepassx/i18n/${QMAKE_FILE_BASE}.qm
updateqm.CONFIG += no_link
QMAKE_EXTRA_COMPILERS += updateqm
PRE_TARGETDEPS += compiler_updateqm_make_all
}
else {
message("*** lrelease not found - can't compile translation files")
}

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