Skip to content

Commit

Permalink
Update to Qt 6
Browse files Browse the repository at this point in the history
  • Loading branch information
plfiorini committed Oct 12, 2024
1 parent dba7279 commit 73d6cb5
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 19 deletions.
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
16 changes: 6 additions & 10 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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")
6 changes: 6 additions & 0 deletions src/desktopportal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -54,20 +56,24 @@ 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
{
return m_engine;
}

#if 0
ScreenshotClient *DesktopPortal::screenshotClient() const
{
return m_screenshotClient;
}
#endif

DesktopPortal *DesktopPortal::instance()
{
Expand Down
4 changes: 4 additions & 0 deletions src/desktopportal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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
2 changes: 2 additions & 0 deletions src/screenshotclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -129,3 +130,4 @@ void ScreenshotClient::copyToClipboard() const
{
qGuiApp->clipboard()->setImage(m_finalImage);
}
#endif
2 changes: 2 additions & 0 deletions src/screenshotclient.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef SCREENSHOTCLIENT_H
#define SCREENSHOTCLIENT_H

#if 0
#include <QObject>
#include <QImage>

Expand Down Expand Up @@ -50,5 +51,6 @@ class ScreenshotClient : public QObject
private Q_SLOTS:
void handleFrameCopied(const QImage &image);
};
#endif

#endif // SCREENSHOTCLIENT_H
2 changes: 0 additions & 2 deletions src/waylandintegration.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
#include <QMap>

#include <LiriAuroraClient/LiriColorPickerManagerV1>
#include <LiriAuroraClient/WlrExportDmabufManagerV1>
#include <LiriAuroraClient/WlrForeignToplevelManagerV1>

QT_FORWARD_DECLARE_CLASS(QScreen)

Expand Down

0 comments on commit 73d6cb5

Please sign in to comment.