diff options
Diffstat (limited to 'src/widgets/widgets/qpushbutton.cpp')
-rw-r--r-- | src/widgets/widgets/qpushbutton.cpp | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/widgets/widgets/qpushbutton.cpp b/src/widgets/widgets/qpushbutton.cpp index b578aa0b18..f48b5706f7 100644 --- a/src/widgets/widgets/qpushbutton.cpp +++ b/src/widgets/widgets/qpushbutton.cpp @@ -684,38 +684,6 @@ bool QPushButton::event(QEvent *e) return QAbstractButton::event(e); } -#if 0 // Used to be included in Qt4 for Q_WS_MAC -/* \reimp */ -bool QPushButton::hitButton(const QPoint &pos) const -{ - QStyleOptionButton opt; - initStyleOption(&opt); - if (qt_mac_buttonIsRenderedFlat(this, &opt)) - return QAbstractButton::hitButton(pos); - - // Now that we know we are using the native style, let's proceed. - Q_D(const QPushButton); - QPushButtonPrivate *nonConst = const_cast<QPushButtonPrivate *>(d); - // In OSX buttons are round, which causes the hit method to be special. - // We cannot simply relay on detecting if something is inside the rect or not, - // we need to check if it is inside the "rounded area" or not. A point might - // be inside the rect but not inside the rounded area. - // Notice this method is only reimplemented for OSX. - return nonConst->hitButton(pos); -} - -bool QPushButtonPrivate::hitButton(const QPoint &pos) -{ - Q_Q(QPushButton); - QRect roundedRect(q->rect().left() + QMacStylePrivate::PushButtonLeftOffset, - q->rect().top() + QMacStylePrivate::PushButtonContentPadding, - q->rect().width() - QMacStylePrivate::PushButtonRightOffset, - q->rect().height() - QMacStylePrivate::PushButtonBottomOffset); - return roundedRect.contains(pos); -} -#endif - - QT_END_NAMESPACE #include "moc_qpushbutton.cpp" |