[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Compile error in libkdchart
From:       Johannes Simon <johannes.simon () gmail ! com>
Date:       2010-05-30 17:16:18
Message-ID: 04F741FE-1584-44E1-A01B-8A234A742E21 () gmail ! com
[Download RAW message or body]

Ah, so it's the conditional if statement that can't have two different types. Seems like GCC 4.5 indeed \
got a bit stricter there. I have committed your patch to trunk, thank you for the hint! That it does work \
for boud is a bit strange however.. Am 30.05.2010 um 15:39 schrieb Alvaro Soliverez:

> This is the error:
> 
> /home/al/desarrollo/kmm/kde4/kmymoney/libkdchart/src/KDChartLegend.cpp:
> En la función miembro ‘void KDChart::Legend::buildLegend()’:
> /home/al/desarrollo/kmm/kde4/kmymoney/libkdchart/src/KDChartLegend.cpp:981:88:
> error: los operandos de ?: tienen tipos diferentes ‘QColor’ y ‘QBrush’
> make[2]: *** [libkdchart/src/CMakeFiles/kmm_kdchart.dir/KDChartLegend.cpp.o]
> Error 1
> make[1]: *** [libkdchart/src/CMakeFiles/kmm_kdchart.dir/all] Error 2
> make: *** [all] Error 2
> 
> "los operandos de ?: tienen tipos diferentes ‘QColor’ y ‘QBrush’"
> means "the ? operators have different types".
> 
> My gcc is 4.5.0, which I've found to be stricter when it comes to
> include headers and inheritance.
> Let me know if I can help with anything else.
> 
> Regards,
> Alvaro
> 
> 
> On Sun, May 30, 2010 at 7:39 AM, Johannes Simon
> <johannes.simon@gmail.com> wrote:
> > Now that is an interesting error you get there.. It has not occured for me yet, and I wonder why it \
> > doesn't work for you. The assignment is basically QBrush = QColor, and from the QColor a QBrush is \
> > implicitly instanciated. This is entirely valid code, to my best knowledge, as there's no #ifdef's or \
> > whatsoever that would in certain cases, at compile time, forbid an implicit conversion from QColor to \
> > QBrush (see qbrush.h). Please post the compiler error you get, and I'll have a look at it. 
> > Thanks,
> > - Johannes
> > 
> > Am 30.05.2010 um 02:25 schrieb Alvaro Soliverez:
> > 
> > > Hello,
> > > as you may recall, KMyMoney copies the kdchart source from KOffice.
> > > 
> > > Since January, there is a compile error in the source we bring from
> > > KOffice, and I wonder whether it compiles correctly there because of
> > > something I'm not seeing.
> > > 
> > > The line in question is line 970 of KDChartLegend.cpp
> > > 
> > > // MarkerAttributes are preferred.
> > > const QBrush markerBrush =
> > > markerAttrs[dataset].markerColor().isValid() ?
> > > markerAttrs[dataset].markerColor()
> > > > brush( dataset );
> > > 
> > > I had to change it to this to make it run:
> > > 
> > > // MarkerAttributes are preferred.
> > > const QBrush markerBrush =
> > > markerAttrs[dataset].markerColor().isValid() ?
> > > 
> > > QBrush(markerAttrs[dataset].markerColor()) : brush( dataset );
> > > 
> > > We use KDChart extensively and we have found no problem with this change.
> > > 
> > > Is this something that went unnoticed or is there a workaround for
> > > this that I missed?
> > > 
> > > Thanks!
> > > 
> > > Regards,
> > > Alvaro
> > > KMyMoney development team
> > > _______________________________________________
> > > koffice-devel mailing list
> > > koffice-devel@kde.org
> > > https://mail.kde.org/mailman/listinfo/koffice-devel
> > 
> > _______________________________________________
> > koffice-devel mailing list
> > koffice-devel@kde.org
> > https://mail.kde.org/mailman/listinfo/koffice-devel
> > 
> _______________________________________________
> koffice-devel mailing list
> koffice-devel@kde.org
> https://mail.kde.org/mailman/listinfo/koffice-devel

_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic