0
|
1 |
Here is a list of (major) changes in Qt from 0.95 to 0.96.
|
|
2 |
|
|
3 |
Bug-fixes, optimizations and improved documentation, of course.
|
|
4 |
QClipboard is new.
|
|
5 |
|
|
6 |
There are some changes in the API (Qt header files). Some functions have
|
|
7 |
been renamed or the arguments have changed. The old versions of these
|
|
8 |
functions have been obsoleted. A call to an obsoleted function will by
|
|
9 |
default generate a runtime warning the first time it is called, but it
|
|
10 |
will be executed correctly. If you really need to ship code fast, you can
|
|
11 |
turn off the runtime obsolescence warnings by calling
|
|
12 |
qSuppressObsoleteWarnings().
|
|
13 |
|
|
14 |
Obsoleted functions will disappear in a future release. To get
|
|
15 |
compile-time errors for each use of an obsoleted function, compile your
|
|
16 |
code with -DTEST_OBSOLETE. You should recompile without this option when
|
|
17 |
you have upgraded your code (otherwise, you may get linking errors).
|
|
18 |
Note: it is probably not a good idea to compile the Qt library with
|
|
19 |
-DTEST_OBSOLETE, it may cause problems if you try to link or run
|
|
20 |
programs that use obsoleted functions.
|
|
21 |
|
|
22 |
For new users: obsoleted functions are no longer documented, in fact they
|
|
23 |
are not even visible in the documentation.
|
|
24 |
|
|
25 |
*************** Changes that might affect runtime behavior *****************
|
|
26 |
|
|
27 |
QFileInfo:
|
|
28 |
----------
|
|
29 |
size() returns uint(previousy int), 0 if the size cannot be fetched (was -1).
|
|
30 |
Use isFile() to check.
|
|
31 |
|
|
32 |
|
|
33 |
QPopupMenu
|
|
34 |
------------
|
|
35 |
When a popup menu is a submenu (directly or as a subsub...menu) of a
|
|
36 |
menu bar(QMenuBar), the menu bar will now always emit the activated() or
|
|
37 |
highlighted() signal when a submenu emits these signals. This fix might
|
|
38 |
have undesired effects if you previously have worked around it by
|
|
39 |
connecting to signals both in menu bar and its submenus.
|
|
40 |
|
|
41 |
*************** Changes that might generate compile errors *****************
|
|
42 |
************** when compiling old code *****************
|
|
43 |
|
|
44 |
QDataStream:
|
|
45 |
-----------
|
|
46 |
Serialization of int and uint is no longer supported. Use INT32 and
|
|
47 |
UINT32 instead. This had to be changed in order to run Qt on 64-bit
|
|
48 |
architectures.
|
|
49 |
|
|
50 |
|
|
51 |
QImage:
|
|
52 |
-------
|
|
53 |
24-bpp pixel format no longer supported, use 32-bpp instead.
|
|
54 |
|
|
55 |
This means that you have to use uint* instead of uchar* when accessing
|
|
56 |
pixel values. You cannot use the uchar* pointer directly, because the
|
|
57 |
pixel format depends on the byte order on the underlying platform. Use
|
|
58 |
qRgb() and friends (qcolor.h) to access the pixels.
|
|
59 |
|
|
60 |
|
|
61 |
QWidget:
|
|
62 |
--------
|
|
63 |
setMouseTracking() does not return bool. Call hasMouseTracking() to
|
|
64 |
determine the mouse tracking state. (This only affects code that
|
|
65 |
actually uses the return value.)
|
|
66 |
|
|
67 |
(There are other changes in QWidget, see below)
|
|
68 |
|
|
69 |
|
|
70 |
*************** Type changes that might generate warnings: *****************
|
|
71 |
|
|
72 |
|
|
73 |
QCache/QIntCache:
|
|
74 |
-----------------
|
|
75 |
Using int/uint instead of long/ulong.
|
|
76 |
|
|
77 |
|
|
78 |
QDate/QTime/QDateTime:
|
|
79 |
----------------------
|
|
80 |
Using int/uint instead of long/ulong (MS-DOS required long).
|
|
81 |
|
|
82 |
|
|
83 |
QIODevice/QBuffer/QFile:
|
|
84 |
------------------------
|
|
85 |
Using int/uint instead of long/ulong.
|
|
86 |
|
|
87 |
|
|
88 |
QKeyEvent:
|
|
89 |
----------
|
|
90 |
ascii() now returns int (previously uchar).
|
|
91 |
|
|
92 |
|
|
93 |
QTableView:
|
|
94 |
------------
|
|
95 |
uint used instead of ulong (tableFlags() etc.)
|
|
96 |
|
|
97 |
|
|
98 |
QTextStream:
|
|
99 |
------------
|
|
100 |
int used instead of long (flags() etc.)
|
|
101 |
|
|
102 |
|
|
103 |
***************** Obsoleted functions **********************
|
|
104 |
|
|
105 |
QAccel:
|
|
106 |
-------
|
|
107 |
enable(), disable() and isDisabled() are obsolete.
|
|
108 |
Use setEnabled(TRUE/FALSE) and !isEnabled() instead.
|
|
109 |
isItemDisabled(), enableItem(), disableItem() are obsolete.
|
|
110 |
Use !isItemEnabled(), setItemEnabled(TRUE/FALSE) instead.
|
|
111 |
|
|
112 |
|
|
113 |
QApplication:
|
|
114 |
-------------
|
|
115 |
cursor(), setCursor() and restoreCursor() obsoleted.
|
|
116 |
Use overrideCursor(), setOverrideCursor() and restoreOverrideCursor()
|
|
117 |
instead.
|
|
118 |
|
|
119 |
|
|
120 |
QBitmap:
|
|
121 |
--------
|
|
122 |
Constructor takes "const uchar *bits" instead of "const char *"
|
|
123 |
because of sign problems (uchar = unsigned char). Old constructors are
|
|
124 |
obsolete.
|
|
125 |
|
|
126 |
|
|
127 |
QButton:
|
|
128 |
--------
|
|
129 |
toggleButton() is obsolete, renamed to isToggleButton().
|
|
130 |
|
|
131 |
|
|
132 |
QColor:
|
|
133 |
-------
|
|
134 |
The functions QRED, QGREEN, QBLUE, QRGB, QGRAY obsolete.
|
|
135 |
Instead, use qRed, qGreen, qBlue, qRgb, qGray.
|
|
136 |
|
|
137 |
|
|
138 |
QComboBox:
|
|
139 |
----------
|
|
140 |
setStrList() obsolete, use clear() + insertStrList() instead.
|
|
141 |
string() obsolete, use text() instead.
|
|
142 |
|
|
143 |
|
|
144 |
QLCDNumber:
|
|
145 |
----------
|
|
146 |
longValue() is obsolete, use intValue() instead.
|
|
147 |
|
|
148 |
|
|
149 |
QListbox:
|
|
150 |
---------
|
|
151 |
The macro LBI_String is obsolete, use LBI_text instead.
|
|
152 |
string() obsolete, use text() instead.
|
|
153 |
stringCopy() and setStringCopy() are obsolete.
|
|
154 |
|
|
155 |
|
|
156 |
QMenuData:
|
|
157 |
----------
|
|
158 |
string() obsolete, use text() instead.
|
|
159 |
isItemDisabled(), enableItem(), disableItem() are obsolete.
|
|
160 |
Use !isItemEnabled(), setItemEnabled(TRUE/FALSE) instead.
|
|
161 |
checkItem() and uncheckItem() are obsolete.
|
|
162 |
Use setItemChecked(TRUE/FALSE) instead.
|
|
163 |
|
|
164 |
|
|
165 |
QPainter:
|
|
166 |
---------
|
|
167 |
|
|
168 |
drawBezier() is obsolete, general Bezier curves are rarely used and
|
|
169 |
cost too much. Qt will only support drawQuadBezier() (four-point
|
|
170 |
Bezier) in the future.
|
|
171 |
|
|
172 |
QPointArray:
|
|
173 |
-----------
|
|
174 |
move() is obsolete, use translate() instead.
|
|
175 |
bezier() is obsolete, general Bezier curves are rarely used and
|
|
176 |
cost too much. Qt will only support quadBezier() (four-point
|
|
177 |
Bezier) in the future.
|
|
178 |
|
|
179 |
|
|
180 |
|
|
181 |
QRect:
|
|
182 |
------
|
|
183 |
move() is obsolete, use moveBy() instead.
|
|
184 |
setTopLeft(), setTopRight(), setBottomLeft(), setBottomRight() and
|
|
185 |
setCenter() is obsolete, use moveTopLeft(), moveTopRight(),
|
|
186 |
moveBottomLeft(), moveBottomRight() and moveCenter() instead.
|
|
187 |
|
|
188 |
|
|
189 |
QRegion:
|
|
190 |
-------
|
|
191 |
move() is obsolete, use translate() instead.
|
|
192 |
|
|
193 |
|
|
194 |
QSocketNotifier:
|
|
195 |
----------------
|
|
196 |
enabled() is obsolete. Use isEnabled() instead.
|
|
197 |
|
|
198 |
|
|
199 |
QWidget:
|
|
200 |
--------
|
|
201 |
enable(), disable() and isDisabled() are obsolete.
|
|
202 |
Use setEnabled(TRUE/FALSE) and !isEnabled() instead.
|
|
203 |
|
|
204 |
setMinimumSize(), setMaximumSize(), minimumSize(), maximumSize() are obsolete
|
|
205 |
use setMinSize(), setMaxSize(), minSize(), maxSize() instead.
|
|
206 |
|
|
207 |
enableUpdates() obsolete, use isUpdatesEnabled()/setUpdatesEnabled().
|
|
208 |
|
|
209 |
id() is obsolete, it has been renamed to winId().
|
|
210 |
|
|
211 |
***************** All other changes from 0.95 to 0.96 **********************
|
|
212 |
|
|
213 |
moc
|
|
214 |
----------
|
|
215 |
Gives a warning if no output is generated.
|
|
216 |
|
|
217 |
|
|
218 |
qglobal.h:
|
|
219 |
----------
|
|
220 |
INT32 and UINT32 typedefs changed to work with DEC Alpha.
|
|
221 |
|
|
222 |
|
|
223 |
QApplication:
|
|
224 |
-------------
|
|
225 |
clipboard() is new.
|
|
226 |
|
|
227 |
|
|
228 |
QButtonGroup:
|
|
229 |
-------------
|
|
230 |
Exclusive group setting added (isExclusive and setExclusive).
|
|
231 |
find() is new.
|
|
232 |
|
|
233 |
|
|
234 |
QColor:
|
|
235 |
-------
|
|
236 |
New type QRgb (uint), used for RGB triplet.
|
|
237 |
|
|
238 |
|
|
239 |
QLineEdit:
|
|
240 |
----------
|
|
241 |
You can now mark text, and copy and paste to/from the clipboard.
|
|
242 |
|
|
243 |
|
|
244 |
QPaintDevice:
|
|
245 |
---------
|
|
246 |
The bitblt function now takes an ignoreMask parameter. It has a default
|
|
247 |
value, so no old code will be broken.
|
|
248 |
|
|
249 |
QPrinter:
|
|
250 |
------------
|
|
251 |
fixed minor bugs in handling of polygons and beziers.
|
|
252 |
|
|
253 |
|
|
254 |
QWidget:
|
|
255 |
--------
|
|
256 |
New protected virtual functions styleChange(), backgroundColorChange(),
|
|
257 |
backgroundPixmapChange(), paletteChange() and fontChange().
|
|
258 |
These functions are called from setStyle(), setBackgroundColor() etc.
|
|
259 |
You can reimplement them to if you need to know when widget properties
|
|
260 |
changed and to optimize updates.
|
|
261 |
|
|
262 |
The destroyed() signal has been moved to QObject.
|
|
263 |
|