From 0b1103b41db101d2a509e1bdf5385b29410e41e9 Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Tue, 7 May 2024 10:49:43 +0300 Subject: Fix IFW build with Qt version 6.7.x Change-Id: Ida10f40ee58db9ea8282c46a940d1ef12e81ba93 Reviewed-by: Arttu Tarkiainen --- src/libs/installer/remotefileengine.cpp | 6 +++++- src/libs/installer/remotefileengine.h | 6 +++++- src/libs/installer/remoteserverconnection.cpp | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) (limited to 'src/libs') diff --git a/src/libs/installer/remotefileengine.cpp b/src/libs/installer/remotefileengine.cpp index 7a5e91682..2ead83861 100644 --- a/src/libs/installer/remotefileengine.cpp +++ b/src/libs/installer/remotefileengine.cpp @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2023 The Qt Company Ltd. +** Copyright (C) 2024 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -554,7 +554,11 @@ bool RemoteFileEngine::renameOverwrite(const QString &newName) return m_fileEngine.renameOverwrite(newName); } +#if QT_VERSION < QT_VERSION_CHECK(6, 7, 0) QDateTime RemoteFileEngine::fileTime(FileTime time) const +#else +QDateTime RemoteFileEngine::fileTime(QFile::FileTime time) const +#endif { if ((const_cast(this))->connectToServer()) { return callRemoteMethod diff --git a/src/libs/installer/remotefileengine.h b/src/libs/installer/remotefileengine.h index 31ae67d77..c46e861ca 100644 --- a/src/libs/installer/remotefileengine.h +++ b/src/libs/installer/remotefileengine.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2022 The Qt Company Ltd. +** Copyright (C) 2024 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -87,7 +87,11 @@ public: QString fileName(FileName file = DefaultName) const override; uint ownerId(FileOwner owner) const override; QString owner(FileOwner owner) const override; +#if QT_VERSION < QT_VERSION_CHECK(6, 7, 0) QDateTime fileTime(FileTime time) const override; +#else + QDateTime fileTime(QFile::FileTime time) const override; +#endif void setFileName(const QString &fileName) override; int handle() const override; bool atEnd() const; diff --git a/src/libs/installer/remoteserverconnection.cpp b/src/libs/installer/remoteserverconnection.cpp index 51619983e..55c4f48d9 100644 --- a/src/libs/installer/remoteserverconnection.cpp +++ b/src/libs/installer/remoteserverconnection.cpp @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2023 The Qt Company Ltd. +** Copyright (C) 2024 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -580,7 +580,11 @@ void RemoteServerConnection::handleQFSFileEngine(RemoteServerReply *reply, const } else if (command == QLatin1String(Protocol::QAbstractFileEngineFileTime)) { qint32 filetime; data >> filetime; +#if QT_VERSION < QT_VERSION_CHECK(6, 7, 0) reply->send(m_engine->fileTime(static_cast (filetime))); +#else + reply->send(m_engine->fileTime(static_cast (filetime))); +#endif } else if (!command.isEmpty()) { qCDebug(QInstaller::lcServer) << "Unknown QAbstractFileEngine command:" << command; } -- cgit v1.2.3