Skip to content

[applets/digital-clock] Fix "both pointSize and pixelSize defined" warning

This warning happens because the Digital Clock is using PC2 labels, which set the pointSize internally. However in this usage of them, we don't use the pointSize and instead set the pixelSize to make the label always match the height of a size helper item. This results in both pointSize and pixelSize being defined. This is an ambiguous situation, so Qt helpfully ignores pointSize in favor of pixelSize and prints a warning for us.

Because what we're doing here is intentional, let's explicitly unset pointSize ourselves so we don't make Qt do it for us. This removes the noisy warning message that is printed at every plasmashell startup.

Ultimately we need to port these labels to PC3, but that is quite challenging due to the complicated text sizing logic. Am effort to do it can be found at !222 (closed). Until that is done, fixing this warning here is still worth it IMO.

cc @dmadaan @apol @davidedmundson @mart

Merge request reports