kotelnik/plasma-applet-active-window-control

Cannot use AppMenu in Plasma 5.12

wintericie opened this issue · 1 comments

I tried to build this plasmoid with the latest source on https://phabricator.kde.org/source/plasma-active-window-control/ (version d07bd170d39adab35b7861ab6c480286a4d0253e). The appmenu could be shown in the panel after enabling it in settings, however when clicking on an item in the appmenu, the dropdown menu didn't appear. At the same time in .xsession-errors, the following error appeared:

file:///usr/local/share/plasma/plasmoids/org.kde.activeWindowControl/contents/ui/AppMenu.qml:97: TypeError: Property 'trigger' of object QObject(0x5592723af4c0) is not a function

By the way, while using cmake, the following two warnings appeared:

CMake Warning (dev) at /usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5ModuleLocation.cmake:4 (set):
  Policy CMP0053 is not set: Simplify variable reference and escape sequence
  evaluation.  Run "cmake --help-policy CMP0053" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  For input:

    '${_qt5_install_prefix}/Qt5@module@/Qt5@module@Config.cmake'

  the old evaluation rules produce:

    '/usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake'

  but the new evaluation rules produce:

    '/usr/lib/x86_64-linux-gnu/cmake/Qt5@module@/Qt5@module@Config.cmake'

  Using the old result for compatibility since the policy is not set.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake:25 (include)
  plugin/CMakeLists.txt:35 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) in plugin/libdbusmenuqt/CMakeLists.txt:
  Policy CMP0071 is not set: Let AUTOMOC and AUTOUIC process GENERATED files.
  Run "cmake --help-policy CMP0071" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  For compatibility, CMake is excluding the GENERATED source file(s):

    "/home/icie/Downloads/plasma-active-window-control/build/plugin/libdbusmenuqt/dbusmenu_interface.h"

  from processing by AUTOMOC.  If any of the files should be processed, set
  CMP0071 to NEW.  If any of the files should not be processed, explicitly
  exclude them by setting the source file property SKIP_AUTOMOC:

    set_property(SOURCE file.h PROPERTY SKIP_AUTOMOC ON)

This warning is for project developers.  Use -Wno-dev to suppress it.

And while compiling,

Scanning dependencies of target dbusmenuqt_autogen
[  9%] Automatic MOC for target dbusmenuqt
[  9%] Built target dbusmenuqt_autogen
[ 14%] Generating dbusmenu_interface.cpp, dbusmenu_interface.h
qdbusxml2cpp: Got unknown type `a(ia{sv})' processing '/home/icie/Downloads/plasma-active-window-control/plugin/libdbusmenuqt/com.canonical.dbusmenu.xml'
You should add <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="<type>"/> to the XML description
qdbusxml2cpp: Got unknown type `a(ias)' processing '/home/icie/Downloads/plasma-active-window-control/plugin/libdbusmenuqt/com.canonical.dbusmenu.xml'
You should add <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="<type>"/> to the XML description

My guess is that there may be something changed in cmake 3.10 and appmenu in the new plasma. Please feel free to ask me if more info is needed, or point out any step that I did something wrong.

My spec:
Kubuntu 17.10
Plasma 5.12.80
KDE Framework 5.44.0
Qt 5.9.1
Kernel 4.14.20-041420-generic
cmake 3.10.2

Today I tried to run the plasmoid in plasmoidviewer and plasmawindowed. Everything works fine. I don't know why the running results in plasmoidviewer is different from the actual plasma environment. Still confused.