summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qabstractscrollarea.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/widgets/qabstractscrollarea.cpp')
-rw-r--r--src/widgets/widgets/qabstractscrollarea.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/widgets/widgets/qabstractscrollarea.cpp b/src/widgets/widgets/qabstractscrollarea.cpp
index 2587a7a03b..5b31e4467f 100644
--- a/src/widgets/widgets/qabstractscrollarea.cpp
+++ b/src/widgets/widgets/qabstractscrollarea.cpp
@@ -60,7 +60,7 @@
#include <private/qapplication_p.h>
-#ifdef Q_DEAD_CODE_FROM_QT4_MAC
+#if 0 // Used to be included in Qt4 for Q_WS_MAC
#include <private/qt_mac_p.h>
#include <private/qt_cocoa_helpers_mac_p.h>
#endif
@@ -168,7 +168,7 @@ QAbstractScrollAreaPrivate::QAbstractScrollAreaPrivate()
shownOnce(false), inResize(false), sizeAdjustPolicy(QAbstractScrollArea::AdjustIgnored),
viewport(0), cornerWidget(0), left(0), top(0), right(0), bottom(0),
xoffset(0), yoffset(0), viewportFilter(0)
-#ifdef Q_DEAD_CODE_FROM_QT4_WIN
+#if 0 // Used to be included in Qt4 for Q_WS_WIN
, singleFingerPanEnabled(false)
#endif
{
@@ -321,7 +321,7 @@ void QAbstractScrollAreaPrivate::init()
#endif
}
-#ifdef Q_DEAD_CODE_FROM_QT4_WIN
+#if 0 // Used to be included in Qt4 for Q_WS_WIN
void QAbstractScrollAreaPrivate::setSingleFingerPanEnabled(bool on)
{
singleFingerPanEnabled = on;
@@ -329,7 +329,7 @@ void QAbstractScrollAreaPrivate::setSingleFingerPanEnabled(bool on)
if (dd)
dd->winSetupGestures();
}
-#endif // Q_DEAD_CODE_FROM_QT4_WIN
+#endif
void QAbstractScrollAreaPrivate::layoutChildren()
{
@@ -350,7 +350,7 @@ void QAbstractScrollAreaPrivate::layoutChildren()
const int hscrollOverlap = hbar->style()->pixelMetric(QStyle::PM_ScrollView_ScrollBarOverlap, &opt, hbar);
const int vscrollOverlap = vbar->style()->pixelMetric(QStyle::PM_ScrollView_ScrollBarOverlap, &opt, vbar);
-#ifdef Q_DEAD_CODE_FROM_QT4_MAC
+#if 0 // Used to be included in Qt4 for Q_WS_MAC
QWidget * const window = q->window();
// Use small scroll bars for tool windows, to match the native size grip.
@@ -393,7 +393,7 @@ void QAbstractScrollAreaPrivate::layoutChildren()
// If the scroll bars are at the very right and bottom of the window we
// move their positions to be aligned with the size grip.
-#ifdef Q_DEAD_CODE_FROM_QT4_MAC
+#if 0 // Used to be included in Qt4 for Q_WS_MAC
// Check if a native sizegrip is present.
bool hasMacReverseSizeGrip = false;
bool hasMacSizeGrip = false;
@@ -446,7 +446,7 @@ void QAbstractScrollAreaPrivate::layoutChildren()
if (hasCornerWidget && ((needv && vscrollOverlap == 0) || (needh && hscrollOverlap == 0)))
cornerOffset = extPoint;
-#ifdef Q_DEAD_CODE_FROM_QT4_MAC
+#if 0 // Used to be included in Qt4 for Q_WS_MAC
// Also move the scroll bars if they are covered by the native Mac size grip.
if (hasMacSizeGrip)
cornerOffset = extPoint;
@@ -463,7 +463,7 @@ void QAbstractScrollAreaPrivate::layoutChildren()
else
cornerPaintingRect = QRect();
-#ifdef Q_DEAD_CODE_FROM_QT4_MAC
+#if 0 // Used to be included in Qt4 for Q_WS_MAC
if (hasMacReverseSizeGrip)
reverseCornerPaintingRect = QRect(controlsRect.bottomRight() + QPoint(1, 1) - extPoint, extSize);
else
@@ -488,7 +488,7 @@ void QAbstractScrollAreaPrivate::layoutChildren()
if (needh) {
QRect horizontalScrollBarRect(QPoint(controlsRect.left() + vHeaderRight, cornerPoint.y()), QPoint(cornerPoint.x() - 1, controlsRect.bottom()));
-#ifdef Q_DEAD_CODE_FROM_QT4_MAC
+#if 0 // Used to be included in Qt4 for Q_WS_MAC
if (hasMacReverseSizeGrip)
horizontalScrollBarRect.adjust(vsbExt, 0, 0, 0);
#endif
@@ -602,7 +602,7 @@ void QAbstractScrollArea::setViewport(QWidget *widget)
d->viewport->setParent(this);
d->viewport->setFocusProxy(this);
d->viewport->installEventFilter(d->viewportFilter.data());
-#ifndef Q_DEAD_CODE_FROM_QT4_MAC
+#if 1 // Used to be excluded in Qt4 for Q_WS_MAC
#ifndef QT_NO_GESTURES
d->viewport->grabGesture(Qt::PanGesture);
#endif
@@ -1029,7 +1029,7 @@ bool QAbstractScrollArea::event(QEvent *e)
QPainter p(this);
style()->drawPrimitive(QStyle::PE_PanelScrollAreaCorner, &option, &p, this);
}
-#ifdef Q_DEAD_CODE_FROM_QT4_MAC
+#if 0 // Used to be included in Qt4 for Q_WS_MAC
if (d->reverseCornerPaintingRect.isValid()) {
option.rect = d->reverseCornerPaintingRect;
QPainter p(this);
@@ -1108,7 +1108,7 @@ bool QAbstractScrollArea::event(QEvent *e)
hBar->setValue(se->contentPos().x());
vBar->setValue(se->contentPos().y());
-#ifdef Q_DEAD_CODE_FROM_QT4_WIN
+#if 0 // Used to be included in Qt4 for Q_WS_WIN
typedef BOOL (*PtrBeginPanningFeedback)(HWND);
typedef BOOL (*PtrUpdatePanningFeedback)(HWND, LONG, LONG, BOOL);
typedef BOOL (*PtrEndPanningFeedback)(HWND, BOOL);
@@ -1532,13 +1532,13 @@ void QAbstractScrollAreaPrivate::_q_vslide(int y)
void QAbstractScrollAreaPrivate::_q_showOrHideScrollBars()
{
layoutChildren();
-#ifdef Q_DEAD_CODE_FROM_QT4_WIN
+#if 0 // Used to be included in Qt4 for Q_WS_WIN
// Need to re-subscribe to gestures as the content changes to make sure we
// enable/disable panning when needed.
QWidgetPrivate *dd = static_cast<QWidgetPrivate *>(QObjectPrivate::get(viewport));
if (dd)
dd->winSetupGestures();
-#endif // Q_DEAD_CODE_FROM_QT4_WIN
+#endif
}
QPoint QAbstractScrollAreaPrivate::contentsOffset() const