QGraphicsWidget::geometryChanged problem in 4.7

Alexis Ménard menard at kde.org
Tue Aug 10 23:35:49 CEST 2010


On Tue, Aug 10, 2010 at 11:24 PM, Aaron J. Seigo <aseigo at kde.org> wrote:

> hi Alexis ...
>

Hi,


>
> QGraphicsWidget now has a geometryChanged signal in 4.7. Plasma::Applet
> also
> has one. which means we'll need to conditionally compile it out in
>  libplasma. so far, not a huge deal.
>

mmm, I didn't see it. strange.


>
> but there are two problems with QGraphicsWidget::geometryChanged:
>
> 0) it is
> called before resizeEvent is sent, which means that subclasses have no
> chance to do any internal adjustments before the outside world is told that
>  geometry is changing
>

Well probably a good idea, easy to fix.


>
> 1) it only emits this when setGeometry is called. QGraphicsItem::setPos
> also
> affects the geometry (in fact, setGeometry calls setPos internally), but
> there is no signal emitted in this case. meaning that the "geometryChanged"
>  signal doesn't actually always get emitted when geometry changes.
>
> :/
>

That's a bug...Good catch....


>
> without touching Plasma::Applet, we have the problem of the signal being
> emitted twice (once from QGraphicsView and once from Plasma::Applet), which
> we can just compile out as mentioned above ... if only it worked properly
>  :)
>

Yes...


>
> do you agree that this should get fixed in Qt?
>
>
>
Obviously. Will do tomorrow ASAP and ask integration in 4.7.0


>
> and then i just need to
>  figure out how to make it so that we don't get these errors:
>
> QMetaObject::indexOfSignal: signal geometryChanged() from QGraphicsWidget
>  redefined in Plasma::Applet
>
>
Well if you compile it out it should work right? With 4.7 and after the
signal is not defined anymore in Plasma::Applet. Am I missing something here
(it's 23:35 here :D).

I'm building my KDE against 4.7, it's funny I've never seen this issue.


> erf. hopefully QObject::connect is up to the task of connecting two signals
> of the same name from two different objects in the inheritance hierarchy. i
>  don't have a good feeling about that.


Me neither.


> --
> Aaron J. Seigo
> humru othro a kohnu se
> GPG Fingerprint: 8B8B 2209 0C6F
>  7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43
>
> KDE core developer sponsored by Qt Development Frameworks
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20100810/f0c1f1a4/attachment.htm 


More information about the Plasma-devel mailing list