summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-06-15 07:37:43 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-06-15 07:37:43 (GMT)
commit6100dd1ccda7fce60625e99ffb2a90dc62cb1486 (patch)
tree7de5d72c227a163c3d042d8c04b8551176e4460a /src/gui/widgets
parent7b7f3869b15cee6f6815e10d49dcb8209a415edd (diff)
parent3a54e5ead647a318641d9a2bcf75eda4b8859d1b (diff)
downloadQt-6100dd1ccda7fce60625e99ffb2a90dc62cb1486.zip
Qt-6100dd1ccda7fce60625e99ffb2a90dc62cb1486.tar.gz
Qt-6100dd1ccda7fce60625e99ffb2a90dc62cb1486.tar.bz2
Merge remote branch 'origin/master'
Conflicts: src/gui/painting/qpainter.cpp
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qabstractscrollarea.cpp8
-rw-r--r--src/gui/widgets/qplaintextedit.cpp2
-rw-r--r--src/gui/widgets/qprogressbar.h6
-rw-r--r--src/gui/widgets/qstackedwidget.cpp8
4 files changed, 18 insertions, 6 deletions
diff --git a/src/gui/widgets/qabstractscrollarea.cpp b/src/gui/widgets/qabstractscrollarea.cpp
index 8cffebd..30ce23b 100644
--- a/src/gui/widgets/qabstractscrollarea.cpp
+++ b/src/gui/widgets/qabstractscrollarea.cpp
@@ -295,8 +295,10 @@ void QAbstractScrollAreaPrivate::init()
q->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
layoutChildren();
#ifndef Q_WS_MAC
+#ifndef QT_NO_GESTURES
viewport->grabGesture(Qt::PanGesture);
#endif
+#endif
}
#ifdef Q_WS_WIN
@@ -546,8 +548,10 @@ void QAbstractScrollArea::setViewport(QWidget *widget)
d->viewport->setFocusProxy(this);
d->viewport->installEventFilter(d->viewportFilter.data());
#ifndef Q_WS_MAC
+#ifndef QT_NO_GESTURES
d->viewport->grabGesture(Qt::PanGesture);
#endif
+#endif
d->layoutChildren();
if (isVisible())
d->viewport->show();
@@ -960,6 +964,7 @@ bool QAbstractScrollArea::event(QEvent *e)
case QEvent::TouchUpdate:
case QEvent::TouchEnd:
return false;
+#ifndef QT_NO_GESTURES
case QEvent::Gesture:
{
QGestureEvent *ge = static_cast<QGestureEvent *>(e);
@@ -980,6 +985,7 @@ bool QAbstractScrollArea::event(QEvent *e)
}
return false;
}
+#endif // QT_NO_GESTURES
case QEvent::StyleChange:
case QEvent::LayoutDirectionChange:
case QEvent::ApplicationLayoutDirectionChange:
@@ -1036,9 +1042,11 @@ bool QAbstractScrollArea::viewportEvent(QEvent *e)
#endif
return QFrame::event(e);
case QEvent::LayoutRequest:
+#ifndef QT_NO_GESTURES
case QEvent::Gesture:
case QEvent::GestureOverride:
return event(e);
+#endif
default:
break;
}
diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp
index 2734fba..21c2635 100644
--- a/src/gui/widgets/qplaintextedit.cpp
+++ b/src/gui/widgets/qplaintextedit.cpp
@@ -1476,6 +1476,7 @@ bool QPlainTextEdit::event(QEvent *e)
d->sendControlEvent(e);
}
#endif
+#ifndef QT_NO_GESTURES
else if (e->type() == QEvent::Gesture) {
QGestureEvent *ge = static_cast<QGestureEvent *>(e);
QPanGesture *g = static_cast<QPanGesture *>(ge->gesture(Qt::PanGesture));
@@ -1499,6 +1500,7 @@ bool QPlainTextEdit::event(QEvent *e)
}
return true;
}
+#endif // QT_NO_GESTURES
return QAbstractScrollArea::event(e);
}
diff --git a/src/gui/widgets/qprogressbar.h b/src/gui/widgets/qprogressbar.h
index b461a21..58bc8b2 100644
--- a/src/gui/widgets/qprogressbar.h
+++ b/src/gui/widgets/qprogressbar.h
@@ -93,9 +93,11 @@ public:
Qt::Orientation orientation() const;
void setInvertedAppearance(bool invert);
- bool invertedAppearance();
+ bool invertedAppearance(); //### Qt5 make const
+ bool invertedAppearance() const { return const_cast<QProgressBar *>(this)->invertedAppearance(); }
void setTextDirection(QProgressBar::Direction textDirection);
- QProgressBar::Direction textDirection();
+ QProgressBar::Direction textDirection(); //### Qt5 make const
+ QProgressBar::Direction textDirection() const { return const_cast<QProgressBar *>(this)->textDirection(); }
void setFormat(const QString &format);
QString format() const;
diff --git a/src/gui/widgets/qstackedwidget.cpp b/src/gui/widgets/qstackedwidget.cpp
index 6c4061c..57b43b5 100644
--- a/src/gui/widgets/qstackedwidget.cpp
+++ b/src/gui/widgets/qstackedwidget.cpp
@@ -228,11 +228,11 @@ int QStackedWidget::insertWidget(int index, QWidget *widget)
}
/*!
- Removes the given \a widget from the QStackedWidget.
+ Removes \a widget from the QStackedWidget. i.e., \a widget is \e
+ not deleted but simply removed from the stacked layout, causing it
+ to be hidden.
- \bold{Note:} The ownership of \a widget remains the same.
- The widget is \e not deleted, but simply removed from the widget's
- stacked layout, causing it to be hidden.
+ \bold{Note:} Ownership of \a widget reverts to the application.
\sa addWidget(), insertWidget(), currentWidget()
*/