lxqt / lxqt-panel

The LXQt desktop panel
https://lxqt-project.org
GNU Lesser General Public License v2.1
193 stars 135 forks source link

Panel doesn't compile anymore on debian #2089

Closed stefonarch closed 3 months ago

stefonarch commented 3 months ago

In master I get now

[ 92%] Building CXX object panel/backends/wayland/wlroots/CMakeFiles/wmbackend_wlroots.dir/lxqttaskbarwlrwm.cpp.o
/home/stef/git/lxqt/panel/panel/backends/wayland/kwin_wayland/lxqtwmbackend_kwinwayland.cpp: In member function ‘virtual void LXQtWMBackend_KWinWayland::moveApplicationToPrevNextMonitor(WId, bool, bool)’:
/home/stef/git/lxqt/panel/panel/backends/wayland/kwin_wayland/lxqtwmbackend_kwinwayland.cpp:432:70: warning: unused parameter ‘windowId’ [-Wunused-parameter]
  432 | void LXQtWMBackend_KWinWayland::moveApplicationToPrevNextMonitor(WId windowId, bool next, bool raiseOnCurrentDesktop)
      |                                                                  ~~~~^~~~~~~~
/home/stef/git/lxqt/panel/panel/backends/wayland/kwin_wayland/lxqtwmbackend_kwinwayland.cpp:432:85: warning: unused parameter ‘next’ [-Wunused-parameter]
  432 | void LXQtWMBackend_KWinWayland::moveApplicationToPrevNextMonitor(WId windowId, bool next, bool raiseOnCurrentDesktop)
      |                                                                                ~~~~~^~~~
/home/stef/git/lxqt/panel/panel/backends/wayland/kwin_wayland/lxqtwmbackend_kwinwayland.cpp:432:96: warning: unused parameter ‘raiseOnCurrentDesktop’ [-Wunused-parameter]
  432 | void LXQtWMBackend_KWinWayland::moveApplicationToPrevNextMonitor(WId windowId, bool next, bool raiseOnCurrentDesktop)
      |                                                                                           ~~~~~^~~~~~~~~~~~~~~~~~~~~
/home/stef/git/lxqt/panel/panel/backends/wayland/kwin_wayland/lxqtwmbackend_kwinwayland.cpp: In member function ‘virtual void LXQtWMBackend_KWinWayland::refreshIconGeometry(WId, const QRect&)’:
/home/stef/git/lxqt/panel/panel/backends/wayland/kwin_wayland/lxqtwmbackend_kwinwayland.cpp:472:57: warning: unused parameter ‘windowId’ [-Wunused-parameter]
  472 | void LXQtWMBackend_KWinWayland::refreshIconGeometry(WId windowId, const QRect &geom)
      |                                                     ~~~~^~~~~~~~
/home/stef/git/lxqt/panel/panel/backends/wayland/kwin_wayland/lxqtwmbackend_kwinwayland.cpp:472:80: warning: unused parameter ‘geom’ [-Wunused-parameter]
  472 | void LXQtWMBackend_KWinWayland::refreshIconGeometry(WId windowId, const QRect &geom)
      |                                                                   ~~~~~~~~~~~~~^~~~
/home/stef/git/lxqt/panel/panel/backends/wayland/kwin_wayland/lxqtwmbackend_kwinwayland.cpp: In member function ‘virtual int LXQtWMBackendKWinWaylandLibrary::getBackendScore(const QString&) const’:
/home/stef/git/lxqt/panel/panel/backends/wayland/kwin_wayland/lxqtwmbackend_kwinwayland.cpp:771:32: error: ‘qGuiApp’ was not declared in this scope
  771 |     auto *waylandApplication = qGuiApp->nativeInterface<QNativeInterface::QWaylandApplication>();
      |                                ^~~~~~~
/home/stef/git/lxqt/panel/panel/backends/wayland/kwin_wayland/lxqtwmbackend_kwinwayland.cpp:771:75: error: ‘QWaylandApplication’ is not a member of ‘QNativeInterface’
  771 |     auto *waylandApplication = qGuiApp->nativeInterface<QNativeInterface::QWaylandApplication>();
      |                                                                           ^~~~~~~~~~~~~~~~~~~
/home/stef/git/lxqt/panel/panel/backends/wayland/kwin_wayland/lxqtwmbackend_kwinwayland.cpp:771:96: error: expected primary-expression before ‘)’ token
  771 |     auto *waylandApplication = qGuiApp->nativeInterface<QNativeInterface::QWaylandApplication>();
      |                                                                                                ^
/home/stef/git/lxqt/panel/panel/backends/wayland/kwin_wayland/lxqtwmbackend_kwinwayland.cpp:772:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  772 |     if(!waylandApplication)
      |     ^~
/home/stef/git/lxqt/panel/panel/backends/wayland/kwin_wayland/lxqtwmbackend_kwinwayland.cpp:776:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  776 |         if(key == QLatin1String("KDE") || key == QLatin1String("KWIN"))
      |         ^~
[ 92%] Linking CXX static library liblxqt-panel-backend-common.a

The previous branch from @marcusbritanicus wlroots_backend_patched compiled fine.

@gfgit Any idea?

stefonarch commented 3 months ago

lxqtwmbackend_kwinwayland.cpp:771:32: error: ‘qGuiApp’ was not declared in this scope 771 | auto *waylandApplication = qGuiApp->nativeInterface<QNativeInterface::QWaylandApplication>();

Added #include <QGuiApplication> to panel/backends/wayland/kwin_wayland/lxqtwmbackend_kwinwayland.cpp and problem solved. The question is why it isn't needed on arch...

    auto *waylandApplication = qGuiApp->nativeInterface<QNativeInterface::QWaylandApplication>();
    if(!waylandApplication)
        return 0;

We can add this in one of the next PRs, no need for an extra one IMO.

tsujan commented 3 months ago

The question is why it isn't needed on arch

Different versions of Qt6, most probably.