--===============1043085346==
Content-Type: multipart/signed;
boundary="nextPart4445284.Bur3ucJ0pt";
protocol="application/pgp-signature";
micalg=pgp-sha1
Content-Transfer-Encoding: 7bit

--nextPart4445284.Bur3ucJ0pt
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Am Freitag, 24. Februar 2006 18:19 schrieb Thomas Baumgart:
> So if I get this right - and I already read your explanation a few times -
> you have the following setup:
>
> A B (Objects)
>
> changed --> slotSet
>
> slotSet <--- changed
>
> where A::slotSet() contains "emit changed()" and B::slotSet() does the
> same. So when you call any of the slotSet methods directly via code then
> you end up in an endless loop. Right?


Yeah, thats the setup I have. Except that I avoided the direct endless loop=
by=20
having a static bool as signle-execution-protection in A::changed.

> > What to do?

> In the above case, I would do the following (example code for one object
> only)
> A::slotSet(..., QObject* p =3D 0);
> A::slotSet(..., QObject* p)
> {
> if(p =3D=3D this)
> return;
>
> if(p =3D=3D 0)
> p =3D this;
>
>
>
> emit changed(..., p);
> }
> I used the '...' to represent all your current parameters you pass around.
> The above should avoid that you execute A::slotSet a second time. In your
> actual initial call, you would not specify the parameter p so it will get
> passed as 0 to startup the logic.


Well, that could work. Will try it.

But the problem is that A's interface should be compatible in the Qt-way=20
(thats why the slots and signals are setValue(...) and valueChanged(...)) a=
nd=20
that B is a Qt-class (QSpinBox, QLineEdit, QDoubleSpinBox to be precise).

But when I use an own class as bridge for the Qt-widgets it could work. Tha=
nks=20
for the idea, also thanks to Cyrille!

> p.s. Gr=FCsse nach Dillenburg.


Thanks, currently I am not in Dillenburg but in Halle (Saale) for studying.=
=20
And currently it looks as if I am never to stay for a long time (>1year) in=
=20
Dillenburg again...

Have a nice day,

Arnold

=2D-=20
Get my public-key from pgp.mit.edu or pgp.uni-mainz.de

--nextPart4445284.Bur3ucJ0pt
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQBD/0RpuYLL1cDjHx0RAvXBAJ9jONZRslsokLs554lKqYZgaNAZ2wC fbY8z
0wA0j3LQfrMlme+PBZ3oy0U=
=tXGC
-----END PGP SIGNATURE-----

--nextPart4445284.Bur3ucJ0pt--

--===============1043085346==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


--===============1043085346==--