From 73d6cb5af6a7532df2904266ad2ae5df90c20162 Mon Sep 17 00:00:00 2001 From: Pier Luigi Fiorini Date: Thu, 18 Jan 2024 20:35:41 +0100 Subject: [PATCH] Update to Qt 6 --- README.md | 12 +++++------- src/CMakeLists.txt | 16 ++++++---------- src/desktopportal.cpp | 6 ++++++ src/desktopportal.h | 4 ++++ src/screenshotclient.cpp | 2 ++ src/screenshotclient.h | 2 ++ src/waylandintegration.h | 2 -- 7 files changed, 25 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 19cf0a1..6872aae 100644 --- a/README.md +++ b/README.md @@ -18,20 +18,18 @@ that is using Qt and Liri. ## Dependencies -Make sure you have Qt >= 5.10.0 with the following modules: +Make sure you have Qt >= 6.6.0 with the following modules: * [qtbase](http://code.qt.io/cgit/qt/qtbase.git) * [qtdeclarative](http://code.qt.io/cgit/qt/qtdeclarative.git) - * [qtquickcontrols2](http://code.qt.io/cgit/qt/qtquickcontrols2.git) And the following modules: - * [cmake](https://gitlab.kitware.com/cmake/cmake) >= 3.10.0 - * [cmake-shared](https://github.com/lirios/cmake-shared.git) >= 1.0.0 - * [qtaccountsservice](https://github.com/lirios/qtaccountsservice) >= 1.2.0 - * [qtgsettings](https://github.com/lirios/qtgsettings) >= 1.1.0 + * [cmake](https://gitlab.kitware.com/cmake/cmake) >= 3.19.0 + * [cmake-shared](https://github.com/lirios/cmake-shared.git) >= 3.0.0 + * [qtaccountsservice](https://github.com/lirios/qtaccountsservice) >= 2.0.0 + * [qtgsettings](https://github.com/lirios/qtgsettings) >= 2.0.0 * [libliri](https://github.com/lirios/libliri.git) - * [aurora-client](https://github.com/lirios/aurora-client) Optional dependencies: diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 30ba73c..f5b28a6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -11,9 +11,6 @@ endif() if(NOT TARGET Liri::Notifications) find_package(Liri1Notifications REQUIRED) endif() -if(NOT TARGET Liri::AuroraClient) - find_package(Liri1AuroraClient REQUIRED) -endif() if(NOT TARGET Liri::Xdg) find_package(Liri1Xdg REQUIRED) endif() @@ -100,15 +97,14 @@ liri_add_executable(XdgDesktopPortalLiri Liri::Qt5AccountsService Liri::Qt5GSettings Liri::Notifications - Liri::AuroraClient Liri::Xdg ) -if(TARGET PkgConfig::PipeWire) - liri_extend_target("XdgDesktopPortalLiri" - DEFINES SCREENCAST_ENABLED - SOURCES "${screencast_SOURCES}" - LIBRARIES "PkgConfig::PipeWire;PkgConfig::Libdrm") -endif() +#if(TARGET PkgConfig::PipeWire) +# liri_extend_target("XdgDesktopPortalLiri" +# DEFINES SCREENCAST_ENABLED +# SOURCES "${screencast_SOURCES}" +# LIBRARIES "PkgConfig::PipeWire;PkgConfig::Libdrm") +#endif() liri_finalize_executable("XdgDesktopPortalLiri") diff --git a/src/desktopportal.cpp b/src/desktopportal.cpp index c334ed9..6787d9f 100644 --- a/src/desktopportal.cpp +++ b/src/desktopportal.cpp @@ -43,8 +43,10 @@ DesktopPortal::DesktopPortal(QObject *parent) , m_screenshot(new ScreenshotPortal(this)) , m_settings(new SettingsPortal(this)) , m_wallpaper(new WallpaperPortal(this)) +#if 0 , m_screenshotClient(new ScreenshotClient(this)) , m_screenshotImageProvider(new ScreenshotImageProvider()) +#endif { m_engine->addImageProvider(QStringLiteral("screenshooter"), m_screenshotImageProvider); m_engine->rootContext()->setContextProperty(QStringLiteral("Screenshooter"), m_screenshotClient); @@ -54,9 +56,11 @@ DesktopPortal::DesktopPortal(QObject *parent) connect(m_engine, &QQmlEngine::exit, QCoreApplication::instance(), &QCoreApplication::exit); +#if 0 connect(m_screenshotClient, &ScreenshotClient::screenshotDone, this, [this] { m_screenshotImageProvider->image = m_screenshotClient->image(); }); +#endif } QQmlEngine *DesktopPortal::engine() const @@ -64,10 +68,12 @@ QQmlEngine *DesktopPortal::engine() const return m_engine; } +#if 0 ScreenshotClient *DesktopPortal::screenshotClient() const { return m_screenshotClient; } +#endif DesktopPortal *DesktopPortal::instance() { diff --git a/src/desktopportal.h b/src/desktopportal.h index a34fa78..c245a41 100644 --- a/src/desktopportal.h +++ b/src/desktopportal.h @@ -33,7 +33,9 @@ class DesktopPortal : public QObject explicit DesktopPortal(QObject *parent = nullptr); QQmlEngine *engine() const; +#if 0 ScreenshotClient *screenshotClient() const; +#endif static DesktopPortal *instance(); @@ -55,8 +57,10 @@ class DesktopPortal : public QObject SettingsPortal *m_settings = nullptr; WallpaperPortal *m_wallpaper = nullptr; +#if 0 ScreenshotClient *m_screenshotClient = nullptr; ScreenshotImageProvider *m_screenshotImageProvider = nullptr; +#endif }; #endif // DESKTOPPORTAL_H diff --git a/src/screenshotclient.cpp b/src/screenshotclient.cpp index c38835d..e4ac693 100644 --- a/src/screenshotclient.cpp +++ b/src/screenshotclient.cpp @@ -14,6 +14,7 @@ #include "logging_p.h" #include "screenshotclient.h" +#if 0 ScreenshotClient::ScreenshotClient(QObject *parent) : QObject(parent) , m_screencopy(new Aurora::Client::WlrScreencopyManagerV1()) @@ -129,3 +130,4 @@ void ScreenshotClient::copyToClipboard() const { qGuiApp->clipboard()->setImage(m_finalImage); } +#endif diff --git a/src/screenshotclient.h b/src/screenshotclient.h index 208dbda..5fc2074 100644 --- a/src/screenshotclient.h +++ b/src/screenshotclient.h @@ -5,6 +5,7 @@ #ifndef SCREENSHOTCLIENT_H #define SCREENSHOTCLIENT_H +#if 0 #include #include @@ -50,5 +51,6 @@ class ScreenshotClient : public QObject private Q_SLOTS: void handleFrameCopied(const QImage &image); }; +#endif #endif // SCREENSHOTCLIENT_H diff --git a/src/waylandintegration.h b/src/waylandintegration.h index 4588363..c79a838 100644 --- a/src/waylandintegration.h +++ b/src/waylandintegration.h @@ -9,8 +9,6 @@ #include #include -#include -#include QT_FORWARD_DECLARE_CLASS(QScreen)