mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-21 18:50:47 +03:00
Fix QT_CONFIG check for wayland is only available since Qt6.7
This commit is contained in:
parent
2142a8dd9c
commit
941f7f5ed5
2 changed files with 7 additions and 3 deletions
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
// in theory we can enable this everywhere, but the header is missing on some of our CI systems and
|
// in theory we can enable this everywhere, but the header is missing on some of our CI systems and
|
||||||
// it is too much effort to install.
|
// it is too much effort to install.
|
||||||
#if QT_CONFIG(wayland)
|
#if __has_include(<QtGui/qpa/qplatformwindow_p.h>)
|
||||||
#include <QtGui/qpa/qplatformwindow_p.h>
|
#include <QtGui/qpa/qplatformwindow_p.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -248,7 +248,9 @@ main(int argc, char *argv[])
|
||||||
if (!singleapp.isPrimaryInstance()) {
|
if (!singleapp.isPrimaryInstance()) {
|
||||||
auto token = qgetenv("XDG_ACTIVATION_TOKEN");
|
auto token = qgetenv("XDG_ACTIVATION_TOKEN");
|
||||||
|
|
||||||
#if QT_CONFIG(wayland)
|
#if __has_include(<QtGui/qpa/qplatformwindow_p.h>) && \
|
||||||
|
((QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) && QT_CONFIG(wayland)) || \
|
||||||
|
(QT_VERSION < QT_VERSION_CHECK(6, 7, 0) && defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)))
|
||||||
// getting a valid activation token on wayland is a bit of a pain, it works most reliably
|
// getting a valid activation token on wayland is a bit of a pain, it works most reliably
|
||||||
// when you have an actual window, that has the focus...
|
// when you have an actual window, that has the focus...
|
||||||
auto waylandApp = app.nativeInterface<QNativeInterface::QWaylandApplication>();
|
auto waylandApp = app.nativeInterface<QNativeInterface::QWaylandApplication>();
|
||||||
|
|
|
@ -1044,7 +1044,9 @@ void
|
||||||
InputBar::toggleIgnore(const QString &user, const bool ignored)
|
InputBar::toggleIgnore(const QString &user, const bool ignored)
|
||||||
{
|
{
|
||||||
if (!user.startsWith(u"@")) {
|
if (!user.startsWith(u"@")) {
|
||||||
MainWindow::instance()->showNotification(tr("You need to pass a valid mxid when ignoring a user. '%1' is not a valid userid.").arg(user));
|
MainWindow::instance()->showNotification(
|
||||||
|
tr("You need to pass a valid mxid when ignoring a user. '%1' is not a valid userid.")
|
||||||
|
.arg(user));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue