Commit 99151643 authored by Allen Winter's avatar Allen Winter
Browse files

fix crashing dialogs for Category and Filter managers

parent 5fd1683f
......@@ -347,12 +347,15 @@ void FilterEdit::editCategorySelection()
if (!mCategorySelectDialog) {
mCategorySelectDialog = new KPIM::TagSelectionDialog(this);
mCategorySelectDialog->buttons()->setStandardButtons(
QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help);
connect(mCategorySelectDialog, &KPIM::TagSelectionDialog::accepted, this,
&FilterEdit::updateCategorySelection);
connect(mCategorySelectDialog->buttons()->button(
QDialogButtonBox::Help), &QPushButton::clicked, this, &FilterEdit::slotHelp);
QDialogButtonBox *buttons = mCategorySelectDialog->buttons();
if (buttons) {
buttons->setStandardButtons(
QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help);
connect(mCategorySelectDialog, &KPIM::TagSelectionDialog::accepted,
this, &FilterEdit::updateCategorySelection);
connect(buttons->button(QDialogButtonBox::Help), &QPushButton::clicked,
this, &FilterEdit::slotHelp);
}
}
mCategorySelectDialog->setSelection(mCurrent->categoryList());
......
......@@ -215,12 +215,13 @@ void KODialogManager::createCategoryEditor()
{
if (!mCategoryEditDialog) {
mCategoryEditDialog = new Akonadi::TagManagementDialog(mMainView);
mCategoryEditDialog->buttons()->setStandardButtons(
QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help);
connect(mCategoryEditDialog->buttons()->button(
QDialogButtonBox::Help), &QPushButton::clicked, this,
&KODialogManager::slotHelp);
QDialogButtonBox *buttons = mCategoryEditDialog->buttons();
if (buttons) {
buttons->setStandardButtons(
QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help);
connect(buttons->button(QDialogButtonBox::Help), &QPushButton::clicked,
this, &KODialogManager::slotHelp);
}
mCategoryEditDialog->setModal(true);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment