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
This commit is contained in:
		
							parent
							
								
									c7184b5fec
								
							
						
					
					
						commit
						f015278bb9
					
				| 
						 | 
					@ -25,28 +25,32 @@
 | 
				
			||||||
CEditGroupDialog::CEditGroupDialog(IDatabase* database,IGroupHandle* Handle,QWidget* parent, Qt::WFlags fl)
 | 
					CEditGroupDialog::CEditGroupDialog(IDatabase* database,IGroupHandle* Handle,QWidget* parent, Qt::WFlags fl)
 | 
				
			||||||
: QDialog(parent,fl)
 | 
					: QDialog(parent,fl)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	setupUi(this);
 | 
					 | 
				
			||||||
	db = database;
 | 
						db = database;
 | 
				
			||||||
	handle = Handle;
 | 
						handle = Handle;
 | 
				
			||||||
	group = new CGroup();
 | 
						group = new CGroup();
 | 
				
			||||||
	group->Title = handle->title();
 | 
						group->Title = handle->title();
 | 
				
			||||||
	group->Image = handle->image();
 | 
						group->Image = handle->image();
 | 
				
			||||||
	connect( ButtonBox, SIGNAL( accepted() ), this, SLOT( OnOK() ) );
 | 
						
 | 
				
			||||||
	connect( ButtonBox, SIGNAL( rejected() ), this, SLOT( OnCancel() ) );
 | 
						init();
 | 
				
			||||||
	connect( Button_Icon, SIGNAL( clicked() ), this, SLOT( OnIconDlg() ));
 | 
					 | 
				
			||||||
	adjustSize();
 | 
					 | 
				
			||||||
	setMaximumSize(size());
 | 
					 | 
				
			||||||
	setMinimumSize(size());
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CEditGroupDialog::CEditGroupDialog(IDatabase* database,CGroup* Group,QWidget* parent, Qt::WFlags fl)
 | 
					CEditGroupDialog::CEditGroupDialog(IDatabase* database,CGroup* Group,QWidget* parent, Qt::WFlags fl)
 | 
				
			||||||
	: QDialog(parent,fl)
 | 
						: QDialog(parent,fl)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	setupUi(this);
 | 
					 | 
				
			||||||
	db = database;
 | 
						db = database;
 | 
				
			||||||
	group=Group;
 | 
					 | 
				
			||||||
	handle = NULL;
 | 
						handle = NULL;
 | 
				
			||||||
 | 
						group = Group;
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						init();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					CEditGroupDialog::~CEditGroupDialog(){
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void CEditGroupDialog::init() {
 | 
				
			||||||
 | 
						setupUi(this);
 | 
				
			||||||
 | 
						
 | 
				
			||||||
	connect( ButtonBox, SIGNAL( accepted() ), this, SLOT( OnOK() ) );
 | 
						connect( ButtonBox, SIGNAL( accepted() ), this, SLOT( OnOK() ) );
 | 
				
			||||||
	connect( ButtonBox, SIGNAL( rejected() ), this, SLOT( OnCancel() ) );
 | 
						connect( ButtonBox, SIGNAL( rejected() ), this, SLOT( OnCancel() ) );
 | 
				
			||||||
	connect( Button_Icon, SIGNAL( clicked() ), this, SLOT( OnIconDlg() ));
 | 
						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->insertItem(i,db->icon(i),"");
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	ComboIconPicker->setCurrentIndex(group->Image);
 | 
						ComboIconPicker->setCurrentIndex(group->Image);
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						adjustSize();
 | 
				
			||||||
 | 
						setMaximumSize(size());
 | 
				
			||||||
 | 
						setMinimumSize(size());
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CEditGroupDialog::~CEditGroupDialog(){
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
void CEditGroupDialog::OnOK()
 | 
					void CEditGroupDialog::OnOK()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -32,6 +32,7 @@ class CEditGroupDialog : public QDialog, private Ui_EditGroupDialog
 | 
				
			||||||
		~CEditGroupDialog();
 | 
							~CEditGroupDialog();
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	private:
 | 
						private:
 | 
				
			||||||
 | 
							void init();
 | 
				
			||||||
		IDatabase* db;
 | 
							IDatabase* db;
 | 
				
			||||||
		IGroupHandle* handle; 
 | 
							IGroupHandle* handle; 
 | 
				
			||||||
		CGroup* group;
 | 
							CGroup* group;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue