Fix: Editing groups doesn't work (Bug #2964295)

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@379 b624d157-de02-0410-bad0-e51aec6abb33
master
sniperbeamer 15 years ago
parent c7184b5fec
commit f015278bb9
  1. 40
      src/dialogs/EditGroupDlg.cpp
  2. 1
      src/dialogs/EditGroupDlg.h

@ -25,28 +25,32 @@
CEditGroupDialog::CEditGroupDialog(IDatabase* database,IGroupHandle* Handle,QWidget* parent, Qt::WFlags fl)
: QDialog(parent,fl)
{
setupUi(this);
db=database;
handle=Handle;
group=new CGroup();
group->Title=handle->title();
group->Image=handle->image();
connect( ButtonBox, SIGNAL( accepted() ), this, SLOT( OnOK() ) );
connect( ButtonBox, SIGNAL( rejected() ), this, SLOT( OnCancel() ) );
connect( Button_Icon, SIGNAL( clicked() ), this, SLOT( OnIconDlg() ));
adjustSize();
setMaximumSize(size());
setMinimumSize(size());
db = database;
handle = Handle;
group = new CGroup();
group->Title = handle->title();
group->Image = handle->image();
init();
}
CEditGroupDialog::CEditGroupDialog(IDatabase* database,CGroup* Group,QWidget* parent, Qt::WFlags fl)
: QDialog(parent,fl)
{
db = database;
handle = NULL;
group = Group;
init();
}
CEditGroupDialog::~CEditGroupDialog(){
}
void CEditGroupDialog::init() {
setupUi(this);
db=database;
group=Group;
handle=NULL;
connect( ButtonBox, SIGNAL( accepted() ), this, SLOT( OnOK() ) );
connect( ButtonBox, SIGNAL( rejected() ), this, SLOT( OnCancel() ) );
connect( Button_Icon, SIGNAL( clicked() ), this, SLOT( OnIconDlg() ));
@ -57,10 +61,12 @@ CEditGroupDialog::CEditGroupDialog(IDatabase* database,CGroup* Group,QWidget* pa
ComboIconPicker->insertItem(i,db->icon(i),"");
}
ComboIconPicker->setCurrentIndex(group->Image);
adjustSize();
setMaximumSize(size());
setMinimumSize(size());
}
CEditGroupDialog::~CEditGroupDialog(){
}
void CEditGroupDialog::OnOK()
{

@ -32,6 +32,7 @@ class CEditGroupDialog : public QDialog, private Ui_EditGroupDialog
~CEditGroupDialog();
private:
void init();
IDatabase* db;
IGroupHandle* handle;
CGroup* group;