Commit ceb48846 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix some qt6 compile errors

parent f26bb4c6
......@@ -6,6 +6,8 @@
SPDX-License-Identifier: GPL-2.0-or-later WITH Qt-Commercial-exception-1.0
*/
#pragma once
#include "article.h"
#include "articlematcher.h"
#include <QObject>
......@@ -18,7 +20,6 @@ class QModelIndex;
namespace Akregator
{
class Article;
class ArticleModel;
class FeedList;
class FolderExpansionHandler;
......
......@@ -32,6 +32,7 @@
#include <KStandardShortcut>
#include <KToggleAction>
#include <QAction>
#include <QActionGroup>
#include <QKeySequence>
#include <QMenu>
#include <kxmlguifactory.h>
......
......@@ -61,6 +61,9 @@
#include <QTextStream>
#include <QTimer>
#include <QWidget>
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#include <QWebEngineProfile>
#endif
#include <QFontDatabase>
#include <QStandardPaths>
......@@ -624,12 +627,21 @@ void Part::initFonts()
}
Settings::setMediumFontSize(medfs);
}
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QWebEngineSettings::defaultSettings()->setFontFamily(QWebEngineSettings::StandardFont, Settings::standardFont());
QWebEngineSettings::defaultSettings()->setFontFamily(QWebEngineSettings::FixedFont, Settings::fixedFont());
QWebEngineSettings::defaultSettings()->setFontFamily(QWebEngineSettings::SerifFont, Settings::serifFont());
QWebEngineSettings::defaultSettings()->setFontFamily(QWebEngineSettings::SansSerifFont, Settings::sansSerifFont());
QWebEngineSettings::defaultSettings()->setFontSize(QWebEngineSettings::MinimumFontSize, Settings::minimumFontSize());
QWebEngineSettings::defaultSettings()->setFontSize(QWebEngineSettings::DefaultFontSize, Settings::mediumFontSize());
#else
QWebEngineProfile::defaultProfile()->settings()->setFontFamily(QWebEngineSettings::StandardFont, Settings::standardFont());
QWebEngineProfile::defaultProfile()->settings()->setFontFamily(QWebEngineSettings::FixedFont, Settings::fixedFont());
QWebEngineProfile::defaultProfile()->settings()->setFontFamily(QWebEngineSettings::SerifFont, Settings::serifFont());
QWebEngineProfile::defaultProfile()->settings()->setFontFamily(QWebEngineSettings::SansSerifFont, Settings::sansSerifFont());
QWebEngineProfile::defaultProfile()->settings()->setFontSize(QWebEngineSettings::MinimumFontSize, Settings::minimumFontSize());
QWebEngineProfile::defaultProfile()->settings()->setFontSize(QWebEngineSettings::DefaultFontSize, Settings::mediumFontSize());
#endif
}
bool Part::handleCommandLine(const QStringList &args)
......
......@@ -9,6 +9,8 @@
#pragma once
#include "article.h"
#include <KSharedConfig>
#include <QPointer>
#include <QVector>
......@@ -30,7 +32,6 @@ namespace Backend
class Storage;
}
class Article;
class ActionManagerImpl;
class Feed;
class FeedList;
......
......@@ -10,13 +10,13 @@
#include <QAbstractTableModel>
#include "akregatorpart_export.h"
#include "article.h"
#include <QSharedPointer>
#include <vector>
namespace Akregator
{
class Article;
class TreeNode;
namespace Filters
......
......@@ -20,6 +20,7 @@
#include <QApplication>
#include <QByteArray>
#include <QDataStream>
#include <QIODevice>
#include <QIcon>
#include <QItemSelection>
#include <QList>
......
......@@ -491,5 +491,9 @@ void TabWidget::slotCloseRequest(int index)
void TabWidget::slotActivateTab()
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
setCurrentIndex(sender()->objectName().rightRef(2).toInt() - 1);
#else
setCurrentIndex(QStringView(sender()->objectName()).right(2).toInt() - 1);
#endif
}
......@@ -7,6 +7,7 @@
#include "statussearchline.h"
#include <KLocalizedString>
#include <QAction>
#include <QActionGroup>
#include <QKeyEvent>
#include <QMenu>
......
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