This fixes all texts being displayed as Text.PlainText if not explicitly overriden.
Is there a reason for this change, or a bug report that it fixes? How have you tested this? Do any visual changes result from this patch? If so, are they all desirable? Etc. Some more information would be nice.
I think it is undesireable to change the default, because all users are now used to having it PlainText, so they are now dumping things-that-looks-like-html into it and expecting it to be plaintext.
so all users of Label that don't have textFormat set now needs to go add this line to their files.
I also remember some discussions about the default to AutoText might have been wrong on Qt Text things (items and widgets) but can't be changed because people rely on the defaults.
So please, no.
@ngraham I noticed the issue when using the QtQuickControls 2 style. All other styles I know don't require setting the textFormat, only the Plasma Style. Of course all QQC2 applications could just set the textFormat, but it's not possible in all cases. For example I don't think you can set the textFormat for a tooltip.
Without this patch the tooltip looks like this:
afterwards like this:
Maybe there's a better way to fix it than what I did here though ....
What app/plasmoid/widget is that a screenshot from? It might make more sense to just set the text format there, rather than universally.
P.S. you can attach screenshots to comments here so they appear inline.
@ngraham The screenshot is from Kaidan. It's using QtQuickControls 2 with the Plasma Style, so not PlasmaComponents direcltly. I don't think it's possible to set the textFormat for this tooltip in QtQuickControls 2 unfortunately.
@svuorela So it seems like applications using Plasma components directly could break with this patch and the existing QtQuickControls 2 applications are broken without it...
You're absolutely right this is wrong.
It is a crap default, but it shouldn't change per theme when a user is using Qqc2 directly. They might develop for this and then switch to desktop and then we have a big problem.
Fortunately few use this class yet.
Should Applications really be using Plasma style and components? I think they probably should be using desktop QQC2 style via Kirigami instead.
Kirigami doesn't wrap qqc. One still uses qqc directly. On the phone that means this component.
I thought we did that consciously and intentionally since we could break compat here and the AutoText which tries to guess from the contents and even allows injecting img was something we wanted to avoid?