Empty input combo box in KInputDialog::getItem

Reinhold Kainhofer reinhold at kainhofer.com
Tue Sep 23 00:26:51 BST 2003


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

Currently, there is no way to get an empty input line of the combo box in the 
KInputDialog::getItem, because it only uses KComboBox::setCurrentItem( ... ).

Currently, for all invalid indices the first entry of the QStringList is 
selected by default.

The attached patch changes this so that when the index parameter of 
getItem(...) is negative, no item is selected, and the editable combo box has 
no text.

I'd need this in KOrganizer to ask the user for the name of a template to 
save. By default there should be no selection, because then the user might 
overwrite an existing template. However, there should also the possibility to 
select an already existing template name to change it.

Any objections?

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

iD8DBQE/b4VATqjEwhXvPN0RAknRAKDUuIeKr/PpiX/dwbBrwB0INrSE9wCfVo+D
qCGPsLdqDBq9DaEVlON2HS4=
=rwTA
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2003-09-23_KInputDialog_EmptySelectionInComboBox.patch
Type: text/x-diff
Size: 755 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20030923/6fb8b634/attachment.patch>


More information about the kde-core-devel mailing list