Commit 8c3bbafa authored by Laurent Montel's avatar Laurent Montel
Browse files

Port deprecated methods

parent 32ad52e1
Pipeline #248361 passed with stage
in 9 minutes and 51 seconds
......@@ -18,6 +18,7 @@
#include <KMessageBox>
#include <QDialogButtonBox>
#include <QHBoxLayout>
#include <kwidgetsaddons_version.h>
#include "ldapclientsearch.h"
#include "ldapclientsearchconfig.h"
......@@ -109,12 +110,20 @@ void LdapConfigureWidget::slotRemoveHost()
return;
}
auto ldapItem = dynamic_cast<LdapWidgetItem *>(item);
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
const int answer = KMessageBox::questionTwoActions(this,
#else
const int answer = KMessageBox::questionYesNo(this,
i18n("Do you want to remove setting for host \"%1\"?", ldapItem->server().host()),
i18n("Remove Host"),
KStandardGuiItem::remove(),
KStandardGuiItem::cancel());
#endif
i18n("Do you want to remove setting for host \"%1\"?", ldapItem->server().host()),
i18n("Remove Host"),
KStandardGuiItem::remove(),
KStandardGuiItem::cancel());
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
if (answer == KMessageBox::SecondaryAction) {
#else
if (answer == KMessageBox::No) {
#endif
return;
}
......
Supports Markdown
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