PDA

View Full Version : Suggestions to qmake



lni
1st May 2009, 16:55
Can you guys add deprecation warning in qmake?

For instance, if I use QWorkspace instead of QMdiArea, you can warn me that the QWorkspace is deprecated, and recommend to use QMdiArea instead.

The reason is that I have been using QWorkspace since day 1, and never thought of it being deprecated until there is a problem. Of course I could have checked the document, but if someone is very familiar with a class, he will tend not to review the doc again and again. You never know, QMdiArea could be deprecated too in the future...

qmake will read the files anyway, so it knows which deprecated classes are in the codes...

Boron
1st May 2009, 17:12
QtCentre is not affiliated with QtSoftware ;).
It is a free community, that is addicted to to Qt library :p.

Deprecated means "it is still working, but there is something newer".
You don't have to stop working with deprecated classes. You are used to it so use it as long as you like. Getting used to a new class takes time. In that time you might code thousands of lines more by using the deprecated class.
So where is the problem?
If QtSoftware some day decides to remove QWorkspace then you can get familiar to QMdiArea.

Microsoft implemented something similar to their C/C++ compiler.
Whenever you use a function like strcpy() you get a warning that this function is deprecated and unsafe. The compiler advices to use strncpy() instead.
There are many other functions MS considers unsafe and proposes an alternative.

lni
1st May 2009, 17:23
QtCentre is not affiliated with QtSoftware ;).


Really? I thought some of people here are from Trolltech? :confused:

I don't mean deprecated classes should not be used, but if there is a newer replacement, some people may wish to know it. If there is a bug in a deprecated class, it may not get fixed timely when there is a newer version, what do you think?

fullmetalcoder
1st May 2009, 17:42
Really? I thought some of people here are from Trolltech?
Really. If I remember well TT helped the admins to get the board up and running when the got away from QtForum and there might be some Trolls (well Noks since Trolltech no longer exists) hanging around here but that's all.

This remarks definitely belongs to the tracker (http://www.qtsoftware.com/developer/task-tracker), not the forum.