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

Fix some qt6 compile error

parent 58419bd8
Pipeline #116101 passed with stage
in 4 minutes and 53 seconds
......@@ -24,7 +24,7 @@
#include <QSessionManager>
#include <KAboutData>
#include <KCrash/KCrash>
#include <KCrash>
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
......@@ -70,9 +70,9 @@ int main(int argc, char **argv)
AccountsIntegration accountsIntegration(agentManager);
#endif
KCrash::setEmergencySaveFunction(crashHandler);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QGuiApplication::setFallbackSessionManagementEnabled(false);
#endif
// akonadi_control is started on-demand, no need to auto restart by session.
auto disableSessionManagement = [](QSessionManager &sm) {
sm.setRestartHint(QSessionManager::RestartNever);
......
......@@ -12,7 +12,12 @@
class QObject;
class QString;
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
template<typename T> class QVector;
#else
template<typename T>
class QList;
#endif
namespace Akonadi
{
......
......@@ -32,10 +32,14 @@
#include &lt;QtCore/QSharedDataPointer&gt;
#include &lt;QtCore/QString&gt;
#include &lt;QtCore/QVariant&gt;
#include &lt;QtCore/QStringList&gt;
#if QT_VERSION &lt; QT_VERSION_CHECK(6, 0, 0)
template &lt;typename T&gt; class QVector;
#else
template &lt;typename T&gt; class QList;
#endif
class QSqlQuery;
class QStringList;
namespace Akonadi {
namespace Server {
......
......@@ -19,7 +19,7 @@
#include <QLoggingCategory>
#include <QMutex>
#include <KCrash/KCrash>
#include <KCrash>
#include <cassert>
......@@ -195,7 +195,8 @@ void akMessageHandler(QtMsgType type, const QMessageLogContext &context, const Q
void akCategoryFilter(QLoggingCategory *category)
{
if ((qstrcmp(category->categoryName(), sInstance()->loggingCategory) == 0) || (qstrcmp(category->categoryName(), "org.kde.pim.akonadiprivate") == 0)) {
if ((qstrcmp(category->categoryName(), sInstance()->loggingCategory.constData()) == 0)
|| (qstrcmp(category->categoryName(), "org.kde.pim.akonadiprivate") == 0)) {
category->setEnabled(QtDebugMsg, true);
category->setEnabled(QtInfoMsg, true);
category->setEnabled(QtWarningMsg, true);
......
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