Skip to content

Commit

Permalink
Fix coding style issues
Browse files Browse the repository at this point in the history
Avoid Qt Sanity Bot noise when these files are moved.

Change-Id: I714e949837909883fe7e387ae336d2ffc4a1912b
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
  • Loading branch information
Kent Hansen authored and Qt by Nokia committed Oct 17, 2011
1 parent 830c698 commit f713037
Show file tree
Hide file tree
Showing 39 changed files with 224 additions and 225 deletions.
6 changes: 3 additions & 3 deletions src/declarative/items/context2d/qsgcontext2d.cpp
Expand Up @@ -1648,7 +1648,7 @@ static v8::Handle<v8::Value> ctx2d_strokeRect(const v8::Arguments &args)

r->context->buffer()->strokeRect(x, y, w, h);
}

return args.This();
}

Expand Down Expand Up @@ -1837,7 +1837,7 @@ static v8::Handle<v8::Value> ctx2d_clip(const v8::Arguments &args)
else
r->context->state.clipPath = clipPath;
r->context->buffer()->clip(r->context->state.clipPath);

return args.This();
}

Expand Down Expand Up @@ -2626,7 +2626,7 @@ static v8::Handle<v8::Value> ctx2d_imageData_filter(const v8::Arguments &args)

if (args.Length() >= 1) {
int filterFlag = args[0]->IntegerValue();
switch(filterFlag) {
switch (filterFlag) {
case QSGCanvasItem::Mono :
{
r->image = r->image.convertToFormat(QImage::Format_Mono).convertToFormat(QImage::Format_ARGB32_Premultiplied);
Expand Down
26 changes: 13 additions & 13 deletions src/declarative/items/qsganchors.cpp
Expand Up @@ -76,7 +76,7 @@ static qreal vcenter(QSGItem *item)
static qreal position(QSGItem *item, QSGAnchorLine::AnchorLine anchorLine)
{
qreal ret = 0.0;
switch(anchorLine) {
switch (anchorLine) {
case QSGAnchorLine::Left:
ret = item->x();
break;
Expand Down Expand Up @@ -109,7 +109,7 @@ static qreal position(QSGItem *item, QSGAnchorLine::AnchorLine anchorLine)
static qreal adjustedPosition(QSGItem *item, QSGAnchorLine::AnchorLine anchorLine)
{
qreal ret = 0.0;
switch(anchorLine) {
switch (anchorLine) {
case QSGAnchorLine::Left:
ret = 0.0;
break;
Expand Down Expand Up @@ -253,7 +253,7 @@ void QSGAnchorsPrivate::addDepend(QSGItem *item)
{
if (!item)
return;

QSGItemPrivate *p = QSGItemPrivate::get(item);
p->addItemChangeListener(this, QSGItemPrivate::Geometry);
}
Expand Down Expand Up @@ -887,7 +887,7 @@ void QSGAnchors::setLeftMargin(qreal offset)
if (d->leftMargin == offset)
return;
d->leftMargin = offset;
if(d->fill)
if (d->fill)
d->fillChanged();
else
d->updateHorizontalAnchors();
Expand All @@ -906,7 +906,7 @@ void QSGAnchors::setRightMargin(qreal offset)
if (d->rightMargin == offset)
return;
d->rightMargin = offset;
if(d->fill)
if (d->fill)
d->fillChanged();
else
d->updateHorizontalAnchors();
Expand All @@ -925,13 +925,13 @@ void QSGAnchors::setMargins(qreal offset)
if (d->margins == offset)
return;
//###Is it significantly faster to set them directly so we can call fillChanged only once?
if(!d->rightMargin || d->rightMargin == d->margins)
if (!d->rightMargin || d->rightMargin == d->margins)
setRightMargin(offset);
if(!d->leftMargin || d->leftMargin == d->margins)
if (!d->leftMargin || d->leftMargin == d->margins)
setLeftMargin(offset);
if(!d->topMargin || d->topMargin == d->margins)
if (!d->topMargin || d->topMargin == d->margins)
setTopMargin(offset);
if(!d->bottomMargin || d->bottomMargin == d->margins)
if (!d->bottomMargin || d->bottomMargin == d->margins)
setBottomMargin(offset);
d->margins = offset;
emit marginsChanged();
Expand All @@ -950,7 +950,7 @@ void QSGAnchors::setHorizontalCenterOffset(qreal offset)
if (d->hCenterOffset == offset)
return;
d->hCenterOffset = offset;
if(d->centerIn)
if (d->centerIn)
d->centerInChanged();
else
d->updateHorizontalAnchors();
Expand All @@ -969,7 +969,7 @@ void QSGAnchors::setTopMargin(qreal offset)
if (d->topMargin == offset)
return;
d->topMargin = offset;
if(d->fill)
if (d->fill)
d->fillChanged();
else
d->updateVerticalAnchors();
Expand All @@ -988,7 +988,7 @@ void QSGAnchors::setBottomMargin(qreal offset)
if (d->bottomMargin == offset)
return;
d->bottomMargin = offset;
if(d->fill)
if (d->fill)
d->fillChanged();
else
d->updateVerticalAnchors();
Expand All @@ -1007,7 +1007,7 @@ void QSGAnchors::setVerticalCenterOffset(qreal offset)
if (d->vCenterOffset == offset)
return;
d->vCenterOffset = offset;
if(d->centerIn)
if (d->centerIn)
d->centerInChanged();
else
d->updateVerticalAnchors();
Expand Down
20 changes: 10 additions & 10 deletions src/declarative/items/qsganimatedimage.cpp
Expand Up @@ -144,18 +144,18 @@ QSGAnimatedImage::~QSGAnimatedImage()
bool QSGAnimatedImage::isPaused() const
{
Q_D(const QSGAnimatedImage);
if(!d->_movie)
if (!d->_movie)
return false;
return d->_movie->state()==QMovie::Paused;
}

void QSGAnimatedImage::setPaused(bool pause)
{
Q_D(QSGAnimatedImage);
if(pause == d->paused)
if (pause == d->paused)
return;
d->paused = pause;
if(!d->_movie)
if (!d->_movie)
return;
d->_movie->setPaused(pause);
}
Expand All @@ -179,7 +179,7 @@ bool QSGAnimatedImage::isPlaying() const
void QSGAnimatedImage::setPlaying(bool play)
{
Q_D(QSGAnimatedImage);
if(play == d->playing)
if (play == d->playing)
return;
d->playing = play;
if (!d->_movie)
Expand Down Expand Up @@ -282,11 +282,11 @@ void QSGAnimatedImage::load()
connect(d->_movie, SIGNAL(frameChanged(int)),
this, SLOT(movieUpdate()));
d->_movie->setCacheMode(QMovie::CacheAll);
if(d->playing)
if (d->playing)
d->_movie->start();
else
d->_movie->jumpToFrame(0);
if(d->paused)
if (d->paused)
d->_movie->setPaused(true);
d->setPixmap(d->_movie->currentPixmap());
d->status = Ready;
Expand Down Expand Up @@ -347,13 +347,13 @@ void QSGAnimatedImage::movieRequestFinished()
connect(d->_movie, SIGNAL(frameChanged(int)),
this, SLOT(movieUpdate()));
d->_movie->setCacheMode(QMovie::CacheAll);
if(d->playing)
if (d->playing)
d->_movie->start();
if (d->paused || !d->playing) {
d->_movie->jumpToFrame(d->preset_currentframe);
d->preset_currentframe = 0;
}
if(d->paused)
if (d->paused)
d->_movie->setPaused(true);
d->setPixmap(d->_movie->currentPixmap());
d->status = Ready;
Expand All @@ -370,11 +370,11 @@ void QSGAnimatedImage::movieUpdate()
void QSGAnimatedImage::playingStatusChanged()
{
Q_D(QSGAnimatedImage);
if((d->_movie->state() != QMovie::NotRunning) != d->playing){
if ((d->_movie->state() != QMovie::NotRunning) != d->playing) {
d->playing = (d->_movie->state() != QMovie::NotRunning);
emit playingChanged();
}
if((d->_movie->state() == QMovie::Paused) != d->paused){
if ((d->_movie->state() == QMovie::Paused) != d->paused) {
d->playing = (d->_movie->state() == QMovie::Paused);
emit pausedChanged();
}
Expand Down
2 changes: 1 addition & 1 deletion src/declarative/items/qsganimation.cpp
Expand Up @@ -129,7 +129,7 @@ void QSGParentAnimation::setVia(QSGItem *via)
//### mirrors same-named function in QSGItem
QPointF QSGParentAnimationPrivate::computeTransformOrigin(QSGItem::TransformOrigin origin, qreal width, qreal height) const
{
switch(origin) {
switch (origin) {
default:
case QSGItem::TopLeft:
return QPointF(0, 0);
Expand Down
7 changes: 3 additions & 4 deletions src/declarative/items/qsgcanvas.cpp
Expand Up @@ -992,10 +992,9 @@ bool QSGCanvasPrivate::deliverMouseEvent(QMouseEvent *event)

lastMousePosition = event->windowPos();

if (!mouseGrabberItem &&
if (!mouseGrabberItem &&
event->type() == QEvent::MouseButtonPress &&
(event->button() & event->buttons()) == event->buttons()) {

return deliverInitialMousePressEvent(rootItem, event);
}

Expand Down Expand Up @@ -1542,7 +1541,7 @@ bool QSGCanvas::sendEvent(QSGItem *item, QEvent *e)
case QEvent::MouseButtonRelease:
case QEvent::MouseButtonDblClick:
case QEvent::MouseMove:
// XXX todo - should sendEvent be doing this? how does it relate to forwarded events?
// XXX todo - should sendEvent be doing this? how does it relate to forwarded events?
{
QMouseEvent *se = static_cast<QMouseEvent *>(e);
if (!d->sendFilteredMouseEvent(item->parentItem(), item, se)) {
Expand Down Expand Up @@ -1929,7 +1928,7 @@ QImage QSGCanvas::grabFrameBuffer()
}

/*!
Returns an incubation controller that splices incubation between frames
Returns an incubation controller that splices incubation between frames
for this canvas. QSGView automatically installs this controller for you.
The controller is owned by the canvas and will be destroyed when the canvas
Expand Down
4 changes: 2 additions & 2 deletions src/declarative/items/qsgflickable.cpp
Expand Up @@ -943,7 +943,7 @@ void QSGFlickablePrivate::handleMouseReleaseEvent(QMouseEvent *event)

// if we drag then pause before release we should not cause a flick.
qint64 elapsed = QSGItemPrivate::elapsed(lastPosTime);

vData.updateVelocity();
hData.updateVelocity();

Expand Down Expand Up @@ -1655,7 +1655,7 @@ bool QSGFlickable::sendMouseEvent(QMouseEvent *event)

mouseEvent.setAccepted(false);

switch(mouseEvent.type()) {
switch (mouseEvent.type()) {
case QEvent::MouseMove:
d->handleMouseMoveEvent(&mouseEvent);
break;
Expand Down
6 changes: 3 additions & 3 deletions src/declarative/items/qsgimage.cpp
Expand Up @@ -489,7 +489,7 @@ void QSGImage::updatePaintedGeometry()
if (widthScale <= heightScale) {
d->paintedWidth = w;
d->paintedHeight = widthScale * qreal(d->pix.height());
} else if(heightScale < widthScale) {
} else if (heightScale < widthScale) {
d->paintedWidth = heightScale * qreal(d->pix.width());
d->paintedHeight = h;
}
Expand All @@ -510,7 +510,7 @@ void QSGImage::updatePaintedGeometry()
qreal heightScale = height() / qreal(d->pix.height());
if (widthScale < heightScale) {
widthScale = heightScale;
} else if(heightScale < widthScale) {
} else if (heightScale < widthScale) {
heightScale = widthScale;
}

Expand Down Expand Up @@ -574,7 +574,7 @@ QSGNode *QSGImage::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *)
}

QSGImageNode *node = static_cast<QSGImageNode *>(oldNode);
if (!node) {
if (!node) {
d->pixmapChanged = true;
node = d->sceneGraphContext()->createImageNode();
node->setTexture(texture);
Expand Down

0 comments on commit f713037

Please sign in to comment.