Commit 69751df7 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile against qt6

parent eb49c7ca
Pipeline #140115 failed with stage
in 51 seconds
......@@ -26,12 +26,12 @@
#include <KConfig>
#include <KContacts/VCardConverter>
#include <Prison/Prison>
#include <QGuiApplication>
#include <QIcon>
#include <QScreen>
#include <QUrlQuery>
#include <QVBoxLayout>
#include <prison/Prison>
using namespace Akonadi;
......
......@@ -259,10 +259,11 @@ QString GrantleeContactFormatter::toHtml(HtmlForm form) const
mapping.insert(QStringLiteral("hasqrcode"), !d->forceDisableQRCode && d->showQRCode);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
Grantlee::Context context(mapping);
context.setLocalizer(d->mEngine->localizer());
#else
KTextTemplate::Context context(mapping);
// TODO context.setLocalizer(d->mEngine->localizer());
#endif
context.setLocalizer(d->mEngine->localizer());
if (form == SelfcontainedForm) {
return d->mSelfcontainedTemplate->render(&context);
......@@ -275,5 +276,9 @@ QString GrantleeContactFormatter::toHtml(HtmlForm form) const
void GrantleeContactFormatter::setApplicationDomain(const QByteArray &domain)
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
d->mEngine->localizer()->setApplicationDomain(domain);
#else
// TODO qt6
#endif
}
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