Open chermnyx opened 1 year ago
tested and it works!
Yes, working here as well, but is it really needed to bump the requirements in cmake to plasma 5.27 beta? Can't this method be implemented and still compile against the previous dependencies?
Yes, working here as well, but is it really needed to bump the requirements in cmake to plasma 5.27 beta? Can't this method be implemented and still compile against the previous dependencies?
Is there a way to check the current kdecoration version in pre-processor?
@chermnyx Thank you! Worked here as well: Operating System: SparkyLinux 7 / Debian Bookworm KDE Plasma Version: 5.26.90 KDE Frameworks Version: 5.102.0 Qt Version: 5.15.8 Kernel Version: 6.1.0-3-amd64 (64-bit) Graphics Platform: X11
hi, cant build on plasma 5.27 but i can build it on plasma 5.26 the log :
-- The CXX compiler identification is GNU 12.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at /usr/share/ECM/modules/ECMFindModuleHelpers.cmake:113 (message):
Your project should require at least CMake 3.16.0 to use FindKF5.cmake
Call Stack (most recent call first):
/usr/share/ECM/find-modules/FindKF5.cmake:30 (ecm_find_package_version_check)
CMakeLists.txt:19 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found KF5CoreAddons: /usr/lib64/cmake/KF5CoreAddons/KF5CoreAddonsConfig.cmake (found version "5.103.0")
-- Installing in the same prefix as Qt, adopting their path scheme.
-- Found KF5Declarative: /usr/lib64/cmake/KF5Declarative/KF5DeclarativeConfig.cmake (found version "5.103.0")
-- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found KF5Plasma: /usr/lib64/cmake/KF5Plasma/KF5PlasmaConfig.cmake (found version "5.103.0")
-- Found KF5PlasmaQuick: /usr/lib64/cmake/KF5PlasmaQuick/KF5PlasmaQuickConfig.cmake (found version "5.103.0")
-- Found KF5: success (found suitable version "5.103.0", minimum required is "5.81.0") found components: CoreAddons Declarative Plasma PlasmaQuick
-- KDECORATION2 VERSION MINOR : 27
-- Could not set up the appstream test. appstreamcli is missing.
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - found
-- Performing Test _OFFT_IS_64BIT
-- Performing Test _OFFT_IS_64BIT - Success
-- Performing Test HAVE_DATE_TIME
-- Performing Test HAVE_DATE_TIME - Success
CMake Warning (dev) at /usr/share/ECM/modules/ECMFindModuleHelpers.cmake:113 (message):
Your project should require at least CMake 3.16.0 to use FindKF5.cmake
Call Stack (most recent call first):
/usr/share/ECM/find-modules/FindKF5.cmake:30 (ecm_find_package_version_check)
libappletdecoration/CMakeLists.txt:37 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found KF5WindowSystem: /usr/lib64/cmake/KF5WindowSystem/KF5WindowSystemConfig.cmake (found version "5.103.0")
-- Found Gettext: /usr/bin/msgmerge (found version "0.21.1")
-- Found KF5I18n: /usr/lib64/cmake/KF5I18n/KF5I18nConfig.cmake (found version "5.103.0")
-- Found KF5Service: /usr/lib64/cmake/KF5Service/KF5ServiceConfig.cmake (found version "5.103.0")
-- Found KF5ConfigWidgets: /usr/lib64/cmake/KF5ConfigWidgets/KF5ConfigWidgetsConfig.cmake (found version "5.103.0")
-- Found KF5: success (found suitable version "5.103.0", minimum required is "5.26.0") found components: Plasma WindowSystem I18n Service ConfigWidgets
CMake Warning at /usr/lib64/cmake/KF5Package/KF5PackageMacros.cmake:46 (message):
Providing metadata with .desktop files is deprecated. Please run
"desktoptojson -i
/home/edip/Desktop/applet-window-buttons/package/metadata.desktop" to
convert the file to json and remove the desktop file
Call Stack (most recent call first):
/usr/lib64/cmake/KF5Plasma/KF5PlasmaMacros.cmake:36 (kpackage_install_package)
CMakeLists.txt:35 (plasma_install_package)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/edip/Desktop/applet-window-buttons/build
[ 4%] Automatic MOC for target appletdecorationplugin
[ 9%] Generating org.kde.windowbuttons-plasmoids-metadata.json
About to parse service type file "/usr/share/kservicetypes5/plasma-applet.desktop"
Found property definition "X-Plasma-API" with type "QString"
Found property definition "X-Plasma-RootPath" with type "QString"
Found property definition "X-Plasma-MainScript" with type "QString"
Found property definition "X-Plasma-ContainmentType" with type "QString"
Found property definition "X-Plasma-DropMimeTypes" with type "QStringList"
Found property definition "X-Plasma-DropUrlPatterns" with type "QStringList"
Found property definition "X-Plasma-NotificationArea" with type "QString"
Found property definition "X-Plasma-NotificationAreaCategory" with type "QString"
Found property definition "X-Plasma-DBusActivationService" with type "QString"
Found property definition "X-KDE-ParentApp" with type "QString"
Found property definition "X-Plasma-Provides" with type "QStringList"
Found property definition "X-Plasma-PreloadWeight" with type "int"
Found property definition "X-Plasma-ConfigPlugins" with type "QStringList"
Found property definition "X-Plasma-StandAloneApp" with type "bool"
Found property definition "X-Plasma-RequiredExtensions" with type "QStringList"
Found property definition "NoDisplay" with type "bool"
Unknown property type for key "Keywords" -> falling back to string
Generated "/home/edip/Desktop/applet-window-buttons/build/org.kde.windowbuttons-plasmoids-metadata.json"
[ 9%] Built target org.kde.windowbuttons-plasmoids-metadata-json
[ 9%] Built target appletdecorationplugin_autogen
[ 13%] Building CXX object libappletdecoration/CMakeFiles/appletdecorationplugin.dir/appletdecorationplugin_autogen/mocs_compilation.cpp.o
[ 18%] Building CXX object libappletdecoration/CMakeFiles/appletdecorationplugin.dir/appletdecorationplugin.cpp.o
[ 22%] Building CXX object libappletdecoration/CMakeFiles/appletdecorationplugin.dir/auroraetheme.cpp.o
[ 27%] Building CXX object libappletdecoration/CMakeFiles/appletdecorationplugin.dir/buttonsmodel.cpp.o
[ 31%] Building CXX object libappletdecoration/```
CMakeFiles/appletdecorationplugin.dir/commontools.cpp.o
[ 36%] Building CXX object libappletdecoration/CMakeFiles/appletdecorationplugin.dir/decorationsmodel.cpp.o
[ 40%] Building CXX object libappletdecoration/CMakeFiles/appletdecorationplugin.dir/decorationpalette.cpp.o
[ 45%] Building CXX object libappletdecoration/CMakeFiles/appletdecorationplugin.dir/environment.cpp.o
[ 50%] Building CXX object libappletdecoration/CMakeFiles/appletdecorationplugin.dir/padding.cpp.o
/home/edip/Desktop/applet-window-buttons/libappletdecoration/environment.cpp: In member function ‘uint Decoration::Applet::Environment::frameworksVersion() const’:
/home/edip/Desktop/applet-window-buttons/libappletdecoration/environment.cpp:44:27: warning: ‘unsigned int Plasma::version()’ is deprecated: Since 5.85. use plasma_version.h header instead [-Wdeprecated-declarations]
44 | return Plasma::version();
| ~~~~~~~~~~~~~~~^~
In file included from /home/edip/Desktop/applet-window-buttons/libappletdecoration/environment.cpp:27:
/usr/include/KF5/plasma/version.h:37:28: note: declared here
37 | PLASMA_EXPORT unsigned int version();
| ^~~~~~~
[ 54%] Building CXX object libappletdecoration/CMakeFiles/appletdecorationplugin.dir/previewbutton.cpp.o
[ 59%] Building CXX object libappletdecoration/CMakeFiles/appletdecorationplugin.dir/previewbridge.cpp.o
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp: In member function ‘virtual std::unique_ptr<KDecoration2::DecoratedClientPrivate> Decoration::Applet::PreviewBridge::createClient(KDecoration2::DecoratedClient*, KDecoration2::Decoration*)’:
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:75:83: error: invalid new-expression of abstract class type ‘Decoration::Applet::PreviewClient’
75 | auto ptr = std::unique_ptr<PreviewClient>(new PreviewClient(client, decoration));
| ^
In file included from /home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:27:
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewclient.h:40:7: note: because the following virtual functions are pure within ‘Decoration::Applet::PreviewClient’:
40 | class PreviewClient : public QObject, public KDecoration2::ApplicationMenuEnabledDecoratedClientPrivate
| ^~~~~~~~~~~~~
In file included from /usr/include/KDecoration2/KDecoration2/Private/DecoratedClientPrivate:1,
from /home/edip/Desktop/applet-window-buttons/libappletdecoration/previewclient.h:31:
/usr/include/KDecoration2/kdecoration2/private/decoratedclientprivate.h:80:21: note: ‘virtual QString KDecoration2::DecoratedClientPrivate::windowClass() const’
80 | virtual QString windowClass() const = 0;
| ^~~~~~~~~~~
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp: In member function ‘virtual std::unique_ptr<KDecoration2::DecorationSettingsPrivate> Decoration::Applet::PreviewBridge::settings(KDecoration2::DecorationSettings*)’:
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:84:21: warning: redundant move in return statement [-Wredundant-move]
84 | return std::move(ptr);
| ~~~~~~~~~^~~~~
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:84:21: note: remove ‘std::move’ call
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp: In member function ‘void Decoration::Applet::PreviewBridge::createFactory()’:
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:138:44: warning: ‘static KPluginTrader* KPluginTrader::self()’ is deprecated: Since 5.82. Use KPluginMetaData and KPluginFactory [-Wdeprecated-declarations]
138 | const auto offers = KPluginTrader::self()->query(s_pluginName,
| ~~~~~~~~~~~~~~~~~~~^~
In file included from /usr/include/KF5/KService/KPluginTrader:1,
from /home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:37:
/usr/include/KF5/KService/kplugintrader.h:163:27: note: declared here
163 | static KPluginTrader *self();
| ^~~~
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:138:53: warning: ‘KPluginInfo::List KPluginTrader::query(const QString&, const QString&, const QString&)’ is deprecated: Since 5.82. Use KPluginMetaData::findPlugins [-Wdeprecated-declarations]
138 | const auto offers = KPluginTrader::self()->query(s_pluginName,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
139 | s_pluginName,
| ~~~~~~~~~~~~~
140 | QStringLiteral("[X-KDE-PluginInfo-Name] == '%1'").arg(m_plugin));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/KF5/KService/kplugintrader.h:150:23: note: declared here
150 | KPluginInfo::List query(const QString &subDirectory, const QString &serviceType = QString(), const QString &constraint = QString());
| ^~~~~
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:149:31: warning: ‘KPluginFactory* KPluginLoader::factory()’ is deprecated: Since 5.86. Use KPluginFactory::loadFactory or KPluginFactory::instantiatePlugin instead [-Wdeprecated-declarations]
149 | m_factory = loader.factory();
| ~~~~~~~~~~~~~~^~
In file included from /usr/include/KF5/KCoreAddons/KPluginLoader:1,
from /home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:35:
/usr/include/KF5/KCoreAddons/kpluginloader.h:126:21: note: declared here
126 | KPluginFactory *factory();
| ^~~~~~~
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp: In member function ‘KDecoration2::DecorationButton* Decoration::Applet::PreviewBridge::createButton(KDecoration2::Decoration*, KDecoration2::DecorationButtonType, QObject*)’:
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:195:67: warning: ‘T* KPluginFactory::create(const QString&, QObject*, const QVariantList&) [with T = KDecoration2::DecorationButton; QVariantList = QList<QVariant>]’ is deprecated: Since 5.89. Use overload without keyword instead [-Wdeprecated-declarations]
195 | button = m_factory->create<KDecoration2::DecorationButton>(QStringLiteral("button"), parent, QVariantList({QVariant::fromValue(type), QVariant::fromValue(decoration)}));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/KF5/KCoreAddons/KPluginFactory:1,
from /home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:36:
/usr/include/KF5/KCoreAddons/kpluginfactory.h:950:11: note: declared here
950 | inline T *KPluginFactory::create(const QString &keyword, QObject *parent, const QVariantList &args)
| ^~~~~~~~~~~~~~
make[2]: *** [libappletdecoration/CMakeFiles/appletdecorationplugin.dir/build.make:216: libappletdecoration/CMakeFiles/appletdecorationplugin.dir/previewbridge.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:181: libappletdecoration/CMakeFiles/appletdecorationplugin.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
SSH passphrase:
[ 4%] Built target org.kde.windowbuttons-plasmoids-metadata-json
[ 9%] Automatic MOC for target appletdecorationplugin
[ 9%] Built target appletdecorationplugin_autogen
[ 13%] Building CXX object libappletdecoration/CMakeFiles/appletdecorationplugin.dir/previewbridge.cpp.o
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp: In member function ‘virtual std::unique_ptr<KDecoration2::DecoratedClientPrivate> Decoration::Applet::PreviewBridge::createClient(KDecoration2::DecoratedClient*, KDecoration2::Decoration*)’:
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:75:83: error: invalid new-expression of abstract class type ‘Decoration::Applet::PreviewClient’
75 | auto ptr = std::unique_ptr<PreviewClient>(new PreviewClient(client, decoration));
| ^
In file included from /home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:27:
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewclient.h:40:7: note: because the following virtual functions are pure within ‘Decoration::Applet::PreviewClient’:
40 | class PreviewClient : public QObject, public KDecoration2::ApplicationMenuEnabledDecoratedClientPrivate
| ^~~~~~~~~~~~~
In file included from /usr/include/KDecoration2/KDecoration2/Private/DecoratedClientPrivate:1,
from /home/edip/Desktop/applet-window-buttons/libappletdecoration/previewclient.h:31:
/usr/include/KDecoration2/kdecoration2/private/decoratedclientprivate.h:80:21: note: ‘virtual QString KDecoration2::DecoratedClientPrivate::windowClass() const’
80 | virtual QString windowClass() const = 0;
| ^~~~~~~~~~~
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp: In member function ‘virtual std::unique_ptr<KDecoration2::DecorationSettingsPrivate> Decoration::Applet::PreviewBridge::settings(KDecoration2::DecorationSettings*)’:
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:84:21: warning: redundant move in return statement [-Wredundant-move]
84 | return std::move(ptr);
| ~~~~~~~~~^~~~~
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:84:21: note: remove ‘std::move’ call
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp: In member function ‘void Decoration::Applet::PreviewBridge::createFactory()’:
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:138:44: warning: ‘static KPluginTrader* KPluginTrader::self()’ is deprecated: Since 5.82. Use KPluginMetaData and KPluginFactory [-Wdeprecated-declarations]
138 | const auto offers = KPluginTrader::self()->query(s_pluginName,
| ~~~~~~~~~~~~~~~~~~~^~
In file included from /usr/include/KF5/KService/KPluginTrader:1,
from /home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:37:
/usr/include/KF5/KService/kplugintrader.h:163:27: note: declared here
163 | static KPluginTrader *self();
| ^~~~
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:138:53: warning: ‘KPluginInfo::List KPluginTrader::query(const QString&, const QString&, const QString&)’ is deprecated: Since 5.82. Use KPluginMetaData::findPlugins [-Wdeprecated-declarations]
138 | const auto offers = KPluginTrader::self()->query(s_pluginName,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
139 | s_pluginName,
| ~~~~~~~~~~~~~
140 | QStringLiteral("[X-KDE-PluginInfo-Name] == '%1'").arg(m_plugin));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/KF5/KService/kplugintrader.h:150:23: note: declared here
150 | KPluginInfo::List query(const QString &subDirectory, const QString &serviceType = QString(), const QString &constraint = QString());
| ^~~~~
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:149:31: warning: ‘KPluginFactory* KPluginLoader::factory()’ is deprecated: Since 5.86. Use KPluginFactory::loadFactory or KPluginFactory::instantiatePlugin instead [-Wdeprecated-declarations]
149 | m_factory = loader.factory();
| ~~~~~~~~~~~~~~^~
In file included from /usr/include/KF5/KCoreAddons/KPluginLoader:1,
from /home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:35:
/usr/include/KF5/KCoreAddons/kpluginloader.h:126:21: note: declared here
126 | KPluginFactory *factory();
| ^~~~~~~
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp: In member function ‘KDecoration2::DecorationButton* Decoration::Applet::PreviewBridge::createButton(KDecoration2::Decoration*, KDecoration2::DecorationButtonType, QObject*)’:
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:195:67: warning: ‘T* KPluginFactory::create(const QString&, QObject*, const QVariantList&) [with T = KDecoration2::DecorationButton; QVariantList = QList<QVariant>]’ is deprecated: Since 5.89. Use overload without keyword instead [-Wdeprecated-declarations]
195 | button = m_factory->create<KDecoration2::DecorationButton>(QStringLiteral("button"), parent, QVariantList({QVariant::fromValue(type), QVariant::fromValue(decoration)}));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/KF5/KCoreAddons/KPluginFactory:1,
from /home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:36:
/usr/include/KF5/KCoreAddons/kpluginfactory.h:950:11: note: declared here
950 | inline T *KPluginFactory::create(const QString &keyword, QObject *parent, const QVariantList &args)
| ^~~~~~~~~~~~~~
make[2]: *** [libappletdecoration/CMakeFiles/appletdecorationplugin.dir/build.make:216: libappletdecoration/CMakeFiles/appletdecorationplugin.dir/previewbridge.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:181: libappletdecoration/CMakeFiles/appletdecorationplugin.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
edip@edip ~/D/applet-window-buttons (master) [2]> sh install.sh
CMake Warning (dev) at /usr/share/ECM/modules/ECMFindModuleHelpers.cmake:113 (message):
Your project should require at least CMake 3.16.0 to use FindKF5.cmake
Call Stack (most recent call first):
/usr/share/ECM/find-modules/FindKF5.cmake:30 (ecm_find_package_version_check)
CMakeLists.txt:19 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found KF5: success (found suitable version "5.103.0", minimum required is "5.81.0") found components: CoreAddons Declarative Plasma PlasmaQuick
-- KDECORATION2 VERSION MINOR : 27
-- Could not set up the appstream test. appstreamcli is missing.
CMake Warning (dev) at /usr/share/ECM/modules/ECMFindModuleHelpers.cmake:113 (message):
Your project should require at least CMake 3.16.0 to use FindKF5.cmake
Call Stack (most recent call first):
/usr/share/ECM/find-modules/FindKF5.cmake:30 (ecm_find_package_version_check)
libappletdecoration/CMakeLists.txt:37 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found KF5: success (found suitable version "5.103.0", minimum required is "5.26.0") found components: Plasma WindowSystem I18n Service ConfigWidgets
-- Configuring done
-- Generating done
-- Build files have been written to: /home/edip/Desktop/applet-window-buttons/build
[ 13%] Automatic MOC for target appletdecorationplugin
[ 13%] Built target appletdecorationplugin_autogen
[ 13%] Building CXX object libappletdecoration/CMakeFiles/appletdecorationplugin.dir/previewbridge.cpp.o
[ 13%] Building CXX object libappletdecoration/CMakeFiles/appletdecorationplugin.dir/previewclient.cpp.o
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewclient.cpp: In member function ‘virtual void Decoration::Applet::PreviewClient::requestShowWindowMenu(const QRect&)’:
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewclient.cpp:414:56: warning: unused parameter ‘rect’ [-Wunused-parameter]
414 | void PreviewClient::requestShowWindowMenu(const QRect &rect)
| ~~~~~~~~~~~~~^~~~
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp: In member function ‘virtual std::unique_ptr<KDecoration2::DecoratedClientPrivate> Decoration::Applet::PreviewBridge::createClient(KDecoration2::DecoratedClient*, KDecoration2::Decoration*)’:
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:75:83: error: invalid new-expression of abstract class type ‘Decoration::Applet::PreviewClient’
75 | auto ptr = std::unique_ptr<PreviewClient>(new PreviewClient(client, decoration));
| ^
In file included from /home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:27:
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewclient.h:40:7: note: because the following virtual functions are pure within ‘Decoration::Applet::PreviewClient’:
40 | class PreviewClient : public QObject, public KDecoration2::ApplicationMenuEnabledDecoratedClientPrivate
| ^~~~~~~~~~~~~
In file included from /usr/include/KDecoration2/KDecoration2/Private/DecoratedClientPrivate:1,
from /home/edip/Desktop/applet-window-buttons/libappletdecoration/previewclient.h:31:
/usr/include/KDecoration2/kdecoration2/private/decoratedclientprivate.h:80:21: note: ‘virtual QString KDecoration2::DecoratedClientPrivate::windowClass() const’
80 | virtual QString windowClass() const = 0;
| ^~~~~~~~~~~
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp: In member function ‘virtual std::unique_ptr<KDecoration2::DecorationSettingsPrivate> Decoration::Applet::PreviewBridge::settings(KDecoration2::DecorationSettings*)’:
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:84:21: warning: redundant move in return statement [-Wredundant-move]
84 | return std::move(ptr);
| ~~~~~~~~~^~~~~
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:84:21: note: remove ‘std::move’ call
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp: In member function ‘void Decoration::Applet::PreviewBridge::createFactory()’:
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:138:44: warning: ‘static KPluginTrader* KPluginTrader::self()’ is deprecated: Since 5.82. Use KPluginMetaData and KPluginFactory [-Wdeprecated-declarations]
138 | const auto offers = KPluginTrader::self()->query(s_pluginName,
| ~~~~~~~~~~~~~~~~~~~^~
In file included from /usr/include/KF5/KService/KPluginTrader:1,
from /home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:37:
/usr/include/KF5/KService/kplugintrader.h:163:27: note: declared here
163 | static KPluginTrader *self();
| ^~~~
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:138:53: warning: ‘KPluginInfo::List KPluginTrader::query(const QString&, const QString&, const QString&)’ is deprecated: Since 5.82. Use KPluginMetaData::findPlugins [-Wdeprecated-declarations]
138 | const auto offers = KPluginTrader::self()->query(s_pluginName,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
139 | s_pluginName,
| ~~~~~~~~~~~~~
140 | QStringLiteral("[X-KDE-PluginInfo-Name] == '%1'").arg(m_plugin));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/KF5/KService/kplugintrader.h:150:23: note: declared here
150 | KPluginInfo::List query(const QString &subDirectory, const QString &serviceType = QString(), const QString &constraint = QString());
| ^~~~~
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:149:31: warning: ‘KPluginFactory* KPluginLoader::factory()’ is deprecated: Since 5.86. Use KPluginFactory::loadFactory or KPluginFactory::instantiatePlugin instead [-Wdeprecated-declarations]
149 | m_factory = loader.factory();
| ~~~~~~~~~~~~~~^~
In file included from /usr/include/KF5/KCoreAddons/KPluginLoader:1,
from /home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:35:
/usr/include/KF5/KCoreAddons/kpluginloader.h:126:21: note: declared here
126 | KPluginFactory *factory();
| ^~~~~~~
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp: In member function ‘KDecoration2::DecorationButton* Decoration::Applet::PreviewBridge::createButton(KDecoration2::Decoration*, KDecoration2::DecorationButtonType, QObject*)’:
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:195:67: warning: ‘T* KPluginFactory::create(const QString&, QObject*, const QVariantList&) [with T = KDecoration2::DecorationButton; QVariantList = QList<QVariant>]’ is deprecated: Since 5.89. Use overload without keyword instead [-Wdeprecated-declarations]
195 | button = m_factory->create<KDecoration2::DecorationButton>(QStringLiteral("button"), parent, QVariantList({QVariant::fromValue(type), QVariant::fromValue(decoration)}));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/KF5/KCoreAddons/KPluginFactory:1,
from /home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:36:
/usr/include/KF5/KCoreAddons/kpluginfactory.h:950:11: note: declared here
950 | inline T *KPluginFactory::create(const QString &keyword, QObject *parent, const QVariantList &args)
| ^~~~~~~~~~~~~~
[ 13%] Building CXX object libappletdecoration/CMakeFiles/appletdecorationplugin.dir/previewsettings.cpp.o
make[2]: *** [libappletdecoration/CMakeFiles/appletdecorationplugin.dir/build.make:216: libappletdecoration/CMakeFiles/appletdecorationplugin.dir/previewbridge.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:153: libappletdecoration/CMakeFiles/appletdecorationplugin.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
[ 4%] Automatic MOC for target appletdecorationplugin
[ 4%] Built target appletdecorationplugin_autogen
[ 9%] Building CXX object libappletdecoration/CMakeFiles/appletdecorationplugin.dir/previewbridge.cpp.o
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp: In member function ‘virtual std::unique_ptr<KDecoration2::DecoratedClientPrivate> Decoration::Applet::PreviewBridge::createClient(KDecoration2::DecoratedClient*, KDecoration2::Decoration*)’:
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:75:83: error: invalid new-expression of abstract class type ‘Decoration::Applet::PreviewClient’
75 | auto ptr = std::unique_ptr<PreviewClient>(new PreviewClient(client, decoration));
| ^
In file included from /home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:27:
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewclient.h:40:7: note: because the following virtual functions are pure within ‘Decoration::Applet::PreviewClient’:
40 | class PreviewClient : public QObject, public KDecoration2::ApplicationMenuEnabledDecoratedClientPrivate
| ^~~~~~~~~~~~~
In file included from /usr/include/KDecoration2/KDecoration2/Private/DecoratedClientPrivate:1,
from /home/edip/Desktop/applet-window-buttons/libappletdecoration/previewclient.h:31:
/usr/include/KDecoration2/kdecoration2/private/decoratedclientprivate.h:80:21: note: ‘virtual QString KDecoration2::DecoratedClientPrivate::windowClass() const’
80 | virtual QString windowClass() const = 0;
| ^~~~~~~~~~~
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp: In member function ‘virtual std::unique_ptr<KDecoration2::DecorationSettingsPrivate> Decoration::Applet::PreviewBridge::settings(KDecoration2::DecorationSettings*)’:
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:84:21: warning: redundant move in return statement [-Wredundant-move]
84 | return std::move(ptr);
| ~~~~~~~~~^~~~~
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:84:21: note: remove ‘std::move’ call
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp: In member function ‘void Decoration::Applet::PreviewBridge::createFactory()’:
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:138:44: warning: ‘static KPluginTrader* KPluginTrader::self()’ is deprecated: Since 5.82. Use KPluginMetaData and KPluginFactory [-Wdeprecated-declarations]
138 | const auto offers = KPluginTrader::self()->query(s_pluginName,
| ~~~~~~~~~~~~~~~~~~~^~
In file included from /usr/include/KF5/KService/KPluginTrader:1,
from /home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:37:
/usr/include/KF5/KService/kplugintrader.h:163:27: note: declared here
163 | static KPluginTrader *self();
| ^~~~
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:138:53: warning: ‘KPluginInfo::List KPluginTrader::query(const QString&, const QString&, const QString&)’ is deprecated: Since 5.82. Use KPluginMetaData::findPlugins [-Wdeprecated-declarations]
138 | const auto offers = KPluginTrader::self()->query(s_pluginName,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
139 | s_pluginName,
| ~~~~~~~~~~~~~
140 | QStringLiteral("[X-KDE-PluginInfo-Name] == '%1'").arg(m_plugin));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/KF5/KService/kplugintrader.h:150:23: note: declared here
150 | KPluginInfo::List query(const QString &subDirectory, const QString &serviceType = QString(), const QString &constraint = QString());
| ^~~~~
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:149:31: warning: ‘KPluginFactory* KPluginLoader::factory()’ is deprecated: Since 5.86. Use KPluginFactory::loadFactory or KPluginFactory::instantiatePlugin instead [-Wdeprecated-declarations]
149 | m_factory = loader.factory();
| ~~~~~~~~~~~~~~^~
In file included from /usr/include/KF5/KCoreAddons/KPluginLoader:1,
from /home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:35:
/usr/include/KF5/KCoreAddons/kpluginloader.h:126:21: note: declared here
126 | KPluginFactory *factory();
| ^~~~~~~
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp: In member function ‘KDecoration2::DecorationButton* Decoration::Applet::PreviewBridge::createButton(KDecoration2::Decoration*, KDecoration2::DecorationButtonType, QObject*)’:
/home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:195:67: warning: ‘T* KPluginFactory::create(const QString&, QObject*, const QVariantList&) [with T = KDecoration2::DecorationButton; QVariantList = QList<QVariant>]’ is deprecated: Since 5.89. Use overload without keyword instead [-Wdeprecated-declarations]
195 | button = m_factory->create<KDecoration2::DecorationButton>(QStringLiteral("button"), parent, QVariantList({QVariant::fromValue(type), QVariant::fromValue(decoration)}));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/KF5/KCoreAddons/KPluginFactory:1,
from /home/edip/Desktop/applet-window-buttons/libappletdecoration/previewbridge.cpp:36:
/usr/include/KF5/KCoreAddons/kpluginfactory.h:950:11: note: declared here
950 | inline T *KPluginFactory::create(const QString &keyword, QObject *parent, const QVariantList &args)
| ^~~~~~~~~~~~~~
make[2]: *** [libappletdecoration/CMakeFiles/appletdecorationplugin.dir/build.make:216: libappletdecoration/CMakeFiles/appletdecorationplugin.dir/previewbridge.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:153: libappletdecoration/CMakeFiles/appletdecorationplugin.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
I could build it on Plasma 5.27, and works as it used to: Operating System: NixOS KDE Plasma Version: 5.27.0 KDE Frameworks Version: 5.103.0 Qt Version: 5.15.8
hi, cant build on plasma 5.27 but i can build it on plasma 5.26 the log :
It requires plasma 5.27 (the new version of the kdecorations package). I don't know how to conditionally exclude part of the code depending on this lib's version for it to be compatible with the older versions
@chermnyx could you test the plasmashell itself instead of kdecoration, i don't know if this is useful but you can get the plasmashell version using plasmashell -v
tho this will require a shell script, it may be better to implement this by the package maintainers.
I'm having issues to compile it in plasma 5.27 as well, the issue is the same @Edip1 mentioned here, and the error is this:
libappletdecoration/previewbridge.cpp:75:83: error: invalid new-expression of abstract class type ‘Decoration::Applet::PreviewClient’
75 | auto ptr = std::unique_ptr<PreviewClient>(new PreviewClient(client, decoration));
It seems that PreviewClient is abstract so it can't be instantiated, I don't know if/how that can be solved without modifying code.
Operating System: KDE neon 5.27 (Ubuntu 22.04) KDE Plasma Version: 5.27.0 KDE Frameworks Version: 5.103.0 Qt Version: 5.15.8 Kernel Version: 5.19.0-32-generic (64-bit) Graphics Platform: X11
Hi @xavier83ar,
How did you apply the changes? Did you copy and paste from https://github.com/psifidotos/applet-window-buttons/pull/191/files?
Telling because I did that myself and this introduced compiling errors. I think there are some weird invisible characters that are added when using copy and paste from GitHub code directly.
When I just typed manually these lines myself, the code compiled properly. Please note that my system is the same as yours: up-to-date KDE neon.
Mm... nop, but you made me realize what my mistake was... 🤦🏼♂️ I've cloned the repo and started trying to build right away without switching to the right branch!! Thank you!
Mm... nop, but you made me realize what my mistake was... 🤦🏼♂️ I've cloned the repo and started trying to build right away without switching to the right branch!! Thank you!
do you mean the fork?
The following steps resulted in success for me (5.26.90/5.27) in both KDE neon and Sparky KDE:
1) Go to chermnyx:dumb_5.27_support
2) Download ZIP
3) Extract the folder applet-window-buttons-dumb_5.27_support
, and inside that folder, run ./install.sh
Mm... nop, but you made me realize what my mistake was... 🤦🏼♂️ I've cloned the repo and started trying to build right away without switching to the right branch!! Thank you!
do you mean the fork?
yes I cloned this fork, but when you clone a repo you get the default branch which is master in this case, so I was trying to compile a branch that didn't include the fix, after checking out the right branch, I could compile it without any issues.
Can somebody merge this? I know psifidotos is not working on latte-dock anymore. Does this mean all his projects can not be maintained by the community?
Can somebody merge this? I know psifidotos is not working on latte-dock anymore. Does this mean all his projects can not be maintained by the community?
He need to transfer the ownership of the repository to the community or give permissions so another persons could merge PR, make tags, and do releases...
Building works, but I get this applet error:
file:///usr/share/plasma/plasmoids/org.kde.windowbuttons/contents/ui/main.qml:534:9: AppletDecoration.AuroraeButton is not a type
MX Linux 23.1 KDE Plasma 5.27.5
Hello @MajorTomDE ! I have the same plasma version but I am using it on Debian 12. Have you tried rebooting your system? I have had a somewhat similar problem during my installation on but it was solved by a simple restart (logging out and back in did not help).
Fixes https://github.com/psifidotos/applet-window-buttons/issues/190 in a naive way.
After changes in libkdecoration private api the applet's libdecoration should implement
PreviewClient::windowClass()
method.Instead of getting window_class of the real window the code returns placeholder values like in
windowId()
anddecorationId()
methods.