[KDialog] Fix --attach argument by watching for QDialog
ClosedPublic

Authored by broulik on Mar 13 2017, 9:30 PM.

Details

Summary

We ported from KDialog to QDialog and thus this code path was never actually executed.

Test Plan

When I do Save As in Chrome the window properly sets the browser window as transient parent and the browser window is dimmed by KWin.

Diff Detail

Repository
R229 KDialog
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.Mar 13 2017, 9:30 PM
dfaure edited edge metadata.Mar 15 2017, 8:03 AM

Well, KDialog inherits from QDialog, so your new check covers both.

I would just s/K/Q/ instead.

broulik updated this revision to Diff 12504.Mar 15 2017, 8:56 PM
broulik retitled this revision from [KDialog] Fix --attach argument by also watching for QDialog to [KDialog] Fix --attach argument by watching for QDialog.
broulik edited the test plan for this revision. (Show Details)
  • Just check for QDialog
dfaure accepted this revision.Mar 15 2017, 9:05 PM

I should have said this earlier, but qobject_cast<QDialog *>(o) would even be better than inherits, and the isWidgetType() check is unnecessary anyway (a dialog is a widget, yes). Oh well ;) Either way, ship it.

This revision is now accepted and ready to land.Mar 15 2017, 9:05 PM
This revision was automatically updated to reflect the committed changes.