Skip to content

Clean up the document load/save error dialog

Amy spark requested to merge lsegovia/krita:work/amyspark/dlgloadmessages into master

This PR proposes to fix some issues I found with the current layout of DlgLoadMessages.

  • The rich text details box is always shown, irrespective of whether there are actual error messages or not.
  • The layout is done completely by hand, but the window is semantically a warning dialog, so it should, in my opinion, follow the operating system conventions.

I've fixed it by changing the base class over to QMessageBox, and setting each piece as follows:

  • Error message: text
  • The "Reason": informativeText
  • The contents of the errors/warnings: detailedText

And the last element is fixed by doing QString::split but skipping the empty parts; previously, the error and warning strings that were empty resulted in a QStringList with two elements, while it should have been an empty set.

The most relevant bit, I think, is that the error detail is no longer HTML list styled as Qt doesn't provide support for that.

Before After
Captura_de_pantalla_2022-12-25_133426 Captura_de_pantalla_2022-12-25_125705

Test Plan

(Tell us how to test the changes you made.)

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
Edited by Amy spark

Merge request reports