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. 28
      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());
init();
}
CEditGroupDialog::CEditGroupDialog(IDatabase* database,CGroup* Group,QWidget* parent, Qt::WFlags fl)
: QDialog(parent,fl)
{
setupUi(this);
db = database;
group=Group;
handle = NULL;
group = Group;
init();
}
CEditGroupDialog::~CEditGroupDialog(){
}
void CEditGroupDialog::init() {
setupUi(this);
connect( ButtonBox, SIGNAL( accepted() ), this, SLOT( OnOK() ) );
connect( ButtonBox, SIGNAL( rejected() ), this, SLOT( OnCancel() ) );
connect( Button_Icon, SIGNAL( clicked() ), this, SLOT( OnIconDlg() ));
@ -57,11 +61,13 @@ CEditGroupDialog::CEditGroupDialog(IDatabase* database,CGroup* Group,QWidget* pa
ComboIconPicker->insertItem(i,db->icon(i),"");
}
ComboIconPicker->setCurrentIndex(group->Image);
}
CEditGroupDialog::~CEditGroupDialog(){
adjustSize();
setMaximumSize(size());
setMinimumSize(size());
}
void CEditGroupDialog::OnOK()
{
int r=1;

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