QSS type selectors match on metaObject()->className(). The toast styling in stylesheet_{dark,light}.qss targets `PJ--ToastNotification`, so pin the class name: a namespace/rename regression would silently drop the styling instead of failing loudly.
| 17 | // name: a namespace/rename regression would silently drop the styling instead |
| 18 | // of failing loudly. |
| 19 | TEST(ToastTest, ClassNameDrivesQssSelector) { |
| 20 | PJ::ToastNotification toast("hello"); |
| 21 | EXPECT_STREQ(toast.metaObject()->className(), "PJ::ToastNotification"); |
| 22 | } |
| 23 | |
| 24 | // showToast() must create a ToastNotification under the manager's transparent |
| 25 | // container (objectName preserved from PJ3 for stylesheet selectors). |