Port solid from Qt5::Widgets to Qt5::Gui
ClosedPublic

Authored by graesslin on Jun 14 2018, 4:10 PM.

Details

Summary

The only usage of widgets was to get the active window. Incorrectly this
was done through QWidget which would fail for any application using just
QtGui (e.g. QtQuick).

As QGuiApplication also provides access to the focus window we can use
QtGui API instead. As a note: the whole thing is X11 specific as a
window ID is passed to another process, which cannot work on Wayland.
It's possible to get it work on Wayland, but that would require:

  • changes to the dbus protocol
  • add a dependency to KWayland
  • or extend QtWayland to generate the required code
Test Plan

Compiles

Diff Detail

Repository
R245 Solid
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin created this revision.Jun 14 2018, 4:10 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptJun 14 2018, 4:10 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
graesslin requested review of this revision.Jun 14 2018, 4:10 PM
dhaumann accepted this revision.Jun 14 2018, 7:14 PM
dhaumann added a subscriber: dhaumann.

const auto would be even nicer, if possible. Besides that, lgtm.

This revision is now accepted and ready to land.Jun 14 2018, 7:14 PM
apol accepted this revision.Jun 15 2018, 10:30 AM
broulik accepted this revision.Jun 16 2018, 11:46 AM

@graesslin pong? One year passed.

apol added a comment.Dec 5 2019, 12:36 AM

I see this patch still works and applies. I'd say landing it would still make sense. If nobody disagrees I'll do so in a week.

This revision was automatically updated to reflect the committed changes.