psifidotos / applet-window-buttons

Plasma 5 applet in order to show window buttons in your panels
GNU General Public License v2.0
403 stars 56 forks source link

Compilation error on libappletdecoration/previewbridge.cpp #78

Closed enriquezmark36 closed 4 years ago

enriquezmark36 commented 4 years ago

Hello again, I just updated my running system to KDE Neon (Testing edition) 15.17.90 as of this writing and, as usual, a bunch of stuff began to collapse. For one, a newly built latte-dock started crashing with the debugger pointing to the outdated version of this applet. Now recompiling after pulling in about 6 months worth of changes resulted to this:

[ 52%] Building CXX object libappletdecoration/CMakeFiles/appletdecorationplugin.dir/previewbridge.cpp.o
/mark/applet-window-buttons/libappletdecoration/previewbridge.cpp: In member function ‘virtual std::unique_ptr<KDecoration2::DecoratedClientPrivate> Decoration::Applet::PreviewBridge::createClient(KDecoration2::DecoratedClient*, KDecoration2::Decoration*)’:
/mark/applet-window-buttons/libappletdecoration/previewbridge.cpp:75:83: error: invalid new-expression of abstract class type ‘Decoration::Applet::PreviewClient’
     auto ptr = std::unique_ptr<PreviewClient>(new PreviewClient(client, decoration));
                                                                                   ^
In file included from /mark/applet-window-buttons/libappletdecoration/previewbridge.cpp:27:0:
/mark/applet-window-buttons/libappletdecoration/previewclient.h:40:7: note:   because the following virtual functions are pure within ‘Decoration::Applet::PreviewClient’:
 class PreviewClient : public QObject, public KDecoration2::ApplicationMenuEnabledDecoratedClientPrivate
       ^~~~~~~~~~~~~
In file included from /usr/include/KDecoration2/KDecoration2/Private/DecoratedClientPrivate:1:0,
                 from /mark/applet-window-buttons/libappletdecoration/previewclient.h:31,
                 from /mark/applet-window-buttons/libappletdecoration/previewbridge.cpp:27:
/usr/include/KDecoration2/kdecoration2/private/decoratedclientprivate.h:76:19: note:    virtual QSize KDecoration2::DecoratedClientPrivate::size() const
     virtual QSize size() const = 0;
                   ^~~~
libappletdecoration/CMakeFiles/appletdecorationplugin.dir/build.make:278: recipe for target 'libappletdecoration/CMakeFiles/appletdecorationplugin.dir/previewbridge.cpp.o' failed
make[2]: *** [libappletdecoration/CMakeFiles/appletdecorationplugin.dir/previewbridge.cpp.o] Error 1
CMakeFiles/Makefile2:448: recipe for target 'libappletdecoration/CMakeFiles/appletdecorationplugin.dir/all' failed
make[1]: *** [libappletdecoration/CMakeFiles/appletdecorationplugin.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

The error is may have been brought to our world by this commit on github or in phabricator.

psifidotos commented 4 years ago

I wouldnt been surprised if Plasma 5.18 has introduced new changes that break the appletdecoration library provided by the applet

enriquezmark36 commented 4 years ago

The change that breaks this is from 2 days ago. Man, those packagers are fast.

Also, it seems that the fix should be as simple as writing a QSize size() method in PreviewClient as indicated in the warning...

psifidotos commented 4 years ago

if you need this fast you need to send a PR because Plasma 5.18 will reach me in a month... How this should be implemented in order to be applied only for Plasma >= 5.18 you can observe how this was already provided for other functions at: https://github.com/psifidotos/applet-window-buttons/blob/master/libappletdecoration/previewclient.h#L105

it will be needed: #if KDECORATION2_VERSION_MINOR >= 18

enriquezmark36 commented 4 years ago

Thanks but there's no sense of urgency in my case since the applet can temporarily be removed easily before latte-dock crashes. So, I'll just wait.

On Thu, Jan 30, 2020, 11:05 PM Michail Vourlakos notifications@github.com wrote:

if you need this fast you need to send a PR because Plasma 5.18 will reach me in a month... How this should be implemented in order to be applied only for Plasma >= 5.18 you can observe how this was already provided for other functions at: https://github.com/psifidotos/applet-window-buttons/blob/master/libappletdecoration/previewclient.h#L105

it will be needed:

if KDECORATION2_VERSION_MINOR >= 18

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/psifidotos/applet-window-buttons/issues/78?email_source=notifications&email_token=ABW4GHNJRPIE77JNBZPLXMTRALUDHA5CNFSM4KNWYNLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKLJ5JQ#issuecomment-580296358, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABW4GHMVU5OUQG4XAJ5WOWLRALUDHANCNFSM4KNWYNLA .

Erkhyan commented 4 years ago

My computer just updated to Plasma 5.18. Latte didn't crash but stopped displaying the buttons, so I recompiled, but I got the same exact error message described here.

buntupana commented 4 years ago

Same problem here after update to plasma 5.18 using KDE Neon

psifidotos commented 4 years ago

Duplicate #81

kupiqu commented 4 years ago

if you need this fast you need to send a PR because Plasma 5.18 will reach me in a month... How this should be implemented in order to be applied only for Plasma >= 5.18 you can observe how this was already provided for other functions at: https://github.com/psifidotos/applet-window-buttons/blob/master/libappletdecoration/previewclient.h#L105

it will be needed: #if KDECORATION2_VERSION_MINOR >= 18

Please take the following as constructive feedback and not as a critique. Latte and your applets are so good that I would say they are mainstream. Hence, I would suggest encouraging users to test them in beta versions of plasma and report bugs etc before new Plasma releases, e.g. with virtual machines. I think you would easily find volunteers to go through this if you would request that in reddit a couple of weeks before plasma release, for instance.

It seems this would give you more work but most likely it will be (almost) the same as you will need to fix it anyway in about one month. The only difference in work for you is in getting the virtual machine in place in the case there is any bug report.

The advantage of this would be that final users that get fast Plasma transitions (e.g. KDE neon) would have your applets tested and working just as good as Plasma itself.

[In my case waiting is not a big deal, as I can make Sierra Breeze Enhanced to show window buttons also for maximized windows to workaround the issue in the meantime]

psifidotos commented 4 years ago

Too many projects and they have become too important for many workflows. Unfortunately I don't have any more time to add and I can even tell you that my involvement will decrease a lot. So I am going to be involved only when that works for me. I am using Tumbleweed and when 5.18 reaches it then I will be able to fix things. Until then if anyone wants to provide earlier fixes, he can do so with PRs.

kupiqu commented 4 years ago

I understand. Frankly, I don't know how you can manage...

Thanks for the good (and hard) work!