summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@nokia.com>2010-12-02 00:12:33 (GMT)
committerRobert Griebl <robert.griebl@nokia.com>2010-12-02 00:13:00 (GMT)
commit2770b1277744bb676e96e4ae8c89acd645ec895d (patch)
tree0be437e48d5d900da49f2d56e128573151fa44b1 /src/gui
parent0274e68767cce6440515a68d6af868725d5577a4 (diff)
downloadQt-2770b1277744bb676e96e4ae8c89acd645ec895d.zip
Qt-2770b1277744bb676e96e4ae8c89acd645ec895d.tar.gz
Qt-2770b1277744bb676e96e4ae8c89acd645ec895d.tar.bz2
Fix code style issues in QScroller
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/util/qscroller.cpp4
-rw-r--r--src/gui/util/qscrollerproperties.cpp4
-rw-r--r--src/gui/widgets/qabstractscrollarea.cpp8
3 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/util/qscroller.cpp b/src/gui/util/qscroller.cpp
index d6b7aaf..5aa2b71 100644
--- a/src/gui/util/qscroller.cpp
+++ b/src/gui/util/qscroller.cpp
@@ -422,7 +422,7 @@ Qt::GestureType QScroller::grabGesture(QObject *target, ScrollerGestureType scro
if (scrollGestureType == TouchGesture)
widget->setAttribute(Qt::WA_AcceptTouchEvents);
- } else if(QGraphicsObject *go = qobject_cast<QGraphicsObject*>(target)) {
+ } else if (QGraphicsObject *go = qobject_cast<QGraphicsObject*>(target)) {
if (scrollGestureType == TouchGesture)
go->setAcceptTouchEvents(true);
go->grabGesture(sp->recognizerType);
@@ -460,7 +460,7 @@ void QScroller::ungrabGesture(QObject *target)
QWidget *widget = static_cast<QWidget *>(target);
widget->ungrabGesture(sp->recognizerType);
- } else if(QGraphicsObject *go = qobject_cast<QGraphicsObject*>(target)) {
+ } else if (QGraphicsObject *go = qobject_cast<QGraphicsObject*>(target)) {
go->ungrabGesture(sp->recognizerType);
}
diff --git a/src/gui/util/qscrollerproperties.cpp b/src/gui/util/qscrollerproperties.cpp
index 4fba489..d21f131 100644
--- a/src/gui/util/qscrollerproperties.cpp
+++ b/src/gui/util/qscrollerproperties.cpp
@@ -262,7 +262,7 @@ QVariant QScrollerProperties::scrollMetric(ScrollMetric metric) const
case FrameRate: return QVariant::fromValue(d->frameRate);
case ScrollMetricCount: break;
}
- return QVariant();
+ return QVariant();
}
/*!
@@ -404,7 +404,7 @@ void QScrollerProperties::setScrollMetric(ScrollMetric metric, const QVariant &v
\value VerticalOvershootPolicy This is the horizontal overshooting policy (see OvershootPolicy).
- \value FrameRate This is the frame rate which should be used while dragging or scrolling.
+ \value FrameRate This is the frame rate which should be used while dragging or scrolling.
QScroller uses a QAbstractAnimation timer internally to sync all scrolling operations to other
animations that might be active at the same time. If the Standard value of 60 frames per
second is too fast for your use case, you can lower the frames per second with this setting
diff --git a/src/gui/widgets/qabstractscrollarea.cpp b/src/gui/widgets/qabstractscrollarea.cpp
index 13942ea..030f544 100644
--- a/src/gui/widgets/qabstractscrollarea.cpp
+++ b/src/gui/widgets/qabstractscrollarea.cpp
@@ -1005,13 +1005,13 @@ bool QAbstractScrollArea::event(QEvent *e)
case QEvent::ScrollPrepare:
{
QScrollPrepareEvent *se = static_cast<QScrollPrepareEvent *>(e);
- if( d->canStartScrollingAt(se->startPos().toPoint()) ) {
+ if (d->canStartScrollingAt(se->startPos().toPoint())) {
QScrollBar *hBar = horizontalScrollBar();
QScrollBar *vBar = verticalScrollBar();
- se->setViewportSize( QSizeF(viewport()->size()) );
- se->setContentPosRange( QRectF(0, 0, hBar->maximum(), vBar->maximum()) );
- se->setContentPos( QPointF(hBar->value(), vBar->value()) );
+ se->setViewportSize(QSizeF(viewport()->size()));
+ se->setContentPosRange(QRectF(0, 0, hBar->maximum(), vBar->maximum()));
+ se->setContentPos(QPointF(hBar->value(), vBar->value()));
se->accept();
return true;
}