[ToolTipDialog] Use KWindowSystem::isPlatformX11() which is cached
ClosedPublic

Authored by broulik on Jan 8 2017, 2:37 PM.

Details

Summary

I think it's wrong to set the flags for *every* event() but at least avoid the string comparison Qt does internally in QX11Info::isPlatformX11()
Also, removes the need for an ifdef.

Diff Detail

Repository
R242 Plasma Framework (Library)
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik updated this revision to Diff 9855.Jan 8 2017, 2:37 PM
broulik retitled this revision from to [ToolTipDialog] Use KWindowSystem::isPlatformX11() which is cached.
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added a reviewer: Plasma.
broulik set the repository for this revision to R242 Plasma Framework (Library).
Restricted Application added projects: Plasma, Frameworks. · View Herald TranscriptJan 8 2017, 2:37 PM
Restricted Application added subscribers: Frameworks, plasma-devel. · View Herald Transcript
davidedmundson accepted this revision.Jan 8 2017, 2:42 PM
davidedmundson added a reviewer: davidedmundson.
This revision is now accepted and ready to land.Jan 8 2017, 2:42 PM
markg added a subscriber: markg.Jan 8 2017, 2:48 PM
markg added inline comments.
src/declarativeimports/core/tooltipdialog.cpp
116–119

Isn't this redundant anyway?
It's being set in the constructor as well.

The constructor only deviates in initial flags (it doesn't explicitly set Qt::WindowDoesNotAcceptFocus | Qt::WindowStaysOnTopHint). Hmm, if you add these flags to the constructor (don't know if that is allowed) then you can just call "return Dialog::event(e);" after the #endif.

This revision was automatically updated to reflect the committed changes.