Use correct window for getting ComboBox current icon pixmap
ClosedPublic

Authored by broulik on Feb 1 2019, 10:10 PM.

Details

Summary

In widgets:

  • windowHandle() only works for top level widgets (windows), so we need to first get the actual window() as windowHandle() is always nullptr for controls like ComboBox

In QtQuick Controls:

  • we would just blow up for accessing widget which is null here. Use the QQuickWindow of the QQuickItem, if any. Given how long this went unnoticed shows that Qt *never* ever had icons working in ComboBoxes in QtQuick...
Test Plan

5.15

No longer blows up when I try to use icons in QQC2 desktop style ComboBox
Didn't notice any visual difference in widget combobox rendering despite it now supposedly doing something wrt scaling?

Compiled with and without BREEZE_HAVE_QTQUICK

Diff Detail

Repository
R31 Breeze
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Feb 1 2019, 10:10 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 1 2019, 10:10 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Feb 1 2019, 10:10 PM
broulik edited the summary of this revision. (Show Details)
davidedmundson accepted this revision.Feb 2 2019, 8:21 AM
This revision is now accepted and ready to land.Feb 2 2019, 8:21 AM
This revision was automatically updated to reflect the committed changes.