Commit e516a21f authored by Laurent Montel's avatar Laurent Montel 😁

USe new connect api

parent 08b8197f
......@@ -37,7 +37,7 @@ void LineEditWithCompleter::contextMenuEvent(QContextMenuEvent *e)
{
QMenu *popup = KLineEdit::createStandardContextMenu();
popup->addSeparator();
popup->addAction(QIcon::fromTheme(QStringLiteral("edit-clear-locationbar-rtl")), i18n("Clear History"), this, SLOT(slotClearHistory()));
popup->addAction(QIcon::fromTheme(QStringLiteral("edit-clear-locationbar-rtl")), i18n("Clear History"), this, &LineEditWithCompleter::slotClearHistory);
popup->exec(e->globalPos());
delete popup;
}
......
......@@ -449,14 +449,14 @@ void SimpleStringListEditor::slotContextMenu(const QPoint &pos)
const bool hasItemsSelected = !lstSelectedItems.isEmpty();
QMenu *menu = new QMenu(this);
if (d->mAddButton) {
menu->addAction(d->mAddButton->text(), this, SLOT(slotAdd()));
menu->addAction(d->mAddButton->text(), this, &SimpleStringListEditor::slotAdd);
}
if (d->mModifyButton && (lstSelectedItems.count() == 1)) {
menu->addAction(d->mModifyButton->text(), this, SLOT(slotModify()));
menu->addAction(d->mModifyButton->text(), this, &SimpleStringListEditor::slotModify);
}
if (d->mRemoveButton && hasItemsSelected) {
menu->addSeparator();
menu->addAction(d->mRemoveButton->text(), this, SLOT(slotRemove()));
menu->addAction(d->mRemoveButton->text(), this, &SimpleStringListEditor::slotRemove);
}
menu->exec(d->mListBox->mapToGlobal(pos));
delete menu;
......
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