Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCHv3 03/15] qt: fix directfb-1.7.7 compiler errors
Date: Wed, 9 Sep 2015 14:37:31 +0100	[thread overview]
Message-ID: <55F0361B.4030109@imgtec.com> (raw)
In-Reply-To: <1441144876-2628-4-git-send-email-thomas.petazzoni@free-electrons.com>

Dear Thomas Petazzoni,

On 09/01/2015 11:01 PM, Thomas Petazzoni wrote:
> From: Peter Seiderer <ps.report@gmx.net>

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 <ps.report@gmx.net>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  ...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 <ps.report@gmx.net>
> +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 <ps.report@gmx.net>

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 &region)
> + 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, &region);
> +     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<rects.size(); ++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 &region, 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
> +
> 

  reply	other threads:[~2015-09-09 13:37 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-01 22:01 [Buildroot] [PATCHv3 00/15] DirectFB stack bump Thomas Petazzoni
2015-09-01 22:01 ` [Buildroot] [PATCHv3 01/15] directfb: bump to 1.7.7 Thomas Petazzoni
2015-09-04 14:52   ` Vicente Olivert Riera
2015-09-04 16:11     ` Arnout Vandecappelle
2015-09-04 16:41       ` Vicente Olivert Riera
2015-09-01 22:01 ` [Buildroot] [PATCHv3 02/15] directfb: mark as available only for gcc >= 4.5 Thomas Petazzoni
2015-09-04 14:49   ` Vicente Olivert Riera
2015-09-10 12:20   ` Peter Korsgaard
2015-09-10 16:39     ` Arnout Vandecappelle
2015-09-11  6:57     ` Thomas Petazzoni
2015-09-01 22:01 ` [Buildroot] [PATCHv3 03/15] qt: fix directfb-1.7.7 compiler errors Thomas Petazzoni
2015-09-09 13:37   ` Vicente Olivert Riera [this message]
2015-09-09 13:47     ` Thomas Petazzoni
2015-09-01 22:01 ` [Buildroot] [PATCHv3 04/15] directfb: do not use inexistant configure options Thomas Petazzoni
2015-09-04 14:21   ` Vicente Olivert Riera
2015-09-04 14:41     ` Vicente Olivert Riera
2015-09-04 14:54       ` Vicente Olivert Riera
2015-09-01 22:01 ` [Buildroot] [PATCHv3 05/15] directfb: remove broken X.org support Thomas Petazzoni
2015-09-01 22:01 ` [Buildroot] [PATCHv3 06/15] directfb: remove BR2_PACKAGE_DIRECTFB_UNIQUE option Thomas Petazzoni
2015-09-01 22:01 ` [Buildroot] [PATCHv3 07/15] directfb: add options for divine and sawman Thomas Petazzoni
2015-09-01 22:01 ` [Buildroot] [PATCHv3 08/15] directfb: add new TIFF option Thomas Petazzoni
2015-09-01 22:01 ` [Buildroot] [PATCHv3 09/15] divine: remove package Thomas Petazzoni
2015-09-01 22:01 ` [Buildroot] [PATCHv3 10/15] sawman: " Thomas Petazzoni
2015-09-01 22:01 ` [Buildroot] [PATCHv3 11/15] linux-fusion: bump to 9.0.3, use .tar.xz Thomas Petazzoni
2015-09-01 22:01 ` [Buildroot] [PATCHv3 12/15] linux-fusion: use a more traditional style to define LINUX_FUSION_MAKE_OPTS Thomas Petazzoni
2015-09-01 22:01 ` [Buildroot] [PATCHv3 13/15] directfb-examples: remove options for each example Thomas Petazzoni
2015-09-01 22:01 ` [Buildroot] [PATCHv3 14/15] directfb-examples: do not install to staging Thomas Petazzoni
2015-09-01 22:01 ` [Buildroot] [PATCHv3 15/15] directfb-examples: bump to 1.7.0 Thomas Petazzoni
2015-09-10 12:20 ` [Buildroot] [PATCHv3 00/15] DirectFB stack bump Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55F0361B.4030109@imgtec.com \
    --to=vincent.riera@imgtec.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox