How to handle deprecated constructors
Christian Ehrlicher
Ch.Ehrlicher at gmx.de
Fri Feb 24 18:34:16 GMT 2006
Olivier Goffart schrieb:
> Le Vendredi 24 Février 2006 18:38, Christian Ehrlicher a écrit :
>> Hi,
>>
>> I get a lot of warnings about deprecated constructors like this:
>>
>> KShortcutDialogAdvanced::KShortcutDialogAdvanced(QWidget* parent, const
>> char* name, Qt::WFlags fl)
>>
>> : QWidget(parent, name, fl)
>>
>> {
>> ...
>> }
>>
>> QWidget(QWidget* parent, const char *name, Qt::WFlags f = 0) is
>> deprected. I could simply remove 'name' from the constructor but this
>> wouldn't solve the real problem.
>
> call setObjectName(name)
>
>> I think also a new
>> KShortcutDialogAdvanced::KShortcutDialogAdvanced(QWidget* parent,
>> Qt::WFlags fl) is needed and the old one should declared deprecated.
>
> Yes. in KDE4/Qt4 we should remove all 'name' from contructors
Ok, and how to handle things like Qt3ComboBox::insertItem(QString, int)
-> Q4ComboBox::insertItem(int, QString) / Q4ComboBox::addItem(QString)?
Create also new functions and mark the old as deprecated or just mark
them as todo / deprecated so they get changed later?
Or don't touch them at all? But I think this wouldn't be a good idea and
only confuse the developers.
Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060224/d8f2b72d/attachment.sig>
More information about the kde-core-devel
mailing list