From 2b540ac7418b8076dafb0ad11a498ecf0e3f49d0 Mon Sep 17 00:00:00 2001 From: Sergio Martins Date: Wed, 31 Jan 2018 16:53:35 +0000 Subject: stylesheets cleanup to prepare for a bigger patch No behavior was changed, just cleanup so the upcoming feature can land safely, with an elegant diff. - Removed all naked qobject_casts(), replaced them with qt_styleSheet() (which does the same, for now). - Removed a bunch of #ifdefed'out "metal hack" code. The code is disabled and enough time has passed without nobody needing it. - Removed a few "extra ? extra->style" by assigning it to a variable first. - Misc Change-Id: Ia45c38b06e2b5d2426635f730b4cb42c7ac1251d Reviewed-by: Gabriel de Dietrich --- src/widgets/kernel/qtooltip.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/kernel/qtooltip.cpp') diff --git a/src/widgets/kernel/qtooltip.cpp b/src/widgets/kernel/qtooltip.cpp index 69b62ff7d76..1057c9b8427 100644 --- a/src/widgets/kernel/qtooltip.cpp +++ b/src/widgets/kernel/qtooltip.cpp @@ -376,7 +376,7 @@ int QTipLabel::getTipScreen(const QPoint &pos, QWidget *w) void QTipLabel::placeTip(const QPoint &pos, QWidget *w) { #ifndef QT_NO_STYLE_STYLESHEET - if (testAttribute(Qt::WA_StyleSheet) || (w && qobject_cast(w->style()))) { + if (testAttribute(Qt::WA_StyleSheet) || (w && qt_styleSheet(w->style()))) { //the stylesheet need to know the real parent QTipLabel::instance->setProperty("_q_stylesheet_parent", QVariant::fromValue(w)); //we force the style to be the QStyleSheetStyle, and force to clear the cache as well. -- cgit v1.2.3