From ce73b4db62574fc966192e6a4f65b7e2b2280e38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 20 Aug 2019 14:26:05 +0200 Subject: Remove dead code from Qt 4 times MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The benefit of keeping this code around was to inspire or inform changes in the areas to take into account possibly missing features in Qt 5, but at this point that benefit is questionable. We can always use the history to learn about missing pieces if needed. Change-Id: I87a02dc451e9027be9b97554427bf8a1c6b2c025 Reviewed-by: Tor Arne Vestbø --- src/widgets/styles/qpixmapstyle.cpp | 8 -------- src/widgets/styles/qstyleoption.cpp | 5 ----- src/widgets/styles/qstylesheetstyle.cpp | 7 ------- 3 files changed, 20 deletions(-) (limited to 'src/widgets/styles') diff --git a/src/widgets/styles/qpixmapstyle.cpp b/src/widgets/styles/qpixmapstyle.cpp index 976bd2630e..05e8467528 100644 --- a/src/widgets/styles/qpixmapstyle.cpp +++ b/src/widgets/styles/qpixmapstyle.cpp @@ -122,9 +122,6 @@ QPixmapStyle::~QPixmapStyle() void QPixmapStyle::polish(QApplication *application) { QCommonStyle::polish(application); -#if 0 // Used to be included in Qt4 for Q_WS_WIN - QApplication::setEffectEnabled(Qt::UI_AnimateCombo, false); -#endif } /*! @@ -188,11 +185,6 @@ void QPixmapStyle::polish(QWidget *widget) frame->setContentsMargins(pix.margins.left(), desc.margins.top(), pix.margins.right(), desc.margins.bottom()); frame->setAttribute(Qt::WA_TranslucentBackground); -#if 0 // Used to be included in Qt4 for Q_WS_WIN - // FramelessWindowHint is needed on windows to make - // WA_TranslucentBackground work properly - frame->setWindowFlags(widget->windowFlags() | Qt::FramelessWindowHint); -#endif } } #endif // QT_CONFIG(combobox) diff --git a/src/widgets/styles/qstyleoption.cpp b/src/widgets/styles/qstyleoption.cpp index 4faf98a0a3..5b3efd598f 100644 --- a/src/widgets/styles/qstyleoption.cpp +++ b/src/widgets/styles/qstyleoption.cpp @@ -198,11 +198,6 @@ void QStyleOption::init(const QWidget *widget) state |= QStyle::State_Active; if (widget->isWindow()) state |= QStyle::State_Window; -#if 0 // Used to be included in Qt4 for Q_WS_MAC - extern bool qt_mac_can_clickThrough(const QWidget *w); //qwidget_mac.cpp - if (!(state & QStyle::State_Active) && !qt_mac_can_clickThrough(widget)) - state &= ~QStyle::State_Enabled; -#endif switch (QStyleHelper::widgetSizePolicy(widget)) { case QStyleHelper::SizeSmall: state |= QStyle::State_Small; diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index ea653459d3..dd225fbec3 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -5153,13 +5153,6 @@ QSize QStyleSheetStyle::sizeFromContents(ContentsType ct, const QStyleOption *op sz = csz + QSize(vertical ? 0 : spaceForIcon, vertical ? spaceForIcon : 0); return subRule.boxSize(subRule.adjustSize(sz)); } -#if 0 // Used to be included in Qt4 for Q_WS_MAC - if (baseStyle()->inherits("QMacStyle")) { - //adjust the size after the call to the style because the mac style ignore the size arguments anyway. - //this might cause the (max-){width,height} property to include the native style border while they should not. - return subRule.adjustSize(baseStyle()->sizeFromContents(ct, opt, csz, w)); - } -#endif sz = subRule.adjustSize(csz); break; } -- cgit v1.2.3