Commit 562644fe authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

fix some qt6 compile error

parent b09fb854
Pipeline #180674 passed with stage
in 10 minutes and 52 seconds
......@@ -6,6 +6,7 @@
#pragma once
#include <MessageViewer/MessageViewerCheckBeforeDeletingPlugin>
#include <QVariant>
class ConfirmBeforeDeletingPlugin : public MessageViewer::MessageViewerCheckBeforeDeletingPlugin
{
......
......@@ -13,6 +13,7 @@
#include <MessageComposer/PluginComposerInterface>
#include <QAction>
#include <QDebug>
#include <QMenu>
#include <QPushButton>
#include <QTextBlock>
......
......@@ -14,6 +14,7 @@
#include <KPIMTextEdit/RichTextEditor>
#include <PimCommon/KActionMenuChangeCase>
#include <QAction>
#include <QMenu>
ShareTextPluginEditorInterface::ShareTextPluginEditorInterface(QObject *parent)
: MessageComposer::PluginEditorInterface(parent)
......
......@@ -60,7 +60,7 @@ bool GrammarResultTextEdit::event(QEvent *ev)
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
if (ev->type() == QEvent::ApplicationPaletteChange) {
regenerateColorScheme();
generalPaletteChanged();
}
#endif
return QTextEdit::event(ev);
......
......@@ -41,7 +41,11 @@ QString GnuPGWKSMessagePart::nonce() const
return mNonce;
}
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
GnuPGWKSMessagePart::ConfirmationType GnuPGWKSMessagePart::stringToType(const QStringRef &str)
#else
GnuPGWKSMessagePart::ConfirmationType GnuPGWKSMessagePart::stringToType(const QStringView &str)
#endif
{
if (str == QLatin1String("confirmation-request")) {
return ConfirmationRequest;
......
......@@ -45,8 +45,11 @@ public:
protected:
void parseContent(KMime::Content *node);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
Q_REQUIRED_RESULT ConfirmationType stringToType(const QStringRef &str);
#else
Q_REQUIRED_RESULT ConfirmationType stringToType(const QStringView &str);
#endif
QString mSender;
QString mAddress;
QString mFingerprint;
......
......@@ -165,7 +165,11 @@ public:
}
KContacts::VCardConverter vcc;
const KContacts::Addressee::List al = vcc.parseVCards(vCard.toUtf8());
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
const int index = path.rightRef(path.length() - path.lastIndexOf(QLatin1Char(':')) - 1).toInt();
#else
const int index = QStringView(path).right(path.length() - path.lastIndexOf(QLatin1Char(':')) - 1).toInt();
#endif
if (index == -1 || index >= al.count()) {
return true;
}
......@@ -191,7 +195,11 @@ public:
if (!vCard.isEmpty()) {
KContacts::VCardConverter vcc;
const KContacts::Addressee::List al = vcc.parseVCards(vCard.toUtf8());
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
const int index = path.rightRef(path.length() - path.lastIndexOf(QLatin1Char(':')) - 1).toInt();
#else
const int index = QStringView(path).right(path.length() - path.lastIndexOf(QLatin1Char(':')) - 1).toInt();
#endif
if (index >= 0 && index < al.count()) {
return al.at(index);
}
......
......@@ -9,6 +9,7 @@
#include "viewerpluginexternalscriptparseargument.h"
#include <QAction>
#include <QActionGroup>
#include <QIcon>
#include <QPointer>
#include <QProcess>
......
......@@ -9,6 +9,7 @@
#include "pimeventsplugin_debug.h"
#include <QCoreApplication>
#include <QVariant>
#define APP_PROPERTY_NAME "PIMEventsPluginSettingsChangeNotifier"
......
......@@ -79,7 +79,9 @@ void AdblockManager::loadSubscriptions()
}
QTextStream textStream(&file);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
textStream.setCodec("UTF-8");
#endif
const QString title = textStream.readLine(1024).remove(QLatin1String("Title: "));
const QUrl url = QUrl(textStream.readLine(1024).remove(QLatin1String("Url: ")));
......
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