Fix clearing recent usage history

Authored by heikobecker on Apr 30 2017, 4:38 PM.

Description

Fix clearing recent usage history

Summary:
The old method is gone with Plasma 4. Instead we can use
KActivitiesStats. Also, instead of checking at build time for
Q_WS_X11 (gone with Qt4), look at dbus if kactivitymanagerd's
service is registered to determine if the action should be
displayed.

Test Plan:
Checked with kactivitymanagerd available/unavailable on dbus.
Successfully removed the history.

Reviewers: kde-utils-devel

Differential Revision: https://phabricator.kde.org/D5677

Details