Files
op-packages/qt6base/patches/020-fix-build-without-cssparser.patch
T
github-actions[bot] c71da84035
Merge-upstream / merge (push) Canceled after 0s
💋 Sync 2026-10-11 00:16:14
2026-10-11 00:16:14 +08:00

29 lines
955 B
Diff

--- a/src/widgets/widgets/qcommandlinkbutton.cpp
+++ b/src/widgets/widgets/qcommandlinkbutton.cpp
@@ -12,7 +12,9 @@
#include <qmath.h>
#include "private/qpushbutton_p.h"
+#if QT_CONFIG(style_stylesheet)
#include "private/qstylesheetstyle_p.h"
+#endif
QT_BEGIN_NAMESPACE
@@ -286,11 +288,15 @@ bool QCommandLinkButton::event(QEvent *e
// - or it has been set in the style sheet, in which case we don't want to override it here.
// When a style sheet with an icon is replaced by one without an icon, the old icon
// will be reset, when baseStyle()->repolish() is called.
+#if QT_CONFIG(style_stylesheet)
if (!qobject_cast<QStyleSheetStyle *>(style())) {
+#endif
QStyleOptionButton opt;
initStyleOption(&opt);
setIcon(style()->standardIcon(QStyle::SP_CommandLink, &opt, this));
+#if QT_CONFIG(style_stylesheet)
}
+#endif
}
return QPushButton::event(e);