Commit 9161898c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix build against qt6

parent 564f1981
Pipeline #121593 passed with stage
in 1 minute and 47 seconds
......@@ -66,7 +66,11 @@ AddHostDialog::AddHostDialog(KLDAP::LdapServer *server, QWidget *parent)
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
d->mOkButton = buttonBox->button(QDialogButtonBox::Ok);
d->mOkButton->setDefault(true);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
d->mOkButton->setShortcut(Qt::CTRL | Qt::Key_Return);
#else
d->mOkButton->setShortcut({Qt::CTRL, Qt::Key_Return});
#endif
connect(buttonBox, &QDialogButtonBox::rejected, this, &AddHostDialog::reject);
setModal(true);
......
......@@ -24,8 +24,7 @@
#include <KConfigGroup>
#include <KDirWatch>
#include <KProtocolInfo>
#include <kcoreaddons_version.h>
#if KCOREADDONS_VERSION < QT_VERSION_CHECK(6, 0, 0)
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <Kdelibs4ConfigMigrator>
#endif
......@@ -88,7 +87,7 @@ LdapClientSearch::~LdapClientSearch() = default;
void LdapClientSearch::LdapClientSearchPrivate::init(const QStringList &attributes)
{
#if KCOREADDONS_VERSION < QT_VERSION_CHECK(6, 0, 0)
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
Kdelibs4ConfigMigrator migrate(QStringLiteral("ldapsettings"));
migrate.setConfigFiles(QStringList() << QStringLiteral("kabldaprc"));
migrate.migrate();
......
......@@ -9,7 +9,11 @@
#include <kldap/ldapserver.h>
#include <KConfig>
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <qt5keychain/keychain.h>
#else
#include <qt6keychain/keychain.h>
#endif
using namespace QKeychain;
using namespace KLDAP;
......
......@@ -10,7 +10,11 @@
#include <KConfig>
#include <KLocalizedString>
#include <kldap/ldapdn.h>
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <qt5keychain/keychain.h>
#else
#include <qt6keychain/keychain.h>
#endif
using namespace QKeychain;
using namespace KLDAP;
......
......@@ -9,7 +9,11 @@
#include <KConfig>
#include <kldap/ldapdn.h>
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <qt5keychain/keychain.h>
#else
#include <qt6keychain/keychain.h>
#endif
using namespace QKeychain;
using namespace KLDAP;
......
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