KMessagebox::createKMessageBox() doesn't return proper button codes

Adriaan de Groot groot at kde.org
Wed Oct 6 16:44:36 BST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The attached itty bitty program queries the user twice - once with a dialog 
constructed through createKMessageBox, and once with questionYesNoCancel.  
Here, I get (for instance) output like this:

tester: WARNING: Return 256
tester: WARNING: Return 3

after clicking on the "yes" button both times. I'd expect it to return the 
same value in both cases. The reason this is not so is clear: 
createKMessageBox returns the button ids from the KDialog directly, while 
questionYesNoCancel returns a translated button code. Since both methods have 
the same return type int and the return value is undocumented, it's a bit 
confusing. If there's a docs guru who feels like frobbing this , please do so 
- -- otherwise, if no objections, I'll add a blurb myself.

- -- 
Don't worry, 't ain't no shame to be stupid - ol' mouse.
    GPG: FEA2 A3FE Adriaan de Groot
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (FreeBSD)

iD8DBQFBZBLqdqzuAf6io/4RAizeAJwP6PCkw4XtbGQir98QSH0C5vi7lgCfeizM
5Eeh1iRJ7kHT318Vrjb+G5I=
=j9eH
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.cc
Type: text/x-c++src
Size: 625 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20041006/9113cf6f/attachment.cc>


More information about the kde-core-devel mailing list