Commit 91a36c2f authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix some qt6 compile error

parent 4d564504
Pipeline #180695 passed with stage
in 5 minutes and 34 seconds
......@@ -14,7 +14,7 @@
#include <KDBusService>
#include <KLocalizedString>
#include <KCrash/KCrash>
#include <KCrash>
#include <QCommandLineParser>
#include <QIcon>
......
......@@ -172,7 +172,11 @@ bool AttachPropertyDialog::saveProperty(QTreeWidget *lv, KTNEFPropertySet *pSet,
KMessageBox::error(parent, i18nc("@info", "The selected item cannot be saved because it has an empty tag."));
} else {
QString tag = item->text(2);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
const int key = tag.midRef(5).toInt();
#else
const int key = QStringView(tag).mid(5).toInt();
#endif
QVariant prop = (tag.startsWith(QLatin1String("attr_")) ? pSet->attribute(key) : pSet->property(key));
QString filename = QFileDialog::getSaveFileName(parent, QString(), tag, QString());
if (!filename.isEmpty()) {
......
......@@ -16,7 +16,6 @@
#include "ktnefview.h"
#include "messagepropertydialog.h"
#include <KTNEF/KTNEFAttach>
#include <KTNEF/KTNEFMessage>
#include <KTNEF/KTNEFParser>
#include <KTNEF/KTNEFProperty>
......@@ -44,6 +43,7 @@
#include <KRecentFilesMenu>
#include <KSharedConfig>
#include <QActionGroup>
#include <QContextMenuEvent>
#include <QDir>
#include <QDrag>
......
......@@ -14,7 +14,9 @@
#pragma once
#include <KService>
#include <KTNEF/KTNEFAttach>
#include <KXmlGuiWindow>
class QActionGroup;
class QAction;
class QContextMenuEvent;
......@@ -25,7 +27,6 @@ class QUrl;
namespace KTnef
{
class KTNEFParser;
class KTNEFAttach;
}
using namespace KTnef;
......
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