From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vicente Olivert Riera Date: Wed, 9 Sep 2015 14:37:31 +0100 Subject: [Buildroot] [PATCHv3 03/15] qt: fix directfb-1.7.7 compiler errors In-Reply-To: <1441144876-2628-4-git-send-email-thomas.petazzoni@free-electrons.com> References: <1441144876-2628-1-git-send-email-thomas.petazzoni@free-electrons.com> <1441144876-2628-4-git-send-email-thomas.petazzoni@free-electrons.com> Message-ID: <55F0361B.4030109@imgtec.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net Dear Thomas Petazzoni, On 09/01/2015 11:01 PM, Thomas Petazzoni wrote: > From: Peter Seiderer Any comments about where this patch comes from? Is it an upstream patch, or has this patch been submitted upstream? > Signed-off-by: Peter Seiderer > Signed-off-by: Thomas Petazzoni > --- > ...ion-constructor-error-for-legacy-c-compil.patch | 163 +++++++++++++++++++++ > 1 file changed, 163 insertions(+) > create mode 100644 package/qt/0008-Fix-conversion-constructor-error-for-legacy-c-compil.patch > > diff --git a/package/qt/0008-Fix-conversion-constructor-error-for-legacy-c-compil.patch b/package/qt/0008-Fix-conversion-constructor-error-for-legacy-c-compil.patch > new file mode 100644 > index 0000000..d7d387a > --- /dev/null > +++ b/package/qt/0008-Fix-conversion-constructor-error-for-legacy-c-compil.patch > @@ -0,0 +1,163 @@ > +From ea46f47fb3c475ba2d7581c15185b8d43e63b8c2 Mon Sep 17 00:00:00 2001 > +From: Peter Seiderer > +Date: Fri, 27 Feb 2015 21:30:52 +0100 > +Subject: [PATCH] Fix conversion/constructor error for legacy c++ compiler. > +MIME-Version: 1.0 > +Content-Type: text/plain; charset=UTF-8 > +Content-Transfer-Encoding: 8bit > + > +Fixes the following compile error with legacy c++ compiler: > + > +error: in C++98 ?blitRect? must be initialized by constructor, not by ?{...}? > + > +Signed-off-by: Peter Seiderer you are submitting this patch to Buildroot, so, shouldn't you add your SoB here as well? Regards, Vincent. > +--- > + src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp | 14 +++++++------- > + src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp | 6 +++--- > + src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp | 6 +++--- > + src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp | 2 +- > + 4 files changed, 14 insertions(+), 14 deletions(-) > + > +diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp > +index 876d0c2..ed69386 100644 > +--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp > ++++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp > +@@ -942,7 +942,7 @@ void QDirectFBPaintEngine::drawBufferSpan(const uint *buffer, int bufsize, > + IDirectFBSurface *src = d->surfaceCache->getSurface(buffer, bufsize); > + // ### how does this play with setDFBColor > + src->SetColor(src, 0, 0, 0, const_alpha); > +- const DFBRectangle rect = { 0, 0, length, 1 }; > ++ const DFBRectangle rect = (DFBRectangle_C){ 0, 0, length, 1 }; > + d->surface->Blit(d->surface, src, &rect, x, y); > + } > + > +@@ -1223,14 +1223,14 @@ void QDirectFBPaintEnginePrivate::blit(const QRectF &dest, IDirectFBSurface *s, > + const QRect dr = engine->state()->matrix.mapRect(dest).toRect(); > + if (dr.isEmpty()) > + return; > +- const DFBRectangle sRect = { sr.x(), sr.y(), sr.width(), sr.height() }; > ++ const DFBRectangle sRect = (DFBRectangle_C){ sr.x(), sr.y(), sr.width(), sr.height() }; > + DFBResult result; > + > + if (dr.size() == sr.size()) { > + result = surface->Blit(surface, s, &sRect, dr.x(), dr.y()); > + } else { > + Q_ASSERT(supportsStretchBlit()); > +- const DFBRectangle dRect = { dr.x(), dr.y(), dr.width(), dr.height() }; > ++ const DFBRectangle dRect = (DFBRectangle_C){ dr.x(), dr.y(), dr.width(), dr.height() }; > + result = surface->StretchBlit(surface, s, &sRect, &dRect); > + } > + if (result != DFB_OK) > +@@ -1261,7 +1261,7 @@ void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPix > + if (newClip.isNull()) > + return; > + > +- const DFBRegion clip = { > ++ const DFBRegion clip = (DFBRegion_C){ > + newClip.x(), > + newClip.y(), > + newClip.right(), > +@@ -1295,7 +1295,7 @@ void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPix > + while (y <= destinationRect.bottom()) { > + qreal x = startX; > + while (x <= destinationRect.right()) { > +- const DFBRectangle destination = { qRound(x), qRound(y), mappedSize.width(), mappedSize.height() }; > ++ const DFBRectangle destination = (DFBRectangle_C){ qRound(x), qRound(y), (int)mappedSize.width(), (int)mappedSize.height() }; > + surface->StretchBlit(surface, sourceSurface, 0, &destination); > + x += mappedSize.width(); > + } > +@@ -1337,7 +1337,7 @@ void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPix > + if (currentClip.isEmpty()) { > + surface->SetClip(surface, 0); > + } else { > +- const DFBRegion clip = { > ++ const DFBRegion clip = (DFBRegion_C){ > + currentClip.x(), > + currentClip.y(), > + currentClip.right(), > +@@ -1356,7 +1356,7 @@ void QDirectFBPaintEnginePrivate::updateClip() > + surface->SetClip(surface, NULL); > + clipType = NoClip; > + } else if (clipData->hasRectClip) { > +- const DFBRegion r = { > ++ const DFBRegion r = (DFBRegion_C){ > + clipData->clipRect.x(), > + clipData->clipRect.y(), > + clipData->clipRect.right(), > +diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp > +index 412e684..c59c47d 100644 > +--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp > ++++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp > +@@ -363,7 +363,7 @@ void QDirectFBPixmapData::copy(const QPixmapData *data, const QRect &rect) > + } else { > + dfbSurface->SetBlittingFlags(dfbSurface, DSBLIT_NOFX); > + } > +- const DFBRectangle blitRect = { rect.x(), rect.y(), > ++ const DFBRectangle blitRect = (DFBRectangle_C){ rect.x(), rect.y(), > + rect.width(), rect.height() }; > + w = rect.width(); > + h = rect.height(); > +@@ -465,7 +465,7 @@ QPixmap QDirectFBPixmapData::transformed(const QTransform &transform, > + } > + data->dfbSurface->SetBlittingFlags(data->dfbSurface, flags); > + > +- const DFBRectangle destRect = { 0, 0, size.width(), size.height() }; > ++ const DFBRectangle destRect = (DFBRectangle_C){ 0, 0, size.width(), size.height() }; > + data->dfbSurface->StretchBlit(data->dfbSurface, dfbSurface, 0, &destRect); > + data->w = size.width(); > + data->h = size.height(); > +@@ -551,7 +551,7 @@ bool QDirectFBPixmapData::scroll(int dx, int dy, const QRect &rect) > + return false; > + } > + > +- const DFBRectangle source = { rect.x(), rect.y(), rect.width(), rect.height() }; > ++ const DFBRectangle source = (DFBRectangle_C){ rect.x(), rect.y(), rect.width(), rect.height() }; > + result = dfbSurface->Blit(dfbSurface, dfbSurface, &source, source.x + dx, source.y + dy); > + if (result != DFB_OK) { > + DirectFBError("QDirectFBPixmapData::scroll", result); > +diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp > +index eab9580..d26e5bf 100644 > +--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp > ++++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp > +@@ -1635,7 +1635,7 @@ void QDirectFBScreen::solidFill(const QColor &color, const QRegion ®ion) > + static inline void clearRect(IDirectFBSurface *surface, const QColor &color, const QRect &rect) > + { > + Q_ASSERT(surface); > +- const DFBRegion region = { rect.left(), rect.top(), rect.right(), rect.bottom() }; > ++ const DFBRegion region = (DFBRegion_C){ rect.left(), rect.top(), rect.right(), rect.bottom() }; > + // could just reinterpret_cast this to a DFBRegion > + surface->SetClip(surface, ®ion); > + surface->Clear(surface, color.red(), color.green(), color.blue(), color.alpha()); > +@@ -1716,14 +1716,14 @@ void QDirectFBScreen::flipSurface(IDirectFBSurface *surface, DFBSurfaceFlipFlags > + const DFBSurfaceFlipFlags nonWaitFlags = flipFlags & ~DSFLIP_WAIT; > + for (int i=0; i + const QRect &r = rects.at(i); > +- const DFBRegion dfbReg = { r.x() + offset.x(), r.y() + offset.y(), > ++ const DFBRegion dfbReg = (DFBRegion_C){ r.x() + offset.x(), r.y() + offset.y(), > + r.right() + offset.x(), > + r.bottom() + offset.y() }; > + surface->Flip(surface, &dfbReg, i + 1 < rects.size() ? nonWaitFlags : flipFlags); > + } > + } else { > + const QRect r = region.boundingRect(); > +- const DFBRegion dfbReg = { r.x() + offset.x(), r.y() + offset.y(), > ++ const DFBRegion dfbReg = (DFBRegion_C){ r.x() + offset.x(), r.y() + offset.y(), > + r.right() + offset.x(), > + r.bottom() + offset.y() }; > + surface->Flip(surface, &dfbReg, flipFlags); > +diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp > +index 4dff907..25ad06b 100644 > +--- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp > ++++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp > +@@ -333,7 +333,7 @@ bool QDirectFBWindowSurface::scroll(const QRegion ®ion, int dx, int dy) > + } > + dfbSurface->SetBlittingFlags(dfbSurface, DSBLIT_NOFX); > + const QRect r = region.boundingRect(); > +- const DFBRectangle rect = { r.x(), r.y(), r.width(), r.height() }; > ++ const DFBRectangle rect = (DFBRectangle_C){ r.x(), r.y(), r.width(), r.height() }; > + dfbSurface->Blit(dfbSurface, dfbSurface, &rect, r.x() + dx, r.y() + dy); > + return true; > + } > +-- > +2.1.4 > + >