wsdfhjxc / virtual-desktop-bar

A pager panel widget for KDE Plasma
GNU General Public License v3.0
326 stars 29 forks source link

Cannot compile (missing signal cfg_keepOneEmptyDesktopChanged in class VirtualDesktopBar.h) #14

Closed Tardog closed 5 years ago

Tardog commented 5 years ago

I'm trying to install the widget on Ubuntu 18.04 using the latest master (I tried the latest release as well, with identical results). While following the installation instructions, I consistently run into the following error during make:

[ 16%] Built target org.kde.plasma.virtualdesktopbar-plasmoids-metadata-json
[ 33%] Automatic MOC for target virtualdesktopbarplugin

AutoMoc subprocess error
------------------------
moc failed for
  "/home/xyz/Downloads/virtual-desktop-bar-master/plugin/virtualdesktopbar.h"

Command
-------
/usr/lib/qt5/bin/moc -I/home/xyz/Downloads/virtual-desktop-bar-master/build/virtualdesktopbarplugin_autogen/include -I/home/xyz/Downloads/virtual-desktop-bar-master/build -I/home/xyz/Downloads/virtual-desktop-bar-master -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/usr/include/x86_64-linux-gnu/qt5/QtX11Extras -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/KF5 -I/usr/include/KF5/Plasma -I/usr/include/KF5/KService -I/usr/include/KF5/KConfigCore -I/usr/include/KF5/KCoreAddons -I/usr/include/KF5/KPackage -I/usr/include/KF5/KWindowSystem -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/KF5/KGlobalAccel -I/usr/include/x86_64-linux-gnu/qt5/QtDBus -I/usr/include/KF5/KXmlGui -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/KF5/KConfigWidgets -I/usr/include/KF5/KCodecs -I/usr/include/KF5/KWidgetsAddons -I/usr/include/KF5/KConfigGui -I/usr/include/KF5/KAuth -I/usr/include -DKCOREADDONS_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_QML_LIB -DQT_WIDGETS_LIB -DQT_X11EXTRAS_LIB -DQT_XML_LIB -D_GNU_SOURCE -D_LARGEFILE64_SOURCE --include /home/xyz/Downloads/virtual-desktop-bar-master/build/virtualdesktopbarplugin_autogen/moc_predefs.h -o /home/xyz/Downloads/virtual-desktop-bar-master/build/virtualdesktopbarplugin_autogen/7RBZBFH7CH/moc_virtualdesktopbar.cpp /home/xyz/Downloads/virtual-desktop-bar-master/plugin/virtualdesktopbar.h              

Output                                                                                                                                                                               
------                                                                                                                                                                               
/home/xyz/Downloads/virtual-desktop-bar-master/plugin/virtualdesktopbar.h:109: Error: NOTIFY signal 'cfg_keepOneEmptyDesktopChanged' of property 'cfg_keepOneEmptyDesktop' does not exist in class VirtualDesktopBar.                                                                                                                                              

CMakeFiles/virtualdesktopbarplugin_autogen.dir/build.make:57: recipe for target 'CMakeFiles/virtualdesktopbarplugin_autogen' failed                                                  
make[2]: *** [CMakeFiles/virtualdesktopbarplugin_autogen] Error 1                                                                                                                    
CMakeFiles/Makefile2:589: recipe for target 'CMakeFiles/virtualdesktopbarplugin_autogen.dir/all' failed                                                                              
make[1]: *** [CMakeFiles/virtualdesktopbarplugin_autogen.dir/all] Error 2                                                                                                            
Makefile:140: recipe for target 'all' failed                                                                                                                                         
make: *** [all] Error 2   

An idea what's going on there?

wsdfhjxc commented 5 years ago

It seems older Qt frameworks are more strict about Q_PROPERTY and NOTIFY can only accept signals. For some reason, I can't annotate the notifying methods as signals, due to other build errors. Instead, I've replaced NOTIFY with something else. Please try the latest version.

Tardog commented 5 years ago

No errors during compilation/installation after the latest changes. The widget itself works like a charm. Looks good to me! :+1: Thank you for your fast response.