Fix: Sudden exit on bookmarking a new (not saved) file (Bug #2599802)
Safer SecString::overwrite(QString&) git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@261 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
@@ -29,17 +29,17 @@ AddBookmarkDlg::AddBookmarkDlg(QWidget* parent, QString DefaultFilename, int _It
|
||||
connect(buttonBox->button(QDialogButtonBox::Ok),SIGNAL(clicked()),this,SLOT(OnButtonOk()));
|
||||
connect(buttonBox->button(QDialogButtonBox::Cancel),SIGNAL(clicked()),this,SLOT(reject()));
|
||||
if(ItemID==-1){
|
||||
createBanner(&BannerPixmap,getPixmap("bookmark_add"),tr("Add Bookmark"),width());
|
||||
createBanner(&BannerPixmap,getPixmap("bookmark_add"),tr("Add Bookmark"),width());
|
||||
|
||||
if(DefaultFilename.isEmpty())
|
||||
OnButtonBrowse();
|
||||
QMetaObject::invokeMethod(this, "OnButtonBrowse", Qt::QueuedConnection);
|
||||
else
|
||||
Edit_Filename->setText(DefaultFilename);
|
||||
}
|
||||
else {
|
||||
createBanner(&BannerPixmap,getPixmap("bookmark_edit"),tr("Edit Bookmark"),width());
|
||||
createBanner(&BannerPixmap,getPixmap("bookmark_edit"),tr("Edit Bookmark"),width());
|
||||
|
||||
Edit_Title->setText(KpxBookmarks::title(ItemID));
|
||||
Edit_Title->setText(KpxBookmarks::title(ItemID));
|
||||
Edit_Filename->setText(KpxBookmarks::path(ItemID));
|
||||
setWindowTitle(tr("Edit Bookmark"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user