~ubuntu-branches/ubuntu/karmic/kde4libs/karmic-security

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Guide to Porting Applications to KDE 4.0</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
<!--
body {
    font-size: 0.8em;
    font-family: "Bitstream Vera Sans", "Lucida Grande", "Trebuchet MS", sans-serif;
    color: #535353;
    background-color: #ffffff;
}

h1, h2, h3, h4, h5 {
    font-weight: bold;
    color: #f7800a;
}

a:link {
    padding-bottom: 0;
    text-decoration: none;
    color: #0057ae;
}

a:visited {
    padding-bottom: 0;
    text-decoration: none;
    color: #644A9B;
}

a[href]:hover {
    text-decoration: underline;
}

pre {
    display: block;
    margin: 0.3em;
    padding: 0.3em;
    font-size: 1em;
    font-family: Courier, 'Courier New', 'Andale Mono', Monaco, monospace;
    color: #000000;
    background: #f9f9f9;
    border: #2f6fab dashed;
    border-width: 1px;
    overflow: auto;
    line-height: 1.1em;
}
-->
</style>
</head>
<body>
<h1>Porting Applications to KDE 4.0</h1>

<h2>Note</h2>
<p>All modules should build from /trunk/KDE/kdelibs; there is no snapshot branch any longer. Major changes happen on Mondays (in any timezone) so expect rapid changes during that time. Things should be generally stable otherwise, but this <b>is</b> the development area, so there are no guarantees.</p>

<p>Deprecated classed that have been renamed to e.g. K3Foo are in kde3support.</p>

<p>This document contains the changes you have to apply to programs written for
KDE 3.x when you want to port them to KDE 4.0.<br>

<h3><a name="TOC">Table of Contents</a></h3>

<UL>
<li><a href="#gettingstarted">Getting Started</a></li>
<li><a href="#globalchanges">Global Changes</a></li>
<li><a href="#kab">Changes in kab</a></li>
<li><a href="#kdefx">kdefx porting (kdefx has been removed)</a></li>
<li><a href="#kdecore">Changes in kdecore</a></li>
<li><a href="#kdeui">Changes in kdeui</a></li>
<li><a href="#kio">Changes in kio</a></li>
<li><a href="#kparts">Changes in kparts</a></li>
<li><a href="#kded">Changes in kded</a></li>
<li><a href="#kspell">Changes in kspell</a></li>
<li><a href="#kdnssd">Changes in kdnssd</a></li>
<li><a href="#khtmlpart">API-cleanup in KHTML</a></li>
<li><a href="#kfile">Changes in kfile</a></li>
<li><a href="#kdesu">Changes in kdesu</a></li>
<li><a href="#kcontrol">KDE Control Center</a></li>
<li><a href="#kicker">Panel Applets and Extensions</a></li>
<li><a href="#kscreensaver">KScreensaver</a></li>
<li><a href="#i18n">I18N</a></li>
<li><a href="#kssl">KSSL</a></li>
<li><a href="#mimetypes">Mime types names</a></li>
<li><a href="#knewstuff">KNewStuff</a></li>
<li><a href="#dcop">DCOP</a></li>
<li><a href="#printing">Printing</a></li>
</UL>

<h3><a name="gettingstarted">Getting started</a></h3>

<p>As a start you should have a look at doc/html/porting4.html in the Qt package,
or <a href="http://doc.trolltech.com/4.3/porting4.html">this page online</a>.</p>

<p>To start with the porting, you can run "qt3to4 -strict list_of_files"
followed by kdesdk/scripts/qt4/adapt-to-qt4-api.pl and kdesdk/scripts/qt4/adapt-to-kde4-api.pl</p>

<h4 align="right"><a href="#TOC">Return to the Table of Contents</a></h4>

<h3><a name="globalchanges">Global Changes</a></h3>
<ul>
<li>
The "const char *name" arguments in the constructors of QObject derived classes
have been removed. Use setObjectName() instead if the object name is really necessary.
</li>
<li>The define KDE_DEPRECATED must be used now at the start of the declaration
(but still after an eventual "static", "inline" or "virtual" keyword).
KDE_DEPRECATED does not work with constructors, use KDE_CONSTRUCTOR_DEPRECATED
instead.</li>
</ul>

<h4 align="right"><a href="#TOC">Return to the Table of Contents</a></h4>


<h3><a name="kab">Changes in kab</a></h3>

<h4 align="right"><a href="#TOC">Return to the Table of Contents</a></h4>

<h3><a name="kdefx">Changes in kdefx</a></h3>

<p>kdefx has been removed.</p>

<ul>
<li>KStyle moved to kdeui</li>
<li>Use Solid::Processor instead of KCPUInfo.</li>
<li>Most of KImageEffect is now available in blitz; the bits that aren't can be done with QPainter.
<ul>
<li>Qt has gradients now, please use them if you can. Otherwise blitz has gradients ala KImageEffect.</li>
</ul>
</li>
<li>KPixmapEffect was little more than a wrapper around pixmap-&gt;image-&gt;KImageEffect-&gt;image-&gt;pixmap. Use the replacements for KImageEffect.</li>
<li>kdrawutils.h is gone.
<ul>
<li>If you already ported your code to KDE4, your code now has a copy of whatever kdrawutil code you were using.</li>
<li>If you haven't ported your code yet, you get to find a copy of what you need in svn's revision history (or in branches/3.5).</li>
</ul>
</li>
<li>The functionality of KPixmapSplitter cen be emulated with this code, courtesy of Matt Newell:
<pre>
QRect getFlowedRect(int index, const QSize &amp;itemSize,
                    int layoutWidth, int h_spacing, int v_spacing)
{
    // NOTE: if using h_spacing, depending on your use you might want to replace
    // layoutWidth with (layoutWidth + h_spacing)
    int itemsPerRow = layoutWidth / (itemSize.width() + h_spacing);
    return QRect( QPoint( (index % itemsPerRow) * (itemSize.width() + h_spacing),
                          (index / itemsPerRow) * (itemSize.height() + v_spacing) ),
                  itemSize );
}
</pre>
</li>
<li>Use QPixmap instead of KPixmap.</li>
</ul>

<h4 align="right"><a href="#TOC">Return to the Table of Contents</a></h4>

<h3><a name="kdecore">Changes in kdecore</a></h3>

<ul>
<li>kuniqueapp.h =&gt; kuniqueapplication.h</li>
<li>klargefile.h =&gt; kde_file.h</li>
<li>kcatalogue.h =&gt; kcatalog.h</li>
<li>kaccelmanager.h =&gt; kacceleratormanager.h</li>
<li>kprocctrl.h =&gt; k3protocolcontroller.h</li>
<li>KInstance was renamed to KComponentData</li>
<li>KGlobalAccel moved to kdeui</li>
<li>KGlobalSettings moved to kdeui</li>
<li>KIconLoaded moved to kdeui</li>
<li>KSessionManaged renamed to KSessionManager and moved to kdeui</li>
<li>KShortcut moved to kdeui</li>
</ul>

<h4>KAboutData</h4>
<ul>
<li>KAboutData::setTranslator needs different parameters now.
(Please see the corresponding Doxygen comment for the current state.)</li>
<li>new catalogName parameter to constructor can be null or empty, then appName is used as catalog name</li>
<li>all setter methods return object reference, so they can be chained to avoid repeating object name (eg. for addAuthor(), addCredits(), etc.)</li>
</ul>
<p>I18N_NOOPs in general replaced with KLocalizedString, produced by ki18n()/ki18nc() calls,
or just KLocalizedString() if wanted empty.
See also <a href="#i18n">the I18N section below</a>.</p>

<h4>KAccel</h4>
<p>Removed. Replaced by the new KAction/QAction framework.
See KActionCollection::associateWidget() if you need the old KAccel widget-binding behavior.</p>

<h4>KAccelAction</h4>
<ul>
<li>Removed. Replaced by the new KAction/QAction framework.</li>
<li>[Old note] KDE3 supported 3 modifier key shortcuts and 4 modifier key (3+META) shortcuts, because earlier versions of Qt3 didn't
    support a META modifier/WIN key.  This is changed, so now all shortcuts can be 4 modifier key.  All instances of
    shortcut3 and shortcut4 have been reduced just to "shortcut".</li>
<li>[Old note] The constructor, init(), and insert() functions now only take only KShortcut "default" argument instead of two</li>
<li>[Old note] Removed shortcutDefault3() and shortcutDefault4().  Use shortcutDefault() instead</li>
</ul>

<h4>KAccelBase</h4>
<p>Removed. Replaced by the new KAction/QAction framework.</p>

<h4>KApplication</h4>
<ul>
<li>Moved to kdeui. This means no change for GUI applications.
For text-based applications, you should consider switching to QCoreApplication + KComponentData.
There are two cases:
<ul>
	<li>Command-line argument parsing needed: use KCmdLineArgs as usual and then
	<pre>QCoreApplication app( KCmdLineArgs::qtArgc(), KCmdLineArgs::qtArgv() );</pre></li>
	<li>No command-line argument parsing needed: simply create a KComponentData (with &amp;aboutData or just a name),
	and then use <pre>QCoreApplication app( argc, argv );</pre>
	</li>
</ul>
<li>Of course if you don't create a KApplication, then you should turn any "kapp-&gt;" into "qApp-&gt;" in the
rest of the code.</li>
<li>KApplication does not inherit KInstance/KComponentData anymore. The KComponentData object is
available through KGlobal::mainComponent() (if KApplication is the first object to create a
KComponentData object, but everything else probably is a bug).</li>
<li>caption() was moved to KGlobal; you can now use it if you don't have a KApplication object</li>
<li>makeStdCaption() was moved to KDialog::makeStandardCaption()</li>
</ul>
<ul>
<li>isRestored() should now use qApp-&gt;isSessionRestored().  </li>
<li>keyboardMouseState() has been removed, its functionality is now provided by QApplication::keyboardModifiers() and QApplication::mouseButtons() </li>
<li>random() has been moved to the KRandom class </li>
<li>For using the kiosk restriction/authorization system you have to use the functions provided in KAuthorized.  </li>
<li>invoke* functions have been moved to ktoolinvocation. there are static methods invoke*, if you want to use slots as before connect to the invoke* slots of KToolInvocation::self() </li>
<li>startService*, kdeinitExec* have been moved to KToolInvocation </li>
<li>static void addCmdLineOptions(); has moved to KCmdLineArgs::addStdCmdLineOptions </li>
<li>getDisplay() has been removed, its functionality is now provided by QX11Info::display() </li>
<li>cut(), copy(), paste(), clear() and selectAll() were moved to KStandardAction.  Rather than creating a copy action and connecting it to kapp just use the KStandardAction::copy </li>
<li>guiEnabled() was removed, use QApplication::type() instead.  </li>
<li>ref()/deref() was moved to KGlobal (as static methods) </li>
<li>geometryArgument was removed, please use:
    <pre>
     QString geometry;
     KCmdLineArgs *args = KCmdLineArgs::parsedArgs("kde");
     if (args &amp;&amp; args-&gt;isSet("geometry"))
        geometry = args-&gt;getOption("geometry");
    </pre>
</li>
<li>installSigpipeHandler() was removed.  </li>
<li>propagateSessionManager(), requestShutDown() methods and associated ShutdownConfirm, ShutdownType and ShutdownMode enums have been moved into the kworkspace library (which is found in kdebase/workspace/lib); the methods are static functions in KWorkspace namespace. </li>
<li>The shutDown() signal has been removed, use QApplication's signal aboutToQuit() </li>
<li>enableStyles(), disableStyles(), and the constructor argument has been removed.  </li>
<li>installKDEPropertyMap has been moved into k3sqlpropertymap.h and renamed to kInstallKDEPropertyMap. It can be used to keep old c
ode that uses the Q3Data* classes working.For new code, use User in the meta object to determine which Q_PROPERTY to use for any widget.
    <pre>
      const QMetaObject *metaObject = widget-&gt;metaObject();
      for (int i = 0; i &lt; metaObject-&gt;propertyCount(); ++i) {
        const QMetaProperty metaProperty = metaObject-&gt;property(i);
        if (metaProperty.isUser()) {
          QString propertyToUse = metaProperty.name();
          break;
        }
      }
    </pre>
</li>
<li>caption() has moved to KComponentData </li>
<li>makeStdCaption(const QString&amp;, bool, bool) has moved to KDialog and changed signature to makeStdCaption(const QString&amp;, CaptionFlags) </li>
<li>addKipcEventMask() is unneeded now, and the signals like settingsChanged(), fontChanged() etc. with enums SettingsCategory have moved to KGlobalSettings::self() which is now a QObject</li>
<li>updateRemoteUserTimestamp() now takes DBUS service id instead of dbus name (i.e. something like org.kde. needs to be prepended)</li>
</ul>

<h4>KAudioPlayer</h4>
<p>Removed, use now Phonon::AudioPlayer</p>

<h4>KCatalogue</h4>
<p>Renamed to KCatalog. Method name parts with "catalogue" have been renamed to use "catalog" instead.</p>

<h4>KCharsets</h4>
<ul>
<li>KCharsets::codecForName cannot use glibc's i18n data anymore.
(Note: this feature was new in KDE 3.5 but never publicly announced.)</li>
<li>The user-visible encoding names are now mostly upper-case
(instead of being always lower-case).</li>
<li>KCharsets::languageForEncoding should be replaced
by KCharsets::descriptionForEncoding. The function KCharsets::languageForEncoding is planned to be removed before the release of KDE4.</li>
<li>The status of the encoding UTF-7 is not guaranteed to be kept, as Qt
does not support this encoding.</li>
<li><b>TODO</b>: see which member functions can be removed. The functions handling entites are planned to be moved out of the class KCharsets.</li>
</ul>

<h4>KCodecs</h4>
<ul>
<li>All methods using a QCString removed. The methods use QByteArray now. </li>
<li>Header renamed to kcodecs.h</li>
</ul>

<h4>KConfigBackend</h4>
<ul>
<li>Removed filename(), use fileName()</li>
</ul>

<h4>KSimpleConfig</h4>
<p>This class was removed. It was a very thin wrapper around KConfig and should
be replaced.</p>
<ul>
<li>If you use an absolute path, just change KSimpleConfig with KConfig - there was
no difference between uses of them for KDE3 either.</li>
<li>If you want just the local file to open replace KSimpleConfig("file") with
KConfig("file", KConfig::SimpleConfig);</li>
</ul>

<h4>KConfig</h4>
<ul>
<li>setGroup is deprecated as it creates state. Use group(QString) to receive
 a KConfigGroup object or create a KConfigGroup object yourself:
<pre>
KConfig *config = KGlobal::config();
config-&gt;setGroup("Group");
config-&gt;writeEntry("Key", 0);
</pre>
should be rewritten as
<pre>
KConfigGroup config = KGlobal::config()-&gt;group("Group");
config.writeEntry("Key", 0);
</pre>
</li>
<li>setDesktopGroup is gone. Use KDesktopFile (and its desktopGroup() method) if
you want to read .desktop files - or use group("Desktop Entry") instead</li>
<li>It's no longer necessary to specify a KConfig object is read-only - they are always
unless you use change it</li>
<li>The KConfig constructors were changed to receive flags instead of boolean values, i.e.
  <ul>
    <li><tt>KConfig("file", false /* read-write */, false /* no globals */);</tt> becomes
            <tt>KConfig("file", KConfig::NoGlobals);</tt> (note the read-write flag is gone)</li>
     <li><tt>KConfig("file", true);</tt>becomes <tt>KConfig("file");</tt></li>
  </ul>
</li>
</ul>

<h4>KConfigBase</h4>
<ul>
<li>all read*Entry methods deprecated, use <b>template &lt;typename T&gt; readEntry(key, const T&amp;)</b> in KConfigGroup instead.
This uses QVariant in the background so only types that QVariant can convert to QString work. The use of QVariant allows some ambiguous conversions, so it might be necessary to use <em>explicit</em> construction to disambiguate the type wanted, i.e.
 <ul>
     <li>bool var = readEntry(key, <b>false</b>);</li>
     <li>int var = readEntry(key, <b>int(SomeEnumValue)</b>);</li>
     <li>QColor var = readEntry(key, QColor(<b>Qt::black</b>)); // no conversion from Qt::GlobalColor to QVariant
     <li>long var = readEntry(key, <b>0</b>); // conversion from long to QVariant is ambiguous, so can't use <b>long(0)</b>.</li>
 </ul>
If you need to access top-level config entries (those without any group), use KConfigGroup with the group name <i>&lt;default&gt;</i>.
</li>
<li>readEntry(const QString&amp;, const QString&amp;) no longer has a default argument, add QString() as
second argument.
</li>
<li>all writeEntry* methods removed, mostly not noticeable, but some types don't automatically convert
to QVariant. You need to cast to a type that is directly convertible to QVariant. i.e.
<pre>
time_t timeVal;
group.writeEntry("someKey", timeVal); // ambiguous conversion
group.writeEntry("someKey", int(timeVal)); // ok
</pre>
</li>
<li>all read*ListEntry methods deprecated, renamed to KConfigGroup::readEntry. Most types use the template version.<br/>
<b>template &lt;typename T&gt; readEntry(key, const QList&lt;T&gt;&amp;)</b><br/>If you just write group.readEntry(key, list) it should work for any type that QVariant can convert to QString.
</li>
<li>writeEntry, deleteGroup, and deleteEntry do not take several boolean options (persistent,global,localized) anymore, but instead one QFlags</li>
</ul>

<h4>KConfigGroupSaver</h4>
<p>
The class KConfigGroupSaver has been removed, instead use KConfigGroup. The
difference is a KConfigGroupSaver object directly affects the config object it
is acting on, while a KConfigGroup object only ensures the entries read or
written through it are in the correct group.</p>
Instead of:
<pre>
KConfig *config = KGlobal::config();
KConfigGroupSaver saver(config, "group name");
  ...
config-&gt;readXXX("entry name");
</pre>
should be rewritten as:
<pre>
KConfigGroup cg = KGlobal::config()-&gt;group("group name");
  ...
cg.readXXX("entry name");
</pre>

<h4>KCmdLineArgs</h4>
<ul>
<li>   static void init(int _argc, char **_argv, const char *_appname, const char *_description, const char *_version, bool noKApp = false) KDE_DEPRECATED; -&gt; static void init(int _argc, char **_argv, const QByteArray &amp;appname, const QByteArray &amp;catalog, const KLocalizedString &amp;programName, const QByteArray &amp;version, const KLocalizedString &amp;description = KLocalizedString(), StdCmdLineArgs stdargs=StdCmdLineArgs(CmdLineArgQt|CmdLineArgKDE)));
<li> noKApp parameter is gone, instead:   Q_FLAGS(StdCmdLineArgs)</li>
<li> new catalog parameter can be null or empty, then appname is used as catalog name</li>
<li> KLocalizedString objects produced by ki18n()/ki18nc() calls (instead of previous I18N_NOOPs), or just KLocalizedString() if needed empty</li>
<li> static void usage(const QString &amp;error) -&gt; static void usageError(const QString &amp;error)</li>
</ul>

<h4>KCmdLineOptions</h4>
Now a proper class, instead of statically initialized struct. Use add() method for adding options (option syntax same as before); add() returns object reference, so calls can be chained to avoid repeating variable name all the way.

<h4><a name="KComponentData">KComponentData</a> (was KInstance)</h4>
<ul>
<li>value based class using shared data: In KDE4 don't work with pointers to KComponentData anymore.
Internally it is reference counted and the data deleted when the last reference goes out of scope.</li>
<li>config() returns a KSharedConfigPtr</li>
<li>sharedConfig() was removed in favour of config()</li>
<li>iconLoader() was moved to KApplication</li>
<li>newIconLoader() was moved to KApplication</li>
</ul>

<h4>kdDebug/kdWarning/kdFatal</h4>
<p>These functions have been renamed to <code>kDebug</code>,
<code>kWarning</code>, <code>kFatal</code>, resp. They now print the
function info, so printing the function name by hand, or using
<code>k_funcinfo</code> is now deprecated. An <code>endl</code> is
performed implicitly. The type of stream used is now
<code>QDebug</code>.</p>

<p>Instead of repeating the debug area all over the place, define
<code>KDE_DEFAULT_DEBUG_AREA</code> instead:</p>
<pre>
- kdDebug( 1234 ) << k_funcinfo << "entered" << endl;
+ kDebug() << "entered";
</pre>
<p>And, in your <code>CMakeLists.txt</code>:</p>
<pre>
+ add_definitions( -DKDE_DEFAULT_DEBUG_AREA=1234 )
</pre>

<h4>KDesktopFile</h4>
<ul>
<li>QString filename() const -&gt; QString fileName() const</li>
<li>more standards compliant. See
<a href="http://www.freedesktop.org/Standards/desktop-entry-spec/latest">
Desktop Entry Spec</a>
 <ul>
  <li>.kdelnk files are no longer supported, rename to .desktop.</li>
  <li>deprecated header [KDE Desktop Entry], change to [Desktop Entry], using desktopGroup()</li>
  <li>type FSDev is no longer supported, change to FSDevice</li>
 </ul>
</li>
<li>Same as in KConfig: the use of readEntry() or writeEntry() on a KDesktopFile should
be replaced by readEntry/writeEntry on a KConfigGroup. By default the desktopGroup() of
the KDesktopFile was used, otherwise use group("another_group").</li>
</ul>

<h4>KExtendedSocket</h4>
<p>This class has been removed. See below on KNetwork::K*Socket.</p>

<h4>KFilterDev</h4>
<ul>
<li>device() -&gt; createDevice() to indicate that you must delete the device afterwards.</li>
</ul>

<h4>KGlobal</h4>
<ul>
<li>&quot;int kasciistricmp( const char *str1, const char *str2 )&quot; has been moved into kascii.h</li>
<li>&quot;KIconLoader* iconLoader()&quot; has been moved to KIconLoader::global()</li>
<li>instance() renamed to mainComponent()</li>
<li>activeInstance() renamed to activeComponent()</li>
<li>setActiveInstance() renamed to setActiveComponent()</li>
<li>static members _locale, _instance and so on are private now, if you want to get or set the
KLocale use locale()/setLocale()/hasLocale() and if you want to know whether a mainComponent is set use
hasMainComponent()</li>
<li>config() returns a KSharedConfig::Ptr now instead of KConfig*</li>
<li>sharedConfig() has been removed in favour of config()</li>
</ul>

<h4>KIcon</h4>
<p>Deprecated and renamed to K3Icon; replacement is KIcon in kdeui.</p>
<p><b>Note:</b> at the moment you have to keep using K3Icon as a namespace for states, groups, and contexts though.</p>

<h4>KInstance</h4>
<p>Renamed to <a href="#kcomponentdata">KComponentData</a></p>

<h4>KIPC</h4>
<p>Removed. Use KGlobalSettings::self()-&gt;emitChange() instead of KIPC::sendMessageAll().</p>

<h4>KKey</h4>
<p>Removed. Use plain ints as the Qt key code instead.</p>
<ul>
<li>When replacing KKey(QKeyEvent*), you need to OR the event-&gt;key() and event-&gt;modifiers() to get the replacement.</li>
<li>The QtWIN enum has been removed.  Use Qt::META or Qt::MetaModifier instead.</li>
<li>modFlagLabel() was removed, use either KKeyServer::modToStringUser(), or QKeySequence(Qt::yourmodifier).toString()</li>
</ul>


<h4>KKeyNative</h4>
<p>Removed. Use plain ints as the Qt key code instead.</p>

<h4>KKeySequence</h4>
<p>Removed. Use QKeySequence instead.
Note that QKeySequence expects multiple shortcuts to be separated by ", " (i.e. a comma then a space) in converting from text.</p>

<h4>KLibLoader</h4>
<ul>
<li>use KPluginLoader or KService::createInstance instead whenever possible</li>
<li>The resolve(const char* name) and symbol(const char* name) methods were merged and renamed to resolveSymbol</li>
<li>bool hasSymbol was removed, use resolveFunction instead</li>
<li>resolveFunction( const char* name ) was added which returns not a void* but a KLibrary::void_function_ptr which can be used as a void* would in boolean tests and for making subsequent function calls.</li>
</ul>

<h4>KLibFactory</h4>
<ul>
<li>renamed to KPluginFactory</li>
<li>create methods take a QVariantList instead of QStringList</li>
</ul>

<h4>KGenericFactory</h4>
<ul>
<li>use K_PLUGIN_FACTORY macro instead: this will require to change your plugin constructor from QStringList to QVariantList</li>
<li>instead of K_EXPORT_COMPONENT_FACTORY use K_EXPORT_PLUGIN (defined with KPluginLoader) which adds Qt and kdelibs version information that KPluginLoader uses to check the validity of the plugin.</li>
</ul>

<h4>KLocale</h4>
<ul>
<li> QString formatNumber(const QString &amp;numStr) const -&gt;   QString formatNumber(const QString &amp;numStr, bool round=true, int precision=2) const;</li>
<li> bool weekStartsMonday() const -&gt; int weekStartDay() const</li>
<li> QString monthName(int i, bool shortName = false) const -&gt; QString KCalendarSystem::monthName (int month, int year, bool shortName = false) const = 0; or QString KCalendarSystem::monthName (const QDate &amp; date, bool shortName = false ) const = 0;</li>
<li> QString weekDayName(int i, bool shortName = false) const -&gt; calendar()-&gt;weekDayName</li>
<li> QString monthNamePossessive(int i, bool shortName = false) const -&gt; calendar()-&gt;monthNamePossessive()</li>
<li> void setWeekStartsMonday(bool start) -&gt; setWeekStartDay</li>
<li> QString formatDate(const QDate&amp;, bool shortFormat = false) const -&gt; QString formatDate(const QDate&amp;, DateFormat = LongDate) const</li>
<li> QString formatDateTime(const QDateTime&amp;, bool shortFormat = true, bool includeSecs = false) const -&gt; QString formatDateTime(const QDateTime&amp;, DateFormat = ShortDate, bool includeSecs = false) const</li>
<li> languages() -&gt; languageList()</li>
<li> formatMoney(const QString &amp;numStr) -&gt;   QString formatMoney(double num, const QString &amp; currency = QString::null, int digits = -1) const;</li>
<li> charset() -&gt; gone</li>
<li> setCharset() -&gt; gone</li>
<li>removeCatalogue was renamed to removeCatalog</li>
<li>QStringList languagesTwoAlpha() -&gt; QStringList languageList()</li>
<li>QStringList allLanguagesTwoAlpha() -&gt; QStringList allLanguagesList()</li>
<li>QStringList allCountriesTwoAlpha() -&gt; QStringList allCountriesList()</li>
<li>QString twoAlphaToLanguageName(const QString &amp;language) -&gt; QString languageCodeToName(const QString &amp;language)</li>
<li>QString twoAlphaToCountryName(const QString &amp;country) -&gt; QString countryCodeToName(const QString &amp;country)</li>
</ul>
<p>See also <a href="#i18n">the I18N section below</a>.</p>

<h4>KMacroExpander</h4>
<ul>
<li>KMacroExpander now takes a QHash and not a QMap</li>
</ul>

<h4>KMimeSourceFactory</h4>
<p>KMimeSourceFactory was automatically instanciated by KApplication which allowed the use of "icon:name" in Qt richtext.
Q3MimeSourceFactory being in Qt3Support, and this feature being very rarely used, K3MimeSourceFactory isn't instanciated
automatically anymore, you need to call K3MimeSourceFactory::install() in your main if you still depend on this feature.</p>

<h4>KMultipleDrag</h4>
<p>KMultipleDrag is obsolete, use QMimeData directly to provide contents in different mime formats.</p>
<p>To make porting more incremental, K3MultipleDrag is provided for code that needs to work with
Q3DragObject until being fully ported.</p>

<h4>KNetwork::KIpAddress</h4>
<p>Removed. Use QHostAddress instead.</p>

<h4>KNetwork::KResolver</h4>
<p>Removed. If you need to resolve a hostname, use QHostInfo from QtNetwork.</p>

<h4>KNetwork::KSocketAddress and KNetwork::KInetSocketAddress</h4>
<p>Removed. Use QHostAddress and an integer (a quint16_t) to store the port number.</p>

<h4>KNetwork::KUnixSocketAddress</h4>
<p>Removed. Simply use a QString to represent the path or identifier. See the documentation on KLocalSocket.</p>

<h4>KNetwork::K*Socket</h4>
<ul>
<li>All of these classes are deprecated. Use the QTcpSocket,
  QUdpSocket and QTcpServer equivalents from QtNetwork.</li>
<li>When porting, use KSocketFactory when creating any sockets that
  are used to communicate with remote hosts (that is, anything that is
  not "localhost"). Examples follow:<br>

<b>Connecting to a remote host:</b>
<p><em>Old code:</em></p>
<pre>
  QString host;
  int port;

  KBufferedSocket *socket = new KBufferedSocket(parent);
  if (!socket-&gt;connect(host, QString::number(port))) {
      // error happened
      // deal with it
  }
  connect(socket, SIGNAL(connected(KResolverEntry)), SLOT(socketConnected()));
  connect(socket, SIGNAL(gotError(int)), SLOT(socketError(int)));
</pre>

<p>New code:</p>
<pre>
  QString protocol;
  QString host;
  int port;
  QUrl url(QString("%1://%2:%3").arg(prototocol, host).arg(port));

  QTcpSocket *socket = KSocketFactory::connectToHost(protocol, host, port, parent);
  // alternatively:
  // QTcpSocket *socket = KSocketFactory::connectToHost(url, parent);
  connect(socket, SIGNAL(connected()), SLOT(socketConnected()));
  connect(socket, SIGNAL(error(QAbstractSocket::SocketError), SLOT(QAbstractSocket::SocketError)));
</pre>

<b>Opening a socket for receiving remote connections:</b>
<p><em>Old code:</em></p>
<pre>
  int port;

  KServerSocket *ss = new KServerSocket(QString::number(port), parent);
  connect(ss, SIGNAL(readyAccept()), this, SLOT(slotReadyAccept()));
  connect(ss, SIGNAL(gotError(int)), this, SLOT(slotSocketError(int)));
  ss-&gt;listen();
</pre>

<p>New code:</p>
<pre>
  QString protocol;
  int port;

  QTcpServer *ts = KSocketFactory::listen(protocol, QHostAddress::Any, port, parent);
  connect(ts, SIGNAL(newConnection()), this, SLOT(slotReadyAccept()));
</pre>
</li>
<li><b>Caveat:</b> all member functions in QTcpSocket
  are <em>asynchronous</em> and buffered. There's no equivalent
  "blocking" mode for QTcpSocket. If you need an action to complete,
  you have to use <tt>waitForReadyRead</tt> and <tt>flush</tt>
  (or <tt>waitForBytesWritten</tt>) in the socket object. If you need
  to wait for a connection to be established,
  use <tt>KSocketFactory::synchronousConnectToHost</tt>.</li>
</ul>

<h4>KNotifyClient</h4>
<p>Replaced by KNotification. The API is quite similar, but the config file need to be updated. See KNotification documentation, and the file kdelibs/knotify/PORTING.html</p>

<h4>KProcess</h4>
<p>The kde3 version was deprecated and renamed to K3Process, header is k3process.h. 
Its usage is discouraged as it will create problems when being used together with
the new KProcess or QProcess in the same application, this is more of a problem in
applications that use KParts or plugins and can't control what those plugins do.</p>
<ul>
<li>start() lost all arguments, the setup of communication and program/arguments
has to be done before starting the process</li>
<li>suspend() and resume() where removed for now</li>
<li>quoting support moved to KShell namespace</li>
<li>getPid() was renamed to just pid()</li>
<li>clearArguments() was renamed to clearProgram()</li>
</ul>

<h4>KProcCtrl</h4>
<p>Deprecated and renamed to K3ProcessController, header is k3processcontroller.h.</p>

<h4>KProcIO</h4>
<p>Deprecated and renamed to K3ProcIO, header is k3procio.h.</p>

<h4>KRegExp</h4>
<p>Removed. Use QRegExp instead.</p>

<h4>KRFCDate</h4>
This class has been deprecated by KDateTime. It has been renamed K3RFCDate and moved to the libkde3support. The following method changes make porting easy:
<ul>
<li>KRFCDate::parseDate( string ) becomes KDateTime::fromString( string, KDateTime::RFCDate).toTime_t();</li>
<li>KRFCDate::parseDateISO8601( string ) becomes KDateTime::fromString( string ).toTime_t();</li>
<li>KRFCDate::localUTCOffset() becomes KDateTime::Spec::LocalZone().utcOffset / 60. Note that the KRFCDate version returned minutes while KDateTime returns seconds.</li>
</ul>

<h4>KSaveFile</h4>
<ul>
<li>KSaveFile has been modified from its KDE 3.x behavior to allow for new backup methods:
<ul>
<li>KSaveFile::backupFile() will use the backup behavior specified in KConfig.</li>
<li>KSaveFile::simpleBackupFile() will emulate the KDE 3.x behavior</li>
<li>KSaveFile::numberedBackupFile() will create a numbered set of backup files (default: 10)</li>
<li>KSaveFile::rcsBackupFile() will use rcs to maintain the backup file</li>
</ul></li>
<li>KSaveFile now derives from QFile so you can use it just like you would use a normal QFile. The close() function has been renamed to finalize(). Use the error() and errorString() functions to check for errors instead of status().</li>
<li>KSaveFile::close() is now KSaveFile::finalize()</li>
<li>You must call KSaveFile::open() to create the file.</li>
</ul>

<h4>KShortcutDialog</h4>
<p>Removed, see KKeySequenceWidget/KShortcutWidget.</p>

<h4>KShortcutList and derivatives</h4>
<p>Removed - no longer needed. Saving and loading of shortcuts is now performed in KActionCollection, KGlobalAccel, and KStandardShortcut.</p>

<h4>KSortableValueList</h4>
<ul>
<li>Has been ported to QList, renamed to KSortableList and the header is ksortablelist.h</li>
</ul>

<h4>KStandardDirs</h4>
<ul>
<li>boolean values as parameters for recursive, unique and checking for executability in the following methods were changed to instead take SearchOptions flags for improved code readability:
<ul>
<li>calcResourceHash</li>
<li>findAllResources</li>
<li>findResource</li>
<li>findExe</li>
<li>findAllExe</li>
</ul>
</li>
</ul>

<h4><a name="KStandardShortcut">KStandardShortcut</a> (was KStdAccel)</h4>
<ul>
<li>Removed deprecated methods</li>
<li>Removed WhatThis, use WhatsThis</li>
<li>shortcutDefault3() and shortcutDefault4() have been removed, use shortcutDefault() instead</li>
</ul>

<h4>KStaticDeleter</h4>
<p>Either use K3StaticDeleter or port to the <a href="http://api.kde.org/4.0-api/kdelibs-apidocs/kdecore/html/group__KDEMacros.html#g75ca0c60b03dc5e4f9427263bf4043c7">K_GLOBAL_STATIC</a> macro.

<h4>KStdAccel</h4>
<p>Renamed to <a href="#KStandardShortcut">KStandardShortcut</a></p>

<h4>KStringHandler</h4>
<ul>
<li>static QString ljust( const QString &amp;text , int width ) -&gt; QString::leftJustified</li>
<li>static QString rjust( const QString &amp;text , int width ) -&gt; QString::rightJustified</li>
<li>matchFilename -&gt; matchFileName</li>
<li>static QString word( const QString &amp;text , int pos ) -&gt; QString::section </li>
<li>::randomString() has been moved to KRandom::randomString()</li>
<li>::lPixelSqueeze( text, fm, width ) -&gt; fm.elidedText( text, Qt::ElideLeft, width )</li>
<li>::cPixelSqueeze( text, fm, width ) -&gt; fm.elidedText( text, Qt::ElideMiddle, width )</li>
<li>::rPixelSqueeze( text, fm, width ) -&gt; fm.elidedText( text, Qt::ElideRight, width )</li>
</ul>

<h4>KTempDir</h4>
<ul>
<li>existing() was removed, use exists() instead</li>
<li>setAutoDelete() renamed to setAutoRemove()</li>
<li>The default for setAutoRemove() is now true instead of false</li>
<li>qDir() was removed as it was unused</li>
</ul>

<h4>KTempFile</h4>
<p>Deprecated and renamed to K3TempFile. Use KTemporaryFile instead.</p>
<p>When porting old KTempFile calls to KTemporaryFile, you need to remember that KTempFile by default will not automatically remove the fileonce the object is destroyed, but KTemporaryFile will! You also need to call open() in order to actually create the file.</p>

<h4>KURL</h4>
<ul>
<li>Renamed to KUrl, but a typedef is available for source compatibility</li>
<li>KUrl inherits QUrl now, but the API offered by KUrl is mostly unchanged</li>
<li>filename() has been removed, use fileName() instead</li>
<li>isMalformed -&gt; !isValid()</li>
<li>prettyURL(0,KUrl::StripFileProtocol) -&gt; pathOrURL()</li>
<li>fromPathOrURL() is deprecated, use the KUrl(str) constructor which now accepts both paths and urls</li>
<li>htmlURL() had to be removed, please use Qt::escape(url.prettyUrl()) now, with #include &lt;QTextDocument&gt;.
This requires libQtGui, which is why it can't be in KUrl anymore.</li>
<li>url(0,106) or any other use of the 'mib enum' for encoding has been removed. QUrl is UTF8 based, and the world is becoming more and more utf8 based as well, the old encoding hacks inside urls should disappear.</li>
<li>Runtime behavior change: port() used to return 0 if no port was specified. It now returns -1 in that case, or you can use port(defaultPort) to set what it should return if no port was specified.</li>
<li>adjustPath(), path(), encodedPathAndQuery() , url() , prettyUrl() was taking a int argument for handling trailing slash that has been replaced by an enum AdjustPathOption (0 =&gt; KUrl::LeaveTrailingSlash, 1 =&gt; KUrl::AddTrailingSlash, -1 =&gt; KUrl::RemoveTrailingSlash).
<li>cleanPath(), queryItems(), fileName(), directory(), equals() now take a QFlags argument instead of boolean</li>
<li>*URL* renamed to *Url*:
<ul>
  <li>hasSubURL() -&gt; hasSubUrl()</li>
  <li>prettyURL() -&gt; prettyUrl()</li>
  <li>pathOrURL() -&gt; pathOrUrl()</li>
  <li>upURL() -&gt; upUrl()</li>
  <li>isRelativeURL() -&gt; isRelativeUrl()</li>
  <li>relativeURL() -&gt; relativeUrl()</li>
</ul>
</li>
</ul>

<h4>KURLDrag</h4>
<p>This class has been moved to kde3support. Use KUrl::populateMimeData() and
KUrl::List::populateMimeData() in the drag/copy side,
and the static methods KUrl::List::canDecode() and KUrl::List::fromMimeData()
in the drop/paste side.</p>
<ul>
<li>Example: Replace <pre>  KURL::List uriList;
  if ( KURLDrag::canDecode(e) &amp;&amp; KURLDrag::decode( e, uriList ) ) {</pre>
by <pre>  KUrl::List uriList = KUrl::List::fromMimeData( e-&gt;mimeData() );
  if ( !uriList.isEmpty() ) {</pre></li>
</ul>

<h4>KVMAllocator</h4>
<p>Removed, as it was unused.</p>

<h4>KWin</h4>
This class has been merged with KWinModule into class KWindowSystem (in kdeui).
<ul>
<li>appStarted() removed, use KStartupInfo::appStarted() instead</li>
<li>info(WId win) removed, use windowInfo() instead</li>
<li>struct Info was removed, use WindowInfo instead</li>
</ul>

<h4>KWinModule</h4>
This class has been merged with KWinModule into class KWindowSystem (in kdeui).
Don't create instances, use static functions and KWindowSystem::self() for connecting to signals.
<ul>
<li>Functions related to systemtray have been removed. They worked only with the obsolete
KDE systray mechanism.</li>
<li>stackingOrder() no longer returns a reference to a list. Make a copy of the value first if using iterators.</li>
</ul>

<h4>KWin::WindowInfo</h4>
This class has been renamed KWindowInfo and moved to its own header: KWindowInfo or kwindowinfo.h. This class is not to be confused with KWindowInfo in KDE3 which was a small utility class to display message in the window icon and title. KWindowInfo represents the windowing system information for a give window, such as its geometry, desktop positioning, type, name, etc.

<h4>locate</h4>
<ul>
<li>locate() and locateLocal()  moved into the namespace KStandardDirs</li>
</ul>

<h4>NETRootInfo</h4>
<ul>
<li>NETRootInfo(Display *display, Window supportWindow, const char *wmName,unsigned long properties, int screen = -1, bool doActivate = true) -&gt;
    NETRootInfo(Display *display, Window supportWindow, const char *wmName,
                const unsigned long properties[], int properties_size,
                int screen = -1, bool doActivate = true);     old properties is the first element of the new array
</li>
<li>unsigned long supported() -&gt;   const unsigned long* supportedProperties() const;</li>
<li>    unsigned long properties() const -&gt; gone</li>
<li> WindowType windowType() -&gt;     WindowType windowType( unsigned long supported_types ) const;</li>
</ul>

<h4 align="right"><a href="#TOC">Return to the Table of Contents</a></h4>

<h3><a name="kdeui">Changes in kdeui</a></h3>
<ul>
<li>kactionclasses.h went away, use the several kxxxaction.h instead</li>
<li>kanimwidget.h was renamed to kanimatedbutton.h to reflect the class name</li>
<li>kcolordlg.h went away, use kcolordialog.h</li>
<li>kcolorbtn.h went away, use kcolorbutton.h</li>
<li>kdatapik.h went away, use kdatepicker.h</li>
<li>kdualcolorbtn.h went away, use kdualcolorbutton.h</li>
<li>KLanguageButton (and therefore klanguagebutton.h) was removed due to licensing issues (GPLv2, which is not allowed in kdelibs)</li>
<li>klistbox.h was renamed to klistwidget.h to reflect the class name</li>
<li>kpassdlg.h went away, use kpassworddialog.h</li>
<li>kxmlgui.h went away, use kxmlguifactory.h</li>
<li>kfontcombo.h went away, use QFontComboBox</li>
<li>libkwalletclient (which used to provide the KWallet class) has been merged with kdeui</li>
<li>system color scheme accessors in kglobalsettings.h are deprecated, use kcolorscheme.h</li>
<li>KPalette was renamed to KColorCollection</li>
<li>KPaletteTable was renamed to KColorTable and moved to private API</li>
</ul>

<h4>KAboutContainer</h4>
<p>Deprecated and renamed to K3AboutContainer. Use KAboutApplicationDialog or KAboutKdeDialog directly.</p>
<ul>
<li>KAboutContainer constructor int args have been replaced by Qt::Alignment</li>
<li>addTitle int args replaced by Qt::Alignment</li>
<li>addImage int args replaced by Qt::Alignment</li>
</ul>

<h4>KAboutContributor</h4>
<p>Deprecated and renamed to K3AboutContributor. Use KAboutApplicationDialog or KAboutKdeDialog directly.</p>
<ul>
<li>void setURL( const QString&amp; ) -&gt; void setUrl( const QString&amp; )</li>
<li>QString getName( void ) const -&gt; QString name() const</li>
<li>QString getEmail( void ) const -&gt; QString email() const</li>
<li>QString getURL( void ) const -&gt; QString url() const</li>
<li>QString getWork( void ) const -&gt; QString work() const</li>
<li>signal void openURL() -&gt; void openUrl()</li>
</ul>

<h4>KAboutDialog</h4>
<p>Deprecated and renamed to K3AboutDialog. Use KAboutApplicationDialog or KAboutKdeDialog directly.</p>
<ul>
<li>changed enum names<br>
<pre>
  AbtPlain         -&gt; Plain
  AbtTabbed        -&gt; Tabbed
  AbtTitle         -&gt; Title
  AbtImageLeft     -&gt; ImageLeft
  AbtImageRight    -&gt; ImageRight
  AbtImageOnly     -&gt; ImageOnly
  AbtProduct       -&gt; Product
  AbtKDEStandard   -&gt; KDEStandard
  AbtAppStandard   -&gt; AppStandard
  AbtImageAndTitle -&gt; ImageAndTitle
</pre>
</li>
<li>Constructor: K3AboutDialog( QWidget *parent = 0, bool modal = true ) -&gt; KAboutDialog( QWidget *parent = 0 )</li>
<li>Constructor: K3AboutDialog( int dialogLayout, const QString &amp;caption, ButtonCodes buttonMask,
                               ButtonCode defaultButton, QWidget *parent=0, bool modal=false, bool separator = false,
                               const QString &amp;user1 = QString(),
                               const QString &amp;user2 = QString(),
                               const QString &amp;user3 = QString() ) -&gt;
                 K3AboutDialog( int dialogLayout, const QString &amp;caption, QWidget *parent = 0 ) (see KDialog how to port)</li>
<li>void setIcon( const QString &amp;fileName ) which was deprecated has been removed</li>
<li>addContainerPage int args are now Qt::Alignment args</li>
<li>addScrolledContainerPage int args are now Qt::Alignment args</li>
<li>addContainer int args are now Qt::Alignment args</li>
<li>signal void openURL() -&gt; void openUrl()</li>
<li>void imageURL() -&gt; void imageUrl()</li>
<li>void openURLSlot() -&gt; void openUrlSlot()</li>
</ul>

<h4>KAboutWidget</h4>
<p>Deprecated and renamed to K3AboutWidget. Use KAboutApplicationDialog or KAboutKdeDialog directly.</p>
<ul>
<li>signal void openURL() -&gt; void openUrl()</li>
<li>void openURLSlot() -&gt; void openUrlSlot()</li>
</ul>

<h4><a name="KAction">KAction</a></h4>
<p>Making KAction a subclass of QAction (actually QWidgetAction) brings KDE more into line with the Qt way of creating user interfaces, improves accessibility, and removes code duplication.</p>
<p>QAction in Qt4 is a true first-class citizen - all QWidgets now have a list of associated actions, and QToolBar, QMenu etc. all use this list directly to show the graphical items (widgets, entries in the menu, etc).  This has replaced all usage of integers as "id"s.  There is also a new QEvent (QActionEvent), and the corresponding virtual protected function in QWidget, actionEvent().</p>
<ul>
<li>KAction is now a subclass of QWidgetAction.</li>
<li>For actions that are mostly in menus, you should port setToolTip to setStatusTip. The goal in kde3 was mostly to see the help text in the status bar, while in Qt4 setToolTip has no effect on menu items.<li>
<li>Don't use setIconSet() anymore, use setIcon(KIcon(iconName)) instead</li>
<li>activated(), activated(int) signals deprecated - use triggered() signal instead</li>
<li>activate() is now trigger(), as in QAction</li>
<li>there is a replacement for activation providing keyboard + mouse states, see triggered(Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers) [currently buggy]</li>
<li>plugAccel(), unplugAccel(), kaccelCount() removed - they have no use now (accelerator management is inside Qt)</li>
<li>itemId(), getToolButtonID() removed - actions no longer have ids, basically the QAction* is its replacement</li>
<li>setGroup() / group() removed - use QActionGroup instead (setActionGroup() / actionGroup())</li>
<li>ActivationReason has been removed (not supported by Qt). For a surrogate, you can connect to QMenu::triggered(QAction*), QToolBar::actionTriggered(QAction*), etc.</li>
<li>setters are no longer slots; where they were used as such, an intermediary will be required</li>
<li>New feature from Qt: statusTip() / setStatusTip().  Usually this will be the same as the tooltip.  It appears in the status bar whenever the action is hovered in a QMenu.  A porting convenience is being investigated for automatic toolTip() -&gt; statusTip(), but the best solution is to set both.</li>
<li>New feature: globalShortcut() and globalShortcutAllowed().  Automatically communicates with KGlobalAccel to register a global shortcut (i.e. one that does not need the application to have focus to be activated).</li>
<li>setShortcut() now defaults to setting the default shortcut as well (as it was by far the most common use case).  To just set the custom shortcut, use setShortcut(myShortcut, KAction::CustomShortcut)</li>
<li>Renamed "Custom" shortcuts to "Active" shortcuts.</li>
<li>Added setShortcut(QKeySequence &amp;) to explicitly override QAction::setShortcut.</li>
<li>Functions in KActionCollection or KXMLGUIFactory for example don't take or return KAction pointers
anymore but instead operate on QAction pointers. If you get compilation errors with code like the
following then just replace KAction with QAction:
<pre>
QAction *a = actionCollection()-&gt;action("foo");
...
</pre>
Also if you get errors about KAction being an unknown type it is often enough to forward declare
KAction in your header file.
<li>plug() -&gt; QWidget::addAction()
<li>unplug() -&gt; QWidget::removeAction()
<li>isPlugged() -&gt; !action-&gt;associatedWidgets().isEmpty()
<li>containerCount() -&gt; action-&gt;associatedWidgets().count()
<li>container(int i) -&gt; action-&gt;associatedWidgets().value(i)
<li>hasIcon() -&gt; !action-&gt;icon().isNull()
<li>setIconName(string) -&gt; setIcon(KIcon(string))
<li>unplugAll() -&gt; Rarely needed, but if you are sure that you need it replace it with the following
code:
<pre>
foreach (QWidget *w, action-&gt;associatedWidgets())
    w-&gt;removeAction(action);
</pre>
<li>The KAction constructors changed completely. The constructors taking various action properties,
a pointer to an acion collection and the name of the action have been removed. The new pattern is to
create the actions like regular QObjects with a parent (owner). Then you set various properties using
setText, setIcon, etc. . As a last step the action can be added to the action collection with a name.
<pre>
KAction *a = new KAction(this);
a-&gt;setText(i18n("I am ported"));
a-&gt;setIcon(KIcon("shiny"));
a-&gt;setShortcut(Qt::ControlModifier + Qt::Key_A);
actionCollection - &gt; addAction("name_of_the_action", a);
</pre>
KActionCollection additional provides convenience overloads for creating named KAction objects or
standard actions (KStandardAction). For example:
<pre>
QAction *a = actionCollection -&gt; addAction("action_name");
a-&gt;setText(i18n("I have been ported, too"));
connect(a, SIGNAL(triggered()), this, SLOT(portedToKde4()));

actionCollection -&gt; addAction(KStandardAction::Copy, this, SLOT(copy()))
</pre>
</ul>

<h4>KActionCollection</h4>
<ul>
<li>constructor (QWidget* watch, ..) and setWidget() replaced by associateWidget() - allows actions to respond to matching key presses on a widget level (basically a convenience method to have all actions in the collection added to the associated widget(s) and their shortcut scopes set to Qt::WidgetShortcut). (note: associateWidget() replaces {set|add|remove}AssociatedWidget() from kde4 beta)</li>
<li>*AutoConnectShortcuts removed - irrelevant</li>
<li>*accel() removed - irrelevant (KAccel no longer handles key presses)</li>
<li>New functions setConfigGroup(), setConfigGlobal(), configGroup(), configIsGlobal() - the action collection now stores the group whether the config is global. referenced in readSettings() / writeSettings()</li>
<li>readShortcutSettings() and writeShortcutSettings() renamed without the "Shortcut".  Set the configGroup() with setConfigGroup() either prior to each call, or (preferably) at the creation time of the action collection.</li>
<li>{set}HighlightingEnabled(), {connect|disconnect}Highlight() removed - highlighting is always enabled now</li>
<li>actionHighlighted(), actionStatusText(), clearStatusText() removed - use QAction::setStatusTip() as a replacement.  QStatusBars belonging to QMainWindow automatically get the statusTip() applied to them when they are moused over in a QMenu, via a QStatusTipEvent.</li>
<li>groups() removed (now using QActionGroups) - see actionGroups() (and actionsWithoutGroup()) for replacement</li>
<li>actions( const QString&amp; group ) removed - use actionGroups() instead, and then QActionGroup::actions()</li>
<li>action(const char* name, const char* className) removed: action(const QString&amp; name), actions(const QString&amp; name), actionOfType&lt;Class&gt;(const QString&amp; name), actionsOfType&lt;Class&gt;(const QString&amp; name) are the replacements</li>
<li>insert(KAction *) -&gt; addAction(const QString &amp;name, QAction *action)
<li>remove(KAction *) -&gt; removeAction(QAction *action)
<li>take(KAction *) -&gt; takeAction(QAction *action)
</ul>

<h4>KActionSelector</h4>
<ul>
<li>Q3ListBox -&gt; QListWidget</li>
<li>selectedListBox  -&gt;  selectedListWidget</li>
<li>availableListBox  -&gt;  availableListWidget</li>
</ul>

<h4>KActionSeparator</h4>
<p>Used to be renamed to KSeparatorAction. KSeparatorAction/KActionSeparator is dead now. Just create a QAction object and call setSeparator(true); on it.</p>
<p><b>Note:</b> you need to create multiple separator actions if you want to insert multiple separators into a widget, unlike with KDE3.</p>

<h4>KActiveLabel</h4>
<p>Deprecated and renamed to K3ActiveLabel. Use QLabel instead.</p>
<ul>
<li>Use QLabel::setOpenExternalLinks(true) for labels with hyperlinks.</li>
<li>Use QLabel::setTextInteractionFlags(Qt::TextSelectableByMouse|Qt::TextSelectableByKeyboard) for labels whose text should be selectable by user.</li>
<li>Inherits from KTextBrowser instead of Q3TextBrowser</li>
<li>You don't need anymore to disconnect the linkClicked signal to handle manually link,  use KTextBrowser::setNotifyClick(true)</li>
<li>linkClicked -&gt; KTextBrowser::urlClick</li>
</ul>

<h4><a name="KAnimatedButton">KAnimatedButton</a> (was KAnimWidget)</h4>
<ul>
<li>Now a subclass of QToolButton, acts in a much more standard fashion</li>
<li>size(), setSize() replaced by iconSize(), setIconSize()</li>
<li>Call updateIcons() whenever you change the iconSize() (the setter is non-virtual :( )</li>
</ul>

<h4>KAnimWidget</h4>
<p>Renamed to <a href="#KAnimatedButton">KAnimatedButton</a></p>

<h4>KAuthIcon</h4>
<p>Removed since it was not used.</p>

<h4>KBugReport</h4>
<ul>
<li>void updateURL() -&gt; void updateUrl()</li>
</ul>

<h4>KButtonBox</h4>
<p>Deprecated and renamed to K3ButtonBox. Use KDialogButtonBox instead. Add the role parameter to the addButton function. Or check if it can't be achieved using KDialog.</p>

<h4>KCharSelectTable</h4>
<p>Removed from public API. Use KCharSelect.</p>

<h4>KCharSelect</h4>
<ul>
<li>Cleaned up constructor, removed char, font and table arguments. The concept of showing tables isn't used any more and all functions/signals are removed. There is no need for a replacement.</li>
<li>highlighted()/focusItemChanged()/activated()  -&gt;  currentCharChanged(QChar)</li>
<li>doubleClicked()  -&gt;  charSelected(QChar)</li>
<li>setFont()/font()  -&gt;  setCurrentFont()/currentFont()</li>
<li>fontChanged()  -&gt;  currentFontChanged()</li>
<li>QFont is used for fonts instead of a QString containg the font face.</li>
<li>setChar()/chr()  -&gt;  setCurrentChar()/currentChar()</li>
<li>enableFontCombo(), enableTableSpinBox(), isFontComboEnabled() and isTableSpinBoxEnabled() are removed.</li>

</ul>

<h4>KColorCells</h4>
<ul>
<li>KColorCells now inherits from QTableWidget instead of Q3GridView.</li>
<li>numCells() has been replaced by count().</li>
<li>getSelected() has been replaced by selectedIndex().</li>
<li>The parameters of the colorSelected() and colorDoubleClicked() signals now include both the index of the color which
was selected and the color itself as arguments</li>
</ul>

<h4><a name="KColorCollection">KColorCollection</a> (was KPalette)</h4>
<ul>
<li>nrColors() was renamed to count()</li>
<li>colorName() was renamed to name()</li>
<li>getPaletteList() was renamed to installedCollections()</li>
<li>color(int), name(int) and name(const QColor&amp;) have been made const</li>
</ul>

<h4>KColorDrag</h4>
<p>Deprecated and renamed to K3ColorDrag. Use QMimeData directly instead or KColorMimeData, which most closely resembles KColorDrag</p>

<h4>KColorScheme</h4>
<p>New class that provides access to system-wide, user configurable color roles.
Like QPalette, the return type is now QBrush instead of QColor.
As of 4.0 the brushes are solid colors, but this may change in the future.</p>

<p><b>Warning:</b> KDE4 is trying <i>really</i> hard to abandon the notion that
the active palette == the inactive palette (because this is really helpful for
the oxygen windeco which does not use "traditional" windeco colors, and because
for various reasons kwin can't be entirely responsible for the effect). When
porting to KDE4, you will need to take this into consideration. The new class
KStatefulBrush has been added to help with this, as well as the adjustForeground
and adjustBackground methods of KColorScheme.</p>

<p>There are lots of bugs as a result of this; some in applications, and at
least a few in Qt. Please report application bugs to the appropriate maintainer
or list, and general (i.e. occurring in many/all applications) bugs to
<a href="mailto:kde-core-devel@kde.org">k-c-d</a>.</p>

<p>See the <a href="http://api.kde.org/4.0-api/kdelibs-apidocs/kdeui/html/classKColorScheme.html">KColorScheme documentation</a> for further information.</p>

<h4><a name="KColorTable">KColorTable</a> (was KPaletteTable)</h4>
<ul>
<li>palette() was renamed to name()</li>
<li>slot setPalette() was renamed to slot setColors()</li>
</ul>

<h4>KComboBox</h4>
<ul>
<li>void setURLDropsEnabled() -&gt; void setUrlDropsEnabled()</li>
<li>bool isURLDropsEnabled() -&gt; bool urlDropsEnabled()</li>
<li>void setEditURL() -&gt; void setEditUrl()</li>
<li>void addURL( ... ) -&gt; void addUrl( ... )</li>
<li>void insertURL( ... ) -&gt; void insertUrl( ... )</li>
<li>void changeURL( ... ) -&gt; void changeUrl( ... )</li>
</ul>

<h4>KCommand</h4>
<p>Deprecated and renamed to K3Command, header is k3command.h.
Use QUndoCommand instead.
</p>

<h4>KCommandHistory</h4>
<p>Deprecated and renamed to K3CommandHistory, header is k3command.h.
Use KUndoStack instead.
</p>

<h4>KCompletion</h4>
<ul>
<li>enableSounds() was removed, use setSoundsEnabled()</li>
<li>disableSounds() was removed, use setSoundsEnabled()</li>
<li>isSoundsEnabled() -&gt; soundsEnabled()</li>
</ul>

<h4>KConfigDialog</h4>
<ul>
<li>The dialog name is now a QString instead of a const char*</li>
<li>signal void settingsChanged(const char *dialogName); -&gt; void settingsChanged(const QString&amp; dialogName);</li>
<li>signal void settingsChanged(); has disappeared - use the signal with the parameter instead. If you don't need the parameter don't connect it, e.g <pre>connect(myDialog, SIGNAL(settingsChanged(const QString&amp;)), this, SLOT(mySlot()));</pre></li>
</ul>

<h4>KContextMenuManager</h4>
<ul>
<li>KContextMenuManager::insert() :
<p>Old code:</p>
<pre>
KContextMenuManager::insert(widget, menu);
</pre>
<p>New code:</p>
<pre>
widget-&gt;setContextMenuPolicy(Qt::ActionsContextMenu);
widget-&gt;addActions(menu-&gt;actions());
</pre>
<li>Otherwise consider handling the context menu in a contextMenuEvent() handler, which Qt
calls automatically on a right-mouse-button click or on activation by the context menu key.
There's no need to do anything in mousePressEvent/mouseReleaseEvent/keyPressEvent.
</ul>

<h4>KCursor</h4>
<ul>
<li>KCursor is now a QCursor, allowing for loading of non-standard icons from themes</li>
<li>The static methods for loading various cursor types are gone, just use QCursor( Qt::CursorShape ) directly instead</li>
</ul>

<h4>KDatePicker</h4>
<ul>
<li>signal void dateChanged(QDate); was replaced by void dateChanged( const QDate&amp;);</li>
<li>signal void dateEntered(QDate); was replaced by void dateEntered( const QDate&amp;);</li>
<li>signal void dateSelected(QDate); was replaced by void dateSelected( const QDate&amp;)</li>
<li>changed the order of the constructor's parameter</li>
<li>removed getData() method.  Use date() instead</li>
<li>removed protected slot <tt>void selectWeekClicked()</tt></li>
</ul>

<h4>KDateTable</h4>
<ul>
<li>signal void dateChanged(QDate); was replaced by void dateChanged(const QDate&amp;);</li>
<li>changed the order of the constructor's parameter</li>
<li>removed getData() method.  Use date() instead</li>
</ul>

<h4>KDateWidget</h4>
<ul>
<li>signal void changed(QDate); was changed by void changed(const QDate&amp;)</li>
</ul>

<h4>KDialog</h4>
<ul>
<li>Simplified ctor.
<pre>
The following ctor

  KDialog dlg( parent, i18n("my caption"), modal, Ok | Cancel | User1, Ok, false, i18n("Share File"))

should be rewritten as

  KDialog dlg( parent );
  dlg.setCaption( i18n("my caption") );
  dlg.setModal( modal );
  dlg.setButtons( Ok | Cancel | User1 );
  dlg.setButtonGuiItem( User1, i18n("Share File") );
  dlg.setDefaultButton( Ok );
  dlg.showButtonSeparator( false );
</pre>
</li>
<li>setButtonMask() -&gt; setButtons() and setButtonGuiItem()</li>
<li>setButtonBoxOrientation() -&gt; setButtonsOrientation()</li>
<li>setButtonOKText, setButtonApplyText , setButtonCancelText  -&gt; setButtonText( ButtonCode, const QString&amp; )</li>
<li>setDetails() -&gt; setDetailsWidgetVisible()</li>
<li>don't overide anymore slotFoo(). You now need to connect to FooClicked signal.
    Or reimplement accept() and reject() to intercept the Ok and Cancel button</li>
<li>enableButtonOK -&gt; enableButtonOk &nbsp;&nbsp; (lower case 'k')</li>
<li>enableButtonSeparator -&gt; showButtonSeparator</li>
</ul>

<h4>KDialogBase</h4>
<p>Deprecated. Use KDialog or KPageDialog instead.</p>
<ul>
<li>If the KDialogBase is Swallow or Plain mode you should replace it with KDialog, for
all other modes use KPageDialog
<pre>
Replace

  QWidget *page = plainPage();

with

  QWidget *page = new QWidget( this );
  setMainWidget( page );

All makeXXXMainWidget() methods can be replaced by the following schema:

  KVBox *mainWidget = makeVBoxMainWidget();

replace with

  KVBox *mainWidget = new KVBox( this );
  setMainWidget( mainWidget );
</pre>
</li>
<li>If you use a KPageDialog, the following steps must be taken...
<pre>
Replace ctor

  KDialogBase dlg( Tabbed, 0, parent, name, modal, i18n( "my caption" ), ... )

with

  KPageDialog dlg( parent );
  dlg.setFaceType( KPageDialog::Tabbed );
  dlg.setObjectName( name );
  dlg.setModal( modal );
  dlg.setCaption( i18n( "my caption" ) );
  ...

All addXXXPage() methods can be replaced by the following schema:

  KVBox *page = addVBoxPage( i18n( "My Title" ), i18n( "My Header" ), QPixmap( "image" ) );

replace with

  KVBox *page = new KVBox();
  KPageWidgetItem *item = addPage( page, i18n( "My Title" ) );
  item-&gt;setHeader( i18n( "My Header" ) );
  item-&gt;setIcon( KIcon( "image" ) );
</pre>
</li>
<li>The virtual methods associated with each button (slotOk(), slotCancel(), etc.) have been merged into a single KDialog::slotButtonClicked(int button) virtual method. However, the most direct replacement for slotOk() and slotCancel() is to reimplement QDialog::accept() and QDialog::reject(), respectively. For all other buttons, consider connect()ing to the corresponding signals provided by KDialog (helpClicked(), etc.).
</li>
</ul>

<h4>KDockWindow</h4>
<p>This class is obsolete and is provided for compatibility only. Use KSystemTrayIcon instead.</p>

<h4>KDualColorButton</h4>
<p>Removed since it was not used.</p>

<h4>KEdit</h4>
<ul>
<li>The signal gotUrlDrop was removed, nobody used it, and it's easy to do in the application
if needed (see the KURLDrag section)</li>
</ul>

<h4>KEditListBox</h4>
<ul>
<li>void insertStrList(const QStrList* list, int index=-1) and void insertStrList(const QStrList&amp; list, int index=-1) have been deprecated, use QStringList or const char** instead</li>
</ul>

<h4>KEditToolbar</h4>
<ul>
<li>KEditToolbar is now KEditToolBar</li>
<li>The static setDefaultToolBar was renamed to setGlobalDefaultToolBar</li>
<li>The constructors have been simplified to take either a KActionCollection* or a KXMLGUIFactory*, depending on whether the app is using XMLGUI or not. To set a non-default resource file in the KActionCollection* case, call setResourceFile.</li>
</ul>

<h4>KEditToolbarWidget</h4>
<ul>
<li>KEditToolbar is now KEditToolBarWidget</li>
<li>The constructors have been simplified to take either a KActionCollection* and a parent widget or just a parent widget. The latter is for use with XMLGUI. Before being shown, the new load() methods should be called. These allow for populating the widget before being shown but after construction, which is useful when allowing the resource file to be changed as in KEditToolBar.</li>
</ul>

<h4>KFind</h4>
<ul>
<li>The constructors have been simplified to take an optional parent. Other parameters must be set by using the API directly, e.g. setHasSelection and setSearch.</li>
<li>The options argument in the constructor is now an enumerated flag of type KFind::Options.</li>
<li>resetCounts() was renamed to resetMatchCount().</li>
<li>The Options flags from KReplace were added to the Options enumeration of KFind.</li>
</ul>

<h4>KFontChooser</h4>
<ul>
<li>Was in kfontdialog.h, but was moved to it's own header, so now either do #include &lt;KFontChooser&gt; or #include &lt;kfontchooser.h&gt;</li>
<li>The KFontChooser constructors now take a set of flags to determine how it is displayed, which replaces the numerous bools used previously. The following mappings from the bools in KDE3 and the enum in KDE4 are as follows:
<ul>
<li>3rd parameter onlyFixed -&gt; FixedFontsOnly</li>
<li>5th parameter makeFrame -&gt; DisplayFrame</li>
<li>7th parameter diff -&gt; ShowDifferences</li>
</ul>
</li>
</ul>

<h4>KFontDialog</h4>
<ul>
<li>The KFontDialog constructor now takes a set of flags to determine how it is displayed, which replaces the numerous bools used previously. The following mappings from the bools in KDE3 and the enum in KDE4 are as follows:
<ul>
<li>3rd parameter onlyFixed -&gt; KFontChooser::FixedFontsOnly</li>
<li>5th parameter makeFrame -&gt; KFontChooser::DisplayFrame</li>
<li>7th parameter diff -&gt; KFontChooser::ShowDifferences</li>
</ul>
</li>
<li>The second argument for getFontDiff() is now a reference to a KFontChooser::FontDiffFlags instead of an int.</li>
</ul>

<h4>KGlobalAccel</h4>
<ul>
<li>Moved from kdecore.</li>
<li>bool useFourModifierKeys() has been removed (we always use four modifier keys now).</li>
<li>Now a singleton</li>
<li>You shouldn't need to access this class much... just use setGlobalShortcut() in KAction.</li>
</ul>

<h4>KGlobalSettings</h4>
<ul>
<li>Moved from kdecore.</li>
<li>KGlobalSettings is now a QObject so can emit signals like kdisplayPaletteChanged() instead of KApplication</li>
<li> deprecated &quot;static QString trashPath()&quot; has been removed. use KIO::trash instead</li>
<li>Palette color accessors have been removed. Libraries should restrict themselves to colors available in QPalette (always use the widget's palette and not a global palette), otherwise use an appropriately constructed KColorScheme instead. This does not include/affect WM color accessors.</li>
</ul>

<h4>KGradientSelector</h4>
<ul>
<li>Reversed the value range, if orientation is horizontal. Now minimum is on the left and maximum on the right side.</li>
</ul>

<h4>KGuiItem</h4>
<ul>
<li>Don't use setIconSet anymore, use setIcon instead, there is no compatibility class or function</li>
</ul>

<h4>KHistoryCombo</h4>
<p>Renamed to KHistoryComboBox.</p>
<ul>
<li>Was in kcombobox.h, but was moved to it's own header, so now do #include &lt;khistorycombobox.h&gt;</li>
</ul>

<h4>KHSSelector</h4>
<ul>
<li>Renamed to KHueSaturationSelector, moved to kxyselector.h</li>
</ul>

<h4>KIcon</h4>
<ul>
<li>New class (old one renamed to K3Icon)</li>
<li>Thin wrapper around QIcon which creates a KIconEngine corresponding to the kde named icon</li>
</ul>

<h4>KIconLoader</h4>
<ul>
<li>Moved from kdecore and is now a QObject.</li>
<li>Deprecated loadIconSet(), DesktopIconSet(), BarIconSet(), SmallIconSet(), UserIconSet(): use KIcon(name) or KIcon(name,instance-&gt;iconLoader()) instead.<br/>
Note that this can change slightly the look of the icon in some cases: for instance if code was calling setIcon(BarIconSet())
on a pushbutton, it meant the icon was loaded at toolbar size and then resized down.
With KIcon(name), the small icon is picked up instead, which might look different, but this is the correct behavior.
These deprecated methods were also altered to not take a KComponentData (KInstance* in KDE3), which was an optional parameter in KDE3.</li>
<li>the State parameter was used to be both define the state of the icon one of a limited number of overlays. Overlays are now a separate parameter, a QStringList, containing the names of icons to overlay. The new overlays parameter now follows the state parameter.</li>
</ul>

<h4>KInputDialog</h4>
<ul>
<li>static QString KInputDialog::text( const QString &amp;caption,...) was replaced by QString KInputDialog::getText( const QString &amp;caption,...)</li>
</ul>

<h4>KIntNumInput, KDoubleNumInput, KDoubleSpinBox</h4>
<ul>
<li>Qt::Alignment for label alignment instead of int</li>
<li>setMinValue(min) -&gt; setMinimum(min) / minValue() -&gt; minimum()</li>
<li>setMaxValue(min) -&gt; setMaximum(min) / maxValue() -&gt; maximum()</li>
</ul>

<h4>KDoubleSpinBox</h4>
<ul>
<li>It was removed and replaced by QDoubleSpinBox</li>
</ul>

<h4>KIntSpinBox</h4>
<ul>
<li>In the long version of the constructor, the arguments parent and base have switched places.</li>
</ul>

<h4>KJanusWidget</h4>
<p>Deprecated. Use KPageWidget instead.</p>

<h4>KKeyButton</h4>
<p>Removed. Use either KKeySequenceWidget or KShortcutWidget. Use KShortcutWidget only if you really want two possible shortcuts. Both don't pop up a modal dialog.</p>

<h4>KKeyChooser</h4>
<p>Renamed to <a href="#KShortcutsEditor">KShortcutsEditor</a>.</p>

<h4>KKeyDialog</h4>
<p>Renamed to <a href="#KShortcutsDialog">KShortcutsDialog</a>.</p>

<h4>KLed</h4>
<ul>
<li>int ensureRoundLed() -&gt; virtual int ledWidth() const</li>
<li>virtual void paintRound() -&gt; virtual void paintRaised()</li>
</ul>

<h4>KLineEdit</h4>
<ul>
<li>void cursorAtEnd() removed, use QLineEdit::end(false) instead</li>
<li>unused protected slots removed: void slotAboutToShow() and void slotCancelled()</li>
<li>void setEnableSqueezedText( bool enable ) -&gt; void setSqueezedTextEnabled( bool enable )</li>
<li>void setURLDropsEnabled() -&gt; void setUrlDropsEnabled()</li>
<li>bool isURLDropsEnabled() -&gt; bool urlDropsEnabled()</li>
<li>void setURL() -&gt; void setUrl()</li>
</ul>

<h4>KLineEditDlg</h4>
<p>Was deprecated, has been removed. Use KInputDialog instead.</p>

<h4>KListAction</h4>
<p>Removed; as per comments, did not add anything to KSelectAction.</p>

<h4>KListBox</h4>
<p>Deprecated and renamed to K3ListBox. Use KListWidget (based on the QListWidget class).</p>

<h4>KListView</h4>
<p>Deprecated and renamed to K3ListView.<br>
There is no direct KDE replacement for this class yet.<br>
Either use KListWidget for list-based widgets or QTreeWidget for tree-based
widgets. Note that only QTreeWidget supports headers.</p>

<h4>KListViewSearchLine</h4>
<p>Deprecated and renamed to K3ListViewSearchLine.<br>
You should port from K3ListView to QTreeWidget and then use
KTreeWidgetSearchLine instead.</p>

<h4>KMacroCommand</h4>
<p>Deprecated and renamed to to K3MacroCommand, header is k3command.h.
Use QUndoCommand instead which can group child commands.
</p>

<h4>KMainWindow</h4>
<ul>
<li>getMemberList() was replaced by memberList() and memberList was renamed to mMemberList and made it private</li>
<li>sizeForCentralWidgetSize(QSize size) returned the size the main window should have so that the central widget will be of size.  You normally don't need this, the recommended way to achieve a certain central widget size is as follows.<br>
 * Override sizeHint() in the central widget so that it returns the desired size.<br>
 * Call updateGeometry() in the central widget whenever the desired size changes. This ensures that the new sizeHint() is properly propagated to any parent layout.<br>
 * Now call adjustSize() in the main window to resize the main window such that the central widget will become the desired size.</li>
<li>Ported to QMainWindow</li>
<li>accel() removed - KAccel no longer needed</li>
<li>If you need XmlGui functions from KMainWindow you may want to use KXmlGuiWindow instead of KMainWindow.</li>
</ul>

<h4>KMainWindowInterface</h4>
<ul>
<li>functionsDynamic() now returns a DCOPCStringList</li>
<li>function processDynamic arguments uses DCOPCString instead of QCString :
    <pre>bool processDynamic(const DCOPCString &amp;fun, const QByteArray &amp;data, DCOPCString&amp; replyType, QByteArray &amp;replyData);</pre></li>
<li>actions() now returns a DCOPCString</li>
</ul>

<h4><a name="KMenu">KMenu</a> (was KPopupMenu)</h4>
<ul>
<li>indexes replaced by QAction*</li>
<li>title, titlePixmap, and changeTitle removed - use QAction::text(), QAction::icon(), QAction::setText() and QAction::setIcon</li>
<li>contextMenuFocusItem changed to contextMenuFocusAction in line with the change from indexes to actions</li>
</ul>

<h4>KMessageBox</h4>
<ul>
<li>Where applicable, the static functions now take an additional argument to specify the cancel button. Since a default argument is provided, this will affect your code only, if you specified dontAskAgainName and/or options. In those cases, adding an additional parameter KStandardGuiItem::cancel() leads to the old behavior. The following functions are affected (omitting function arguments in the list): questionYesNoCancel(), questionYesNoCancelWId(), warningContinueCancel(), warningContinueCancelWId(),
warningContinueCancelList(), warningContinueCancelListWId(), warningYesNoCancel(), warningYesNoCancelWId(), warningYesNoCancelList(), warningYesNoCancelListWId(), messageBox(), messageBoxWId().</li>
</ul>

<h4>KNamedCommand</h4>
<p>Deprecated and renamed to K3NamedCommand, header is k3command.h.
Use QUndoCommand instead where name can be also stored using setText(const QString&).
</p>

<h4>KPalette</h4>
<ul>
<li>Renamed to <a href="KColorCollection">KColorCollection</a></li>
</ul>

<h4>KPaletteTable</h4>
<ul>
<li>Renamed to <a href="KColorTable">KColorTable</a></li>
</ul>

<h4>KPassivePopup</h4>
<ul>
<li>clicked single now emits a const QPoint reference</li>
</ul>

<h4>KPasswordEdit</h4>
<p>Deprecated and renamed to K3PasswordEdit. Use KLineEdit, with KLineEdit::setPasswordMode(true).</p>

<h4>KPasswordDialog</h4>
<p>Deprecated and renamed to K3PasswordDialog.</p>
<ul>
<li>asking for a new password -&gt;  KNewPasswordDialog</li>
<li>password() return QString</li>
<li>getPassword() gone, use the following code instead</li>
<!-- <li>kpassdlg.h was renamed kpassworddialog.h.</li> -->
<!-- <li>checkPassword take now a QString as argument</li> -->
</ul>
<pre>
KPasswordDialog dlg(parent);
dlg.setPrompt( prompt );
dlg.setWindowTitle( caption );
if( dlg.exec() != QDialog::Accepted )
    return;
use( dlg.password() );
</pre>

<h4>KPixmapIO</h4>
<p>Removed. Use QPixmap.toImage() and QPixmap::fromImage().</p>

<h4>KPixmapRegionSelecorDialog</h4>
<ul>
<li>getSelectedRegion was changed to selectedRegion</li>
<li>getSelectedImage was changed to selectedImage</li>
</ul>

<h4>KPopupMenu</h4>
<p>Renamed to <a href="#KMenu">KMenu</a>.</p>

<h4>KPopupTitle</h4>
<p>Removed; QMenu doesn't accept widgets, and QAction allows specification of font, icon etc... and gradients / background pixmaps weren't even working in KDE3. You can use KMenu::addTitle() instead, which creates QAction.</p>

<h4>KProgress</h4>
<p>Removed. Use QProgressBar instead.</p>
<ul>
<li>advance(int offset) -&gt; setValue(value()+offset)</li>
<li>QProgressBar has changed a lot in Qt4 ( setTotalSteps(totalSteps) -&gt; setRange(0, totalSteps), setProgress -&gt; setValue, percentageChanged -&gt; valueChanged ). For more details see QProgressBar class reference.</li>
</ul>

<h4>KProgressDialog</h4>
<ul>
<li>#include &lt;kprogressdialog.h&gt; instead of #include &lt;kprogress.h&gt;</li>
<li>progressBar() is a now QProgressBar instead of a KProgressBar -&gt; See KProgress API changes</li>
<li>setLabel(const QString &amp;) renamed to setLabelText(const QString &amp;)</li>
</ul>

<h4>KPushButton</h4>
<ul>
<li>Don't use setIconSet anymore, use setIcon instead, there is no compatibility class or function</li>
</ul>

<h4>KRadioAction</h4>
<p>Removed. Use KAction (or KToggleAction if you need different text/icons for the selected state) instead, in combination with an exclusive QActionGroup</p>

<h4>KRecentFilesAction</h4>
<ul>
<li>clearURLList() removed, use clear() instead</li>
<li>*URL* -&gt; *Url* as per KDE naming policy</li>
<li>the maxItem property is now an int (was a uint) (affects all accessors methods)</li>
</ul>

<h4>KRootPixmap</h4>
<p>Removed since it was not used.</p>

<h4>KSelectAction</h4>
<ul>
<li>now allows for combo box or button with popup menu when inserted to a toolbar</li>
<li>popupMenu() removed, use menu() instead</li>
<li>{set|}removeAmpersandsInCombo() removed - was deprecated</li>
</ul>

<h4>KSeparator</h4>
<ul>
<li>KSeparator now uses Qt::Vertical and Qt::Horizontal rather than QFrame's HFrame and VFrame.</li>
</ul>

<h4>KSessionManager</h4>
<p>Moved from kdecore, renamed from KSessionManaged, and moved to it's own header: ksessionmanager.h or KSessionManager</p>

<h4>KSharedPixmap</h4>
<p>Removed since is was not used.</p>

<h4>KShortcut</h4>
<ul>
<li>Moved from kdecore.</li>
<li>Now reentrant</li>
<li>Only uses QKeySequences now</li>
<li>Removed list semantics; remove() still has somewhat list-like behavior.</li>
<li>Introduced "primary" and "alternate" shortcuts to replace the arbitrary list of shortcuts</li>
<li>Removed casting operators</li>
<li>Removed operator&lt; and operator&gt;</li>
<li>Added a qHash(const KShortcut &amp;) function so you can use QHash with KShortcut instead of QMap</li>
<li>remove() -&gt; removeAll()</li>
<li>toList() -&gt; Not needed anymore since KShortcut inherits QList&lt;QKeySequence&gt;</li>
<li>toStringInternal() -&gt; You shouldn't be using this! But use toString() instead</li>
</ul>

<h4><a name="KShortcutsEditor">KShortcutsEditor</a> (was KKeyChooser)</h4>
<ul>
<li>Added new constructor parameter: ActionTypes types.  Allows you to filter the types of actions shown in the dialog.</li>
<li>Removed all functions dealing with old classes KShortcutList, KGlobalAccel (kde3 version)</li>
<li>Global shortcut conflict checking functions moved to KGlobalAccel.</li>
<li>Standard shortcuts checking functions were removed.</li>
</ul>
<p>See also <a href="#KShortcutsDialog">KShortcutsDialog</a>.</p>

<h4><a name="KShortcutsDialog">KShortcutsDialog</a> (was KKeyDialog)</h4>
<ul>
<li>Changed from edit/commit semantics to edit in-place/revert semantics. The old way didn't work in corner cases, the new way is quite a bit less complicated internally, and such cases only appear if a user opens multiple KKeyDialogs at the same time, which nobody does intentionally.</li>
<li>Rewritten. It was hard to read, which stood in the way of future changes/improvements.</li>
<li>Uses a new GUI layout.</li>
<li>removed KDE2 deprecated functions</li>
<li>Added new constructor parameter: KKeyChooser::ActionTypes types.  Allows you to filter the types of actions shown in the dialog.</li>
</ul>

<h4>KStatusBar</h4>
<ul>
<li>The unused BarStatus enum was removed.</li>
<li>The 'permanent' bool has been removed in favor of more explicit naming.<br>
  insertItem(text,id,true) -&gt; insertPermanentItem(text,id),<br>
  insertFixedItem(text,id,true) -&gt; insertPermanentFixedItem(text,id)</li>
</ul>

<h4>KStdAction</h4>
<p>Renamed to KStandardAction, header is kstandardaction.h.</p>
<ul>
<li>showToolbar() methods have been removed, see KMainWindow::setStandardToolBarMenuEnabled()</li>
</ul>

<h4>KStdGuiItem</h4>
<p>Renamed to KStandardGuiItem, header is kstandardguiitem.h.</p>
<ul>
<li>The StdItem enum was renamed to StandardItem</li>
</ul>

<h4>KSyntaxHighlighter</h4>
<ul>
<li>Use K3SyntaxHighlighter because it used Q3TextEdit or use KSyntaxHighlighter when your application will use QTextEdit</li>
</ul>

<h4>KSystemTray</h4>
<p>Renamed to KSystemTrayIcon for consistency with its actual purpose and naming in Qt (QSystemTrayIcon).</p>
<ul>
<li>Is now a subclass of QSystemTrayIcon and not QLabel. Therefore it is not a widget anymore. Otherwise, it behaves the same as in KDE3 when it comes to managing a parent window's visibility and providing an action collection to display in the context menu.</li>
</ul>

<h4>KTabBar</h4>
<ul>
<li>colors, close buttons on individual tabs not working at the moment</li>
<li>The old insertTab and removeTab have been removed, use addTab / insertTab / removeTab from QTabBar instead (uses indices, not QTab*s)</li>
</ul>

<h4>KTabCtl</h4>
<p>Removed. Use QTabWidget.</p>

<h4>KTextBrowser</h4>
<ul>
<li>Inherits from QTextBrowser instead of Q3TextBrowser</li>
</ul>

<h4>KTextEdit</h4>
<ul>
<li>void highLightWord() -&gt; void highlightWord()</li>
</ul>

<h4>KTimeWidget</h4>
<p>Removed. Use QTimeEdit.</p>

<h4>KTimezoneWidget</h4>
<p>Renamed to KTimeZoneWidget.</p>

<h4>KToggleAction</h4>
<ul>
<li>setExclusiveGroup() / exclusiveGroup() removed, use setActionGroup() and QActionGroup::setExclusive() for exclusivity (imitates the deleted KRadioAction class)</li>
<li>in comparison with KAction, adds setCheckedState() and sets this action to checkable</li>
</ul>

<h4>KToggleFullScreenAction</h4>
<ul>
<li>Simplified constructor
<pre>
Replace

  KToggleFullScreenAction( const KShortcut &amp;cut, const QObject* receiver, const char* slot,
                           KActionCollection* parent, QWidget* window, const QString&amp; name )

with

  KToggleFullScreenAction( QWidget* window, KActionCollection* parent, const QString&amp; name )

See <a href="#KAction">KAction</a> how to port the other arguments.
</pre>
</li>
</ul>

<h4>KToolBar</h4>
<ul>
<li>Ported to QToolBar</li>
<li>IconText, iconText(), setIconText() replaced by QToolBar::toolButtonStyle() et. al.</li>
<li>BarPosition, barPos(), setBarPos() replaced by Qt::ToolBarArea settings in QMainWindow; Unmanaged, Floating, and Flat are no longer supported (use QDockWidget if you need floating toolbars)</li>
<li>fullSize(), setFullSize() removed as now handled in QMainWindow - add or insert a tool bar break before (not needed for the first toolbar) and after the toolbar using QMainWindow::{add|insert}ToolBarBreak() to have the toolbar take up all available horizontal space</li>
<li>iconSize(), setIconSize() now a QToolBar property, and a QSize instead of an int - convenience function setIconDimensions() takes an int instead</li>
<li>insert*() and all associated item-manipulation methods removed - all done through actions now. Compatibility layer possible however so far I haven't found the functions to be used much in KDE programs (mostly it's taken care of by xmlgui instead)</li>
<li>flat(), setFlat() replaced by movable(), setMovable() (old "flat" concept equivalent to not movable)</li>
<li>layout-related methods removed (done by QToolBar's layout)</li>
<li>alignItemRight() removed (as above), replacement is to add a KToolBarSpacerAction before the action you want to be aligned right (or if you have a custom action already, just create a container widget and insert a QSpacerItem on the left of your custom widget (see KonqLogoAction in kdebase/konqueror/konq_actions.cc)</li>
<li><tt>enum BarStatus</tt> and <tt>bool enable(BarStatus stat)</tt> have been
removed</li>
<li><tt>void enableMoving(bool flag)</tt> and <tt>void enableFloating (bool
flag)</tt> have been removed in favor of <tt>setMovingEnabled(bool)</tt></li>
<li><tt>int maxHeight()/int maxWidth()</tt> removed in favor of
<tt>maximumHeight()/maximumWidth()</tt></li>
<li><tt>void setMaxHeight (int h)</tt> and <tt>void setMaxWidth (int dw)</tt>
removed in favor of <tt>setMaximumHeight()/setMaximumWidth()</tt></li>
<li>void setEnableContextMenu(bool enable = true) -&gt; void setContextMenuEnabled(bool enable = true)</li>
</ul>

<h4>KToolBarButton</h4>
<p>Removed. Done by QToolButton now.</p>

<h4>KToolBarLabelAction</h4>
<ul>
<li>Simplified constructors:
<pre>
  Replace

    KToolBarLabelAction( const QString &amp;text,
                         const KShortcut &amp;cut,
                         const QObject *receiver, const char *slot,
                         KActionCollection *parent, const QString&amp; name )

  with

    KToolBarLabelAction( const QString &amp;text,
                         KActionCollection *parent, const QString&amp; name )

  and

    KToolBarLabelAction( QAction *buddy, const QString &amp;text,
                         const KShortcut &amp;cut,
                         const QObject *receiver, const char *slot,
                         KActionCollection *parent, const QString&amp; name )

  with

    KToolBarLabelAction( QAction *buddy, const QString &amp;text,
                         KActionCollection *parent, const QString&amp; name )


  See KAction for how to port the other arguments.
</pre>
</li>
</ul>

<h4>KToolBarRadioGroup</h4>
<p>Removed. Done by QToolButton now.</p>

<h4>KToolBarSeparator</h4>
<p>Removed. Use QAction::setSeparator().</p>

<h4>KUndoRedoAction</h4>
<p>Deprecated and renamed to K3UndoRedoAction, header is k3command.h. 
KUndoStack::createRedoAction() and KUndoStack::createUndoAction() can be used instead but they currently lack popups with action lists.</p>

<h4>KURLLabel</h4>
<ul>
<li>renamed to KUrlLabel</li>
<li>void setAltPixmap() -&gt; void setAlternatePixmap()</li>
<li>QPixmap* altPixmap() -&gt; QPixmap* alternatePixmap()</li>
<li>void setGlow() -&gt; void setGlowEnabled()</li>
<li>void setFloat() -&gt; void setFloatEnabled()</li>
<li>void setURL() -&gt; void setUrl()</li>
<li>signal: void enteredURL( ... ) -&gt; void enteredUrl( ... )</li>
<li>signal: void leftURL( ... ) -&gt; void leftUrl( ... )</li>
<li>signal: void leftClickedURL( ... ) -&gt; void leftClickedUrl( ... )</li>
<li>signal: void rightClickedURL( ... ) -&gt; void rightClickedUrl( ... )</li>
<li>signal: void middleClickedURL( ... ) -&gt; void middleClickedUrl( ... )</li>
</ul>

<h4>KValueSelector</h4>
<p>Renamed to KColorValueSelector, moved to kcolorvalueselector.h</p>

<h4>KWidgetAction</h4>
<p>Removed. Use KAction or QWidgetAction and utilise its widget-setting capabilities.</p>

<h4>KWindowListMenu</h4>
<p>Moved to libkworkspace in kdebase</p>

<h4>KWizard</h4>
<p>Deprecated and renamed to K3Wizard. Use KAssistantDialog.</p>

<h4 align="right"><a href="#TOC">Return to the Table of Contents</a></h4>

<h3><a name="kio">Changes in kio</a></h3>

<h4>KAbstractFileWidget</h4>
<ul>
<li>void setPreviewWidget(const KPreviewWidgetBase *w) -&gt; void setPreviewWidget(KPreviewWidgetBase *w)</li>
</ul>

<h4>KArchive/KTar/KZip/KAr</h4>
<ul>
<li>All sizes and file offsets now use qint64 (similar to QIODevice)</li>
<li>The API has changed for subclasses: there is a KArchive constructor that takes a filename, and which provides KSaveFile support automatically, writeDir is doWriteDir, prepareWriting is doPrepareWriting etc.</li>
<li>API changes for users of the class: isOpened() was renamed to isOpen(),
   doneWriting() to finishWriting(), and the order of the arguments for writeFile() is more usual:
   data comes before size.</li>
<li>KTarDirectory -&gt; KArchiveDirectory</li>
<li>KTarFile -&gt; KArchiveFile</li>
<li>KTarEntry -&gt; KArchiveEntry</li>
<li>KTarGz -&gt; KTar</li>
</ul>

<h4>KBookmark classes</h4>
<ul>
<li>KBookmarkDrag class has been moved to kde3support. Use KBookmark::populateMimeData() and
KBookmark::List::populateMimeData() in the drag/copy side,
and the static methods KBookmark::List::canDecode() and KBookmark::List::fromMimeData()
in the drop/paste side.</li>
<li>KBookmarkMenu constructor is much simpler. It always creates a toplevel menu, which makes the parameter isRoot and parentAddress superfluous. KBookmarkOwner now governs wheter to show a "Add Bookmark" Menu Entry, thus the constructor parameter add is gone.</li>
<li>KBookmarkMenu and KBookmarkBar no longer emits openBookmark(), override KBookmarkOwner::openBookmark() instead. </li>
<li>KBookmarkOwner::openBookmarkURL() was replaced by  KBookmarkOwner::openBookmark()</li>
<li>KExtendBookmarkOwner functionality was integrated into KBookmarkOwner. (And the API is more regular now.)</li>
<li>KBookmarkMenu::slotBookmarksChanged() and KBookmarkMenu::fillBookmarkMenu() are no longer public. Both had comments, that they shouldn't be used anyway.</li>
<li>KBookmarkMannager::managerForFile() requires a DBus Name as the second parameter.</li>
</ul>

<h4>KDEDesktopMimeType class</h4>
<ul>
<li>All the static methods have been moved to KDesktopFileActions, in kdesktopfileactions.h</li>
</ul>

<h4>KDirLister class</h4>
<ul>
<li>The constructor argument is now a separate setter, so: KDirLister(false) -&gt; KDirLister(); KDirLister(true) -&gt; KDirLister() + setDelayedMimeTypes(true). On the other hand, KDirLister being a QObject, it takes a QObject* parent argument.</li>
<li>KDirLister uses KFileItem by value now:
  <ul>
  <li>KFileItem* rootItem() const -&gt; KFileItem rootItem() const</li>
  <li>KFileItem* findByUrl( const KUrl&amp; url ) const -&gt; KFileItem findByUrl( const KUrl&amp; url ) const</li>
  <li>KFileItem* findByName( const QString&amp; name ) const -&gt; KFileItem* findByName( const QString&amp; name ) const</li>
  <li>bool matchesFilter( const KFileItem* ) const -&gt; bool matchesFilter( const KFileItem&amp; ) const</li>
  <li>bool matchesMimeFilter( const KFileItem* ) const -&gt; bool matchesMimeFilter( const KFileItem&amp; ) const</li>
  </ul>
</li>
<li>The following signals have changed:
  <ul>
  <li>void deleteItem( KFileItem *_fileItem ) -&gt; void deleteItem( const KFileItem &amp;fileItem )</li>
  <li>void refreshItems( const KFileItemList &amp;items ) -&gt; void refreshItems( const QList&lt;QPair&lt;KFileItem, KFileItem&gt;&gt; &amp;entries)</li>
  </ul>
</li>
</ul>

<h4>KDiskFreeSp class</h4>
<ul>
<li>Renamed to KDiskFreeSpace, moved to kdiskfreespace.h</li>
</ul>

<h4>KDESasl class</h4>
<ul>
<li>This class is removed due to its inflexiblity, use cyrus-sasl or the upcoming QCA SASL implementation</li>
</ul>

<h4>KDirSelectDialog</h4>
<ul>
<li>KDirSelectDialog moved to libkfile. If you were only using the static method selectDirectory, you can use KFileDialog::getExistingDirectory (for local files, i.e. if the second argument was true), or KFileDialog::getExistingDirectoryUrl</li>
</ul>

<h4>KFileDialog,KDirSelectDialog,KUrlRequesterDlg,KCustomMenuEditor,KUrlBarItemDialog</h4>
<ul>
  <li> are KDialogBases no more, now they are a KDialogs </li>
  <li> no more name and modal parameters in the constructors</li>
</ul>

<h4>KFileDialog, KDirOperator</h4>
<ul>
  <li> instead of KConfig* + QString group everywhere KConfigGroup is used now </li>
</ul>

<h4>KFileDialog</h4>
<ul>
<li>Changed constructor and method 'startDir' arguments from QString to KUrl

<pre>
  Affected methods:

    KFileDialog( ... )
    static QString getOpenFileNameWId( ... )
    static QStringList getOpenFileNames( ... )
    static KUrl getOpenURL( ... )
    static KUrl::List getOpenURLs( ... )
    static QString getSaveFileName( ... )
    static QString getSaveFileNameWId( ... )
    static KUrl getSaveURL( ... )
    static QString getExistingDirectory( ... )
    static KUrl getExistingURL( ... )
    static KUrl getImageOpenURL( ... )
</pre>
</li>
<li>getOpenURL, getOpenURLs, getExistingURL and getSaveURL were renamed to getOpenUrl, getOpenUrls, getExistingUrl and getSaveUrl (i.e. URL was replaced by Url everywhere)</li>
<li>void toolbarCallback(int) was removed</li>
<li>void pathComboChanged( const QString&amp; ); was removed</li>
<li>void dirCompletion( const QString&amp; ); was removed</li>
<li>void setFilterMimeType(const QString &amp;label, const KMimeType::List &amp;types, const KMimeType::Ptr &amp;defaultType) was removed</li>
<li>void setPreviewWidget(const QWidget *w) was removed</li>
<li>void updateStatusLine(int dirs, int files); was removed</li>
<li>protected member locationEdit is now a method locationEdit()</li>
<li>protected member filterWidget is now a method filterWidget()</li>
<li>getExistingUrl -&gt; getExistingDirectoryUrl</li>
</ul>

<h4>KFileIconView, KFileDetailView, KFileTreeView, KFileTreeViewItem</h4>
<ul>
<li>All renamed to K3File* since they are based upon K3IconView and K3ListView</li>
<li>No replacement yet, apart from the more low-level KDirModel</li>
<li>Those classes have all moved to a new library, libkfile. You need to link to ${KDE4_KFILE_LIBS} to keep using those classes.</li>
</ul>

<h4>KFileItemList</h4>
<ul>
  <li>KFileItemList has been ported from QPtrList to QList. This means you
      have to iterate using either integers or java-style or STL iterators.
      Here's the STL version:
   <pre>
    KFileItemList::const_iterator kit = list.begin();
    const KFileItemList::const_iterator kend = list.end();
    for ( ; kit != kend; ++kit )
       ...
    </pre></li>
   <li>Note however that no loop is necessary anymore for finding an item by name (use findByName), finding an item by URL (use findByURL) or making a list of all urls (use urlList).</li>
</ul>

<h4>KFileMetaInfo</h4>

<p>KFileMetaInfo has a new API and a new implementation. The change moves the emphasis away from mimetypes and groups of metadata to individual properties of files. These properties are still called KFileMetaInfoItem. The no longer belong to a group; they belong to the KFileMetaInfo object. The class KFileMetaInfoGroup is only there to group the items. Each KFileMetaInfoItem now has a member called PredicateProperties. This term comes from RDF. It determines the type of the item. This type encompasses the key (a URI), a name in the current locale, a description in the current locale, a type and a QValidator.
</p>

<h4>KFileOpenWithHandler</h4>
<ul>
<li>This class has been removed, it was just a workaround for a dependency problem,
just remove any instance of it.</li>
</ul>

<h4>KFilePlugin</h4>

<p>This class has been replaced by <a href="http://techbase.kde.org/Development/Tutorials/Writing_file_analyzers">Strigi analyzers</a> and KFileWritePlugin. The Strigi analyzer should be installed in the directory lib/strigi to be picked up. Introspection provided by the factories that are defined in the plugin helps in determining when a particular analyzer will be used.</p>

<p>Strigi analyzer have the advantage that they are faster than KFilePlugins. In addition, having one mechanism for extracting metadata from files saves code and more importantly ensures consistency between the display of metadata and the ablility to search in it. Another advantage is that the way the metadata are described matches well with the methods employed in the semantic desktop, in particular Nepomuk.</p>

<h3>How to convert a KFilePlugin?</h3>

<p>If your KFilePlugin only reads from files, it is easiest. Then you have to write only a Strigi analyzer. Depending on the way you read the data from the file it is best to write either a StreamThroughAnalyzer or a StreamEndAnalyzer. How to make the decision is explained in the link above. When your analyzer is ready you have to decide where to put it. You can put it in the same place as the KFilePlugin was or, if there are little or no dependencies in your analyzer, you can put it in kdesupport/strigi/src/streamindexer. The latter option has the advantage that you do not have to add the code for loading a plugin.</p>

<p>When you have write functionality in your plugin, you must implement KFileWritePlugin and place the code for writing the file in there. The details of how to do this are not entirely clear at the moment as is explained in the entry for KFileWritePlugin.</p>

<h4>KFileWritePlugin</h4>

<p>The write functionality of the class KFilePlugin is now handled by KFileWritePlugin. A global instance of this class that is attached to a KFileMetaInfoItem can be used to write back changes that were made to a files' metadata.</p>

<p>The mechanism by which these global instances are tied to KFileMetaDataItems is not yet finished. The implementation of will go into kio/kio/kfilemetainfo.cpp.</p>

<h4>KIconButton</h4>
<ul>
<li>signal void iconChanged(QString); replaced by void iconChanged(const QString &amp;);</li>
</ul>

<h4>KIconDialog</h4>
<ul>
<li>signal void newIconName(QString); replaced by void newIconName(const QString &amp;);</li>
</ul>

<h4>KImageIO classes</h4>
<ul>
<li>The KImageIO plugins are converted to Qt's imageformat plugins. The KImageIO class
now a lightweight version to query the installed plugins without actually loading them.
</li>
<li>.kimgio files are converted to .desktop files, and contains regular KDE services,
with ServiceType as QImageIOPlugins</li>
<li>KImageIO::registerFormats() removed, simply remove this from your code</li>
<li>Instead of mimeType(filename), you should use KMimeType</li>
<li>Instead of canRead() and canWrite() you can use types(mode).contains(typename)</li>
</ul>

<h4>KIO:: global methods</h4>
<ul>
<li>KIO::convertSizeFromKB is now KIO::convertSizeFromKiB since it takes a value in KiB (1 KiB = 1024 B)</li>
<li>KIO::findDeviceMountPoint() has been replaced with KMountPoint::currentMountPoints() and findByDevice()</li>
<li>KIO::findPathMountPoint() has been replaced with KMountPoint::currentMountPoints() and findByPath()</li>
<li>KIO::probably_slow_mounted() has been replaced with KMountPoint::currentMountPoints(), findByPath(), and probablySlow()</li>
<li>KIO::testFileSystemFlag() has been replaced with KMountPoint::testFileSystemFlag() (use KMountPoint::currentMountPoints().findByPath())</li>
</ul>

<h4>KIO::Job</h4>
<ul>
<li>For Job subclasses: removeSubjob doesn't terminate the parent job anymore, add
<code>if ( !hasSubjobs() ) emitResult();</code> to emulate the old behavior that.</li>
<li>subjobs is now private. This means you should replace subjobs.remove(job) with removeSubjob(job),
and subjobs.isEmpty() with !hasSubjobs()</li>
<li><code>job-&gt;showErrorDialog(QWidget*)</code> becomes <code>job-&gt;ui()-&gt;showErrorMessage()</code>. The parent QWidget should be set immediately after creating the job by <code>job-&gt;ui()-&gt;setWindow(QWidget*)</code></li>
<li><code>job-&gt;setAutoErrorHandlingEnabled(bool,QWidget*)</code> becomes <code>job-&gt;ui()-&gt;setAutoErrorHandlingEnabled(bool)</code></li>
<li><code>job-&gt;isAutoErrorHandlingEnabled()</code> becomes <code>job-&gt;ui()-&gt;isAutoErrorHandlingEnabled()</code></li>
<li><code>job-&gt;setAutoWarningHandlingEnabled(bool)</code> becomes <code>job-&gt;ui()-&gt;setAutoWarningHandlingEnabled(bool)</code></li>
<li><code>job-&gt;isAutoWarningHandlingEnabled()</code> becomes <code>job-&gt;ui()-&gt;isAutoWarningHandlingEnabled()</code></li>
<li><code>job-&gt;setWindow(QWidget*)</code> becomes <code>job-&gt;ui()-&gt;setWindow(QWidget*)</code></li>
<li><code>job-&gt;window()</code> becomes <code>job-&gt;ui()-&gt;window()</code></li>
<li><code>job-&gt;setInteractive( false )</code> becomes <code>job-&gt;setUiDelegate( 0 )</code></li>
<li>Also note that you must now include &lt;kio/copyjob.h&gt; if you use KIO::copy, KIO::move or KIO::trash,
and you must include &lt;kio/deletejob.h&gt; if you use KIO::del.</li>
<li>For Job subclasses, there's no showProgressInfo flag in the constructor anymore. You should use KIO::getJobTracker()-&gt;registerJob(job) instead.</li>

<li>Most boolean parameters have been replaced with enums. So for instance
  <ul>
     <li>KIO::file_copy(src, dest, -1, true /*overwrite*/, false /*no resume*/, false) -&gt; KIO::file_copy(src, dest, -1, KIO::Overwrite | KIO::HideProgressInfo)</li>
     <li>KIO::get(url, false /*no reload*/, false) -&gt; KIO::get(url, KIO::NoReload, KIO::HideProgressInfo)</li>
     <li>KIO::put(url, -1, true /*overwrite*/, false /*no resume*/, false) -&gt; KIO::put(url, -1, KIO::Overwrite | KIO::HideProgressInfo)</li>
     <li>KIO::del(url, false /*shred, feature removed*/, false) -&gt; KIO::del(url, KIO::HideProgressInfo)</li>
     <li>KIO::listDir(url, true /*show progress info*/, true /*include hidden files*/) -&gt; KIO::del(url, KIO::DefaultFlags, true /*include hidden files*/)</li>
  </ul>
</li>
</ul>

<h4>KIO::UDSEntry</h4>
<ul>
<li>UDSEntry is now a hash-based class instead of a list. Use the methods stringValue()
and numberValue() to retrieve fields directly, no loop is needed anymore.
See the UDSEntry documentation for code examples.</li>
<li>Also note that UDSEntryListConstIterator is now UDSEntryList::ConstIterator;
see the UDSEntryList documentation for a full code example of iterating through
a listDir result.</li>
<li>For kioslaves: replace every three lines like
 <pre>atom.m_uds = KIO::UDS_SIZE;
      atom.m_long = buff.st_size;
      entry.append( atom );</pre>
  with the line <pre>entry.insert( KIO::UDSEntry::UDS_SIZE, buff.st_size );</pre></li>
</ul>


<h4>KIO::RenameDialog</h4>
<ul>
<li>KIO::RenameDlg was renamed to KIO::RenameDialog and the header moved from renamedlg.h to renamedialog.h</li>
<li>void b0Pressed() renamed to void cancelPressed()</li>
<li>void b1Pressed() renamed to void renamePressed()</li>
<li>void b2Pressed() renamed to void skipPressed()</li>
<li>void b3Pressed() renamed to void autoSkipPressed()</li>
<li>void b4Pressed() renamed to void overwritePressed()</li>
<li>void b5Pressed() renamed to void overwriteAllPressed()</li>
<li>void b6Pressed() renamed to void resumePressed()</li>
<li>void b7Pressed() renamed to void resumeAllPressed()</li>
<li>void b8Pressed() renamed to void suggestNewNamePressed()</li>
</ul>

<h4>KIO::RenameDialogPlugin</h4>
<ul>
<li>RenameDlgPlugin was renamed to KIO::RenameDialogPlugin and the header moved from renamedlgplugin.h to renamedialogplugin.h</li>
<li>The ServiceType was changed from RenameDlg/Plugin to RenameDialog/Plugin. Make sure to update your .desktop fiel</li>
</ul>

<h4>KIO::PasswordDialog</h4>
<ul>
<li>KIO::PassDlg was renamed to KIO::PasswordDialog and the header moved from passdlg.h to passworddialog.h</li>
</ul>

<h4>KIO::PreviewJob</h4>
<ul>
  <li>KIO::PreviewJob works with KFileItems by value rather than by pointer, now that KFileItem is refcounted.</li>
  <li>The two signals changed accordingly:
    <ul>
      <li>gotPreview(const KFileItem*, const QPixmap&amp;) -&gt; gotPreview(const KFileItem&amp;, const QPixmap&amp;)</li>
      <li>failed(const KFileItem*) -&gt; failed(const KFileItem&amp;</li>
    </ul>
  </li>
  <li>In the slots connected to those signals, don't compare KFileItem pointers! If you need to find the KFileItem
      in a list, compare the url() of the items in the list with the url() of the item passed to the slot.</li>
</ul>

<h4>KIO::SkipDialog</h4>
<ul>
<li>KIO::SkipDlg was renamed to KIO::SkipDialog and the header moved from skipdlg.h to skipdialog.h</li>
</ul>

<h4>KIO::Observer</h4>
<ul>
<li>openPassDlg was renamed to openPasswordDialog</li>
<li>open_RenameDlg to open_RenameDialog</li>
<li>open_SkipDlg to open_SkipDialog</li>
</ul>

<h4>KIO::SlaveBase</h4>
<ul>
<li>openPassDlg was renamed to openPasswordDialog</li>
</ul>

<h4>KIO::TCPSlaveBase</h4>
<ul>
<li>Removed distinction of SSL and TLS mode. You can now tell the slave via the constructor to start SSL right after connecting which is what was previously called "SSL mode". "TLS" is the same as starting SSL (using startSsl()) later than immediately after connecting. You can query if a slave was created with immediate SSL start enabled by calling isAutoSsl().</li>
<li>Removed the notion of a default port. It was not used for any internal calculations - you can emulate it simply by having an "m_defaultPort" or similar member in a subclass.</li>
<li>Renamed isConnectionValid() to isConnected().</li>
<li>Renamed setBlockConnection() to setBlocking().</li>
<li>Renamed closeDescriptor() to disconnectFromHost().</li>
<li>startSsl() (formerly startTLS()) now just returns a bool instead of a numeric error code.</li>
<li>connectToHost() lost its sendError parameter. It was only used for proxy support hacks in the HTTP ioslave and nowhere else. Proxy support is better implemented inside TCPSlaveBase than in protocol slaves.</li>
<li>Metadata changes that should only concern the HTTP ioslave and the HTML KPart.</li>
</ul>

<h4>KMimeMagic</h4>
<ul>
<li>The KMimeMagic class is gone. Use the KMimeType API instead:
<ul>
  <li>KMimeMagic::self()-&gt;findFileType(path) -&gt; KMimeType::findByPath(path) (preferred) or KMimeType::findByFileContent(path) (if only the content should be considered, but this isn't always reliable)</li>
  <li>KMimeMagic::self()-&gt;findBufferType(data) -&gt; KMimeType::findByContent(data)</li>
  <li>KMimeMagic::self()-&gt;findBufferFileType(data,name) -&gt; KMimeType::findByNameAndContent(name,data)</li>
</ul>
</li>
<li>.. and replace result-&gt;mimeType() with mime-&gt;name().</li>
</ul>

<h4>KMimeType</h4>
<ul>
<li>KMimeType::pixmap() has been deprecated (for core/gui separation), use iconName() or iconName(url)
and KIconLoader::loadMimeTypeIcon with that icon name.</li>
<li>KMimeType::pixmapForURL -&gt; KIO::pixmapForURL</li>
<li>KMimeType::comment(KUrl,bool) -&gt; KIO::comment(KUrl)</li>
<li>KMimeType::diagnoseFileName has been replaced with KMimeType::extractKnownExtension which returns the extension only, not the pattern</li>
<li>KMimeType::mimeType(someName) now behaves like KServiceType::serviceType(someName), i.e. it returns 0 if that name doesn't exist,
instead of returning the application/octet-stream mimetype. Test for null!</li>
<li>iconForURL has been deprecated, will possibly be removed for KDE 4.0 final, use iconNameForURL instead</li>
<li>KMimeType::findFormatByFileContent has been removed. Use KMimeType::isBinaryData instead.</li>
</ul>

<h4>KMimeTypeResolver</h4>
<ul>
<li>The previous KMimeTypeResolver has been renamed to K3MimeTypeResolver.</li>
<li>A new KMimeTypeResolver must be used together with a KDirModel.</li>
</ul>

<h4>KOpenWithDlg</h4>
<ul>
<li>Has been renamed to KOpenWithDialog. Use #include &lt;kopenwithdialog.h&gt;</li>
</ul>

<h4>KPropertiesDialog</h4>
<ul>
<li>Doesn't have autoShow support in its constructors anymore, but still has autodelete behavior.</li>
<li>Ensure any new is followed by show or exec. Or use KPropertiesDialog::showDialog where possible.</li>
<li>The header file was renamed from kpropsdlg.h to kpropertiesdialog.h
<li>The ServiceType was renamed from KPropsDlg/Plugin to KPropertiesDialog/Plugin. Make sure to update your .desktop files </li>
</ul>

<h4>KPropertiesDialogPlugin</h4>
<ul>
<li>KPropsPage or KPropsDlgPlugin was renamed to KPropertiesDialogPlugin</li>
<li>The header file was renamed from kpropsdlg.h to kpropertiesdialog.h</li>
</ul>

<h4>KProtocolInfo</h4>
<ul>
<li>Many static methods have been moved to KProtocolManager (which is in kio)
so that kprotocolinfo itself could be moved to kdecore:
  <ul>
    <li>KProtocolInfo::supportsListing(url or protocol) -&gt; KProtocolManager::supportsListing(url)</li>
    <li>KProtocolInfo::supportsReading(url or protocol) -&gt; KProtocolManager::supportsReading(url)</li>
    <li>KProtocolInfo::supportsDeleting(url or protocol) -&gt; KProtocolManager::supportsDeleting(url)</li>
    <li>etc.</li>
  </ul>
</li>
<li>The deprecated methods taking a QString protocol as input have been removed, make sure
to pass a KUrl to most methods instead.</li>
</ul>

<h4>KRun</h4>
<ul>
<li>the constructor needs a second parameter (a widget) now</li>
</ul>

<h4>KURLBar</h4>
<ul>
<li>renamed to KUrlBar</li>
</ul>

<h4>KURLComboBox</h4>
<ul>
<li>Renamed to KUrlComboBox</li>
<li>All usage of QPixmap has been replaced by usage of QIcon</li>
<li>getPixmap() --&gt; getIcon()</li>
</ul>

<h4>KURLCompletion</h4>
<ul>
<li>Renamed to KUrlCompletion</li>
</ul>

<h4>KURLPixmapProvider</h4>
<ul>
<li>Renamed to KUrlPixmapProvider</li>
</ul>

<h4>KURLRequester</h4>
<ul>
<li>renamed to KUrlRequester</li>
<li>setCaption is gone, use setWindowTitle instead</li>
<li>Renamed setURL() to setUrl(), per KDE naming policy</li>
<li>Ported to use KUrl instead of QString.  Thus, the constructors, setUrl(), url(), and urlChanged() all use KUrl.</li>
<li>Removed showLocalProtocol() and setShowLocalProtocol(); this is now always false (the user never sees file:///)</li>
</ul>

<h4>KService</h4>
<ul>
<li>KService was moved to libkdecore</li>
<li>KService::rebuildKSycoca -&gt; KBuildSycocaProgressDialog::rebuildKSycoca</li>
<li>KService::pixmap was removed due to icon support being moved to libkdeui. Instead use KService::icon() and KIconLoader directly. Usually you can simply use the KIconLoader returned by KApplication::iconLoader() for this.</li>
</ul>

<h4>KServiceType</h4>
<ul>
<li>KServiceType::offers() -&gt; KServiceTypeTrader::self()-&gt;query()</li>
<li>The behavior of KServiceType::serviceType() has changed: it now only returns real service types, and no more mimetypes. For mimetypes, use KMimeType::mimeType().</li>
<li>Similarly, allServiceTypes() only returns real service types, no more mimetypes.</li>
</ul>

<h4>KServiceTypeProfile</h4>
<ul>
<li>This class has been moved to kservicetypeprofile.h and is mostly internal now. Use KServiceTypeTrader or KMimeTypeTrader instead.</li>
<li>KServiceTypeProfile::preferredService is now KMimeTypeTrader::self()-&gt;preferredService or KServiceTypeTrader::self()-&gt;preferredService</li>
<li>KServiceTypeProfile::offers is now KMimeTypeTrader::self()-&gt;query or KServiceTypeTrader::self()-&gt;query</li>
</ul>

<h4>KTrader</h4>
<ul>
<li>KTrader has been split up into two classes: KServiceTypeTrader and KMimeTypeTrader.</li>
<li>So KTrader::query() should be ported to KMimeTypeTrader::query() when it's about mimetypes
(finding the application or part for a given mimetype), and to KServiceTypeTrader::query() when
it's about pure service types (plugins, kcmodules, etc.)</li>
<li>In other terms, KTrader::query(1 or 2 args) -&gt; KServiceTypeTrader::query and
                    KTrader::query(4 args but the last one was always QString::null) -&gt; KMimeTypeTrader::query</li>
<li>In both cases, query() now returns KService::List instead of an OfferList, adjust the type of the variable</li>
<li>Constraints like "'RenameDlg/Plugin' in ServiceTypes" should be turned into
  KMimeTypeTrader::self()-&gt;query(mimetype,"RenameDlg/Plugin")</li>
</ul>

<h4>PasswordDialog</h4>
<ul>
  <li>void setEnableUserField( bool enable, bool=false ) removed use setUsernameReadOnly( !enable )</li>
</ul>


<h4>UIServer</h4>
<ul>
  <li>QByteArray openPassDlg( const KIO::AuthInfo &gt;info ); removed. Use KIO::PasswordDialog::getNameAndPassword</li>
</ul>

<h4 align="right"><a href="#TOC">Return to the Table of Contents</a></h4>

<h3><a name="kparts">Changes in kparts</a></h3>

<h4>BrowserExtension</h4>
<ul>
<li>The following signals have changed:
  <ul>
      <li>openUrlRequest(const KUrl &amp;, const KParts::URLArgs&amp;) -&gt; openUrlRequestDelayed(const KUrl &amp;, const KParts::OpenUrlArguments&amp;, const KParts::BrowserArguments&amp;)</li>
      <li>openUrlRequestDelayed(const KUrl &amp;, const KParts::URLArgs&amp;) -&gt; openUrlRequestDelayed(const KUrl &amp;, const KParts::OpenUrlArguments&amp;, const KParts::BrowserArguments&amp;)</li>
      <li>The two createNewWindow signals have been merged into a single one: createNewWindow(url, args, browserArgs [, windowArgs, &amp;part] )</li>
      <li>The popupMenu signals have been greatly simplified, 2 signals instead of 5. URLArgs has been split into OpenUrlArguments and BrowserArguments; the KXMLGUIClient argument has been removed, and the ActionGroupMap mechanism replaces it.</li>
  </ul>
</li>
<li>Because of the URLArgs split, make sure to replace BrowserExtension::setUrlArgs with BrowserExtension::setBrowserArguments + part-&gt;setArguments</li>
</ul>

<h4>BrowserHostExtension</h4>
<ul>
<li>The following virtal methods have changed:
  <ul>
      <li>openURLInFrame(const KUrl &amp;, const KParts::URLArgs&amp;) -&gt; openUrlInFrame(const KUrl &amp;, const KParts::OpenUrlArguments&amp;, const KParts::BrowserArguments&amp;)</li>
  </ul>
</li>
</ul>

<h4>BrowserRun</h4>
<ul>
    <li>The constructor now takes args and browserArgs, see KParts::Part</li>
    <li>All the protected members have been turned into methods</li>
    <li>BrowserRun::isExecutable obsoleted by KRun::isExecutable</li>
    <li>suggestedFilename -&gt; suggestedFileName</li>
</ul>

<h4>ComponentFactory</h4>
<ul>
<li>createInstanceFromFactory is now KPluginFactory::create&lt;T&gt;</li>
<li>createInstanceFromLibrary is now KLibLoader::createInstance&lt;T&gt;</li>
<li>createInstanceFromService is now KService::createInstance&lt;T&gt;</li>
<li>createInstanceFromQuery is now KServiceTypeTrader::createInstanceFromQuery&lt;T&gt;</li>
<li>All the error codes like KParts::ComponentFactory::ErrNoServiceFound have moved to KLibLoader</li>
</ul>

<h4>KParts::URLArgs</h4>
<ul>
<li>URLArgs has been splitted into OpenUrlArguments and BrowserArguments.
  <ul>
      <li>URLArgs.reload -&gt; OpenUrlArguments.reload()/setReload()</li>
      <li>URLArgs.xOffset -&gt; OpenUrlArguments.xOffset()/setXOffset()</li>
      <li>URLArgs.yOffset -&gt; OpenUrlArguments.yOffset()/setYOffset()</li>
      <li>URLArgs.serviceType -&gt; OpenUrlArguments.mimeType()/setMimeType()</li>
      <li>URLArgs.metaData() -&gt; OpenUrlArguments.metaData()</li>
      <li>For anything else (docState, frameName, postData, setDoPost, setContentType etc.): URLArgs -&gt; BrowserArguments</li>
  </ul>
</li>
<li>The BrowserArguments are still set and retrieved from the BrowserExtension, however the OpenUrlArguments are simply stored in KParts::ReadOnlyPart. So for instance:
  <ul>
      <li>m_extension-&gt; urlArgs().xOffset -&gt; arguments().xOffset()</li>
  </ul>
  </li>
</ul>

<h4 align="right"><a href="#TOC">Return to the Table of Contents</a></h4>

<h3><a name="kded">Changes in kded</a></h3>

<ul>
 <li>The class KDEDModule is now part of libkdecore so that kded modules can link without undefined symbols.
  A number of apparently unused methods in KDEDModule have been commented out, contact
  kde-core-devel if you need those after all.</li>
 <li>Note that the signature for the create_xyz() call has changed, simply remove all arguments from it,
  and from your kded module's constructor</li>
</ul>

<h4 align="right"><a href="#TOC">Return to the Table of Contents</a></h4>

<h3><a name="kspell">Changes in kspell</a></h3>

<h4>KSpell</h4>

<ul>
<li>All of the features of KSpell and KSpell2 have been moved to Sonnet</li>
<li>The KSpell2's initialization procedure of:
<pre>
KSpell2::Loader::Ptr loader = KSpell2::Loader::openLoader();
KSpell2::Speller *speller = loader-&gt;createSpeller("en_US");
if (speller) {
   if (speller-&gt;isMisspelled("word")) {
          //do something
   }
}
</pre>
has been replaced with:
<pre>
Sonnet:Speller speller("en_US");
if (speller.isMisspelled("word")) {
    //do something
}
</pre>
</li>
<li>The configuration class of KSpell2 (KSpell2::Settings) have been
folded back into Sonnet::Speller.</li>
<li>Sonnet doesn't automatically overwrite configuration anymore. To
  save and restore setting from a KConfig file one has to use
<pre>
  Sonnet::Speller::save(KConfig *config);
  Sonnet::Speller::restore(KConfig *config);
</pre>
methods.</li>
<li>KSpell2::Filter has been temporarily removed from the public api.
Proper text segmentation api is planned for KDE 4.1</li>
</ul>

<h4 align="right"><a href="#TOC">Return to the Table of Contents</a></h4>

<h3><a name="kdnssd">Changes in kdnssd</a></h3>

<h4>DomainBrowser</h4>
<ul>
<LI>Recursive browsing feature has been removed removed</LI>
<li>Constructor that takes list of domains and does not use configuration has been removed</li>
<li>It is now possible to search for browsing or publishing domains</li>
</ul>

<h4>ServiceBase</h4>
<ul>
<LI>Service properties are stored in QMap&lt;QString,QByteArray&gt; instead of QMap&lt;QString,QString&gt;.</LI>
<LI>This class is not used to pass domains or service types anymore</LI>
</ul>

<h4>ServiceBrowser</h4>
<ul>
<LI>Browsing multiple types or multiple domains at once has been removed</LI>
<li>In KDE3 ServiceBrowser created with default constructor (for example ServiceBrowser("_http._tcp") ) browsed all configured domains. Now it only browses default one. To browse other domains create more ServiceBrowser objects</li>
<li>It is now possible to specify subtype to narrow searching scope (for example "anon" for only anonymous FTP servers)</li>
<li>Browsing for service types is now done using new class ServiceTypeBrowser</li>
</ul>

<h4>RemoteService</h4>
<ul><LI>Creating RemoteService from URL or DNS label is no longer supported</LI></ul>

<h4>PublicService</h4>
<ul>
<LI>Optional list of subtypes can be passed to constructor.</LI>
<li>Encoding service into URL is no longer supported</li>
</ul>

<h4>Query</h4>
<ul>
<LI>This class has been merged into ServiceBrowser</LI></ul>

<h4 align="right"><a href="#TOC">Return to the Table of Contents</a></h4>

<h3><a name="khtmlpart">API-cleanups in KHTML</a></h3>

<h4 align="right"><a href="#TOC">Return to the Table of Contents</a></h4>

<h3><a name="kfile">Changes in kfile</a></h3>

<h4>KUrlRequesterDialog</h4>
<ul>
<li>KUrlRequesterDlg was renamed to KUrlRequesterDialog</li>
<li>The header was renamed from kurlrequesterdlg.h to kurlrequesterdialog.h</li>
</ul>

<h4>KDirOperator</h4>
<ul>
<li>KFileView* view() const -&gt; QAbstractItemView* view() const</li>
<li>void setView(KFileView *view) -&gt; void setView(QAbstractItemView *view)</li>
<li>const KFileItemList* selectedItems() const -&gt; QList&lt;KFileItem&gt; selectedItems() const</li>
<li>KFileView* createView(QWidget *parent, KFile::FileView view) -&gt; QAbstractItemView* createView(QWidget *parent, KFile::FileView view)</li>
<li>QWidget* viewWidget() const; has been removed, use QAbstractItemView* view() instead.</li>
<li>void setPreviewWidget(const QWidget *w) -&gt; void setPreviewWidget(KPreviewWidgetBase *w)</li>
<li>KIO::DeleteJob* del(const KFileItemList&amp; items, QWidget *parent,
bool ask = true, bool showProgress = true) -&gt; KIO::DeleteJob* del(const QList&lt;KFileItem&gt;&amp; items, QWidget *parent = 0,
bool ask = true, bool showProgress = true)</li>
<li>KIO::DeleteJob* del(const KFileItemList&amp; items, bool ask = true, bool showProgress = true) has been removed. Use del(...)
with parent parameter instead.</li>
<li>KIO::CopyJob* trash(const KFileItemList&amp; items, QWidget *parent,
bool ask = true, bool showProgress = true) -&gt; KIO::CopyJob* trash(const QList&lt;KFileItem&gt;&amp; items, QWidget *parent,
bool ask = true, bool showProgress = true)
</ul>

<h4>KFileView</h4>
<ul>
  <li>KFileView doesn't exist anymore, see the new itemview based KDirOperator.</li>
  <li>For ease of porting, kde3support provides K3FileView, but don't expect it to still be useable in a KDirOperator.</li>
</ul>

<h4>KFileWidget</h4>
<ul>
<li>void setPreviewWidget(const KPreviewWidgetBase *w) -&gt; void setPreviewWidget(KPreviewWidgetBase *w)</li>
</ul>

<h4 align="right"><a href="#TOC">Return to the Table of Contents</a></h4>

<h3><a name="kdesu">Changes in kdesu</a></h3>

All classes of kdesu are now in the <tt>KDESu</tt> namespace


<h4 align="right"><a href="#TOC">Return to the Table of Contents</a></h4>

<h3><a name="kcontrol">Changes in KControl</a></h3>
<ul>
  <li>The Button enum in KCModule only contains the Help, Default and Apply
  values. The other buttons are not optional. If your KCM specified the button
  flags just remove everything except those three.</li>
  <li>The functions setRootOnlyMsg, rootOnlyMsg, setUseRootOnlyMsg and
  useRootOnlyMsg have been renamed to
  setRootOnlyMessage, rootOnlyMessage, setUseRootOnlyMessage and
  useRootOnlyMessage.</li>
  <li>KCModules need to have Type=Service and ServiceTypes=KCModule in the
  .desktop file now - was Type=Application before</li>
  <li>KCModules that should show up in KControl or kcmshell --list need to have
  X-KDE-ParentApp=kcontrol or kinfocenter</li>
  <li>If the KCModule should be used by kcminit you have to add KCModuleInit to
  ServiceTypes (i.e. ServiceTypes=KCModule,KCModuleInit then)</li>
  <li>The kcm_ prefix in X-KDE-Library is now optional (in KDE3 the
  X-KDE-Library value was automatically prefixed with kcm_)</li>
  <li>If the kcminit code is in a different lib than the other KCM code the
  X-KDE-Init-Library was used. The library name has to be prefixed with kcminit_
  now, but the prefix is optional in the .desktop file.</li>
  <li>The kcminit symbol now has to be prefixed with kcminit_ (in the code). The
  rest of the symbol name is specified with X-KDE-Init-Symbol (was X-KDE-Init
  before).</li>
  <li>It is now possible to use multiple K_EXPORT_GENERIC_FACTORY calls in one
  library. The first parameter to the macro has to be the same as
  X-KDE-FactoryName then.</li>
  <li>KCModule does no longer take a name argument, but directly a KInstance (having the correct
  name for the translations to work.</li>
  <li>The X-KDE-RunAsRoot and X-KDE-IsHiddenByDefault keys are removed.</li>
  <li>KCModules will not be embedded running with root privileges anymore.
  Instead the GUI code will run with user privileges as every other KCM. Only in
  order to write or call programs should the KCM elevate its privileges.</li>
</ul>

<h4 align="right"><a href="#TOC">Return to the Table of Contents</a></h4>

<h3><a name="kicker">Panel Applets and Extensions</a></h3>

<h4 align="right"><a href="#TOC">Return to the Table of Contents</a></h4>

<!-- ### TODO: should this not be a KDE3SUPPORT <h3> section? -->
<ul>
<li>KDockWidgets -&gt; kde3support K3DockWidget</li>
<li>KParts::DockWindow -&gt; kde3support KParts::DockWindow3</li>
<li>KMDI* --&gt; kdeSupport K3MDI*</li>
</ul>

<h3>libkmid</h3>
<ul>
<li>Moved to kdemultimedia, where (at the moment) it is only used by kmid.</li>
</ul>

<h3><a name="kscreensaver">KScreensaver</a></h3>

<h4>libkscreensaver</h4>
<ul>
<li>Moved to kdebase/workspace/kscreensaver</li>
</ul>

<h4 align="right"><a href="#TOC">Return to the Table of Contents</a></h4>

<h3><a name="i18n">I18N</a></h3>

<h4>Messages.sh files</h4>
<p>Instead of the "messages" target of the Makefile.am files,
KDE4 uses now Bash scripts with Messages.sh file names.
The Perl script trunk/l10n-kde4/scripts/conversion/Makefile2Messages.pl
can be used as an half-automatic conversion. (Please verify the result!)</p>

<h4>rc.cpp file</h4>
<p>The rc.cpp is now <em>always</em> generated. It is mandatory to have it as
parameter of the $XGETTEXT if you are using the class KAboutData and if
you are not explicitly setting KAboutData::setTranslator.</p>

<h4>Gettext 0.16.1</h4>
<p>Scripty uses
<a href="http://gnu.org/software/gettext/gettext.html">xgettext 0.16.1</a>
for extracting
messages out of the source code. This is a huge step from the former xgettext 0.10.35-kde
used in KDE3.</p>
<p>Important changes:</p>
<ul>
<li>If you define your own keywords (-k parameter of xgettext), you probably
need to adapt them, as xgettext does not automatically know about the
1, 2 or 3 parameter versions.</li>
<li>You cannot have two similar messages, one being a normal message and
the other being the singular form of a plural-form message. For Gettext, this is
the same message and therefore this creates problems. (Note: there is not
any similar problem with contexts.)</li>
</ul>

<h4>Translator Comments</h4>

<p>Translator comments are a feature that already existed in KDE3, but which
was seldom used.</p>
<ul>
<li>Translator comment are code comments before a i18n call. To avoid
extracting comments that are of little interest for translators, translator
comemnts must start with // i18n: or /* i18n: to mark such comments.
(Note: translator comments starting with TRANSLATORS (all upper case), as it is Gettext's habit are not supported by KDE4.)</li>
<li>As in Gettext 0.16.1, contexts are supposed to be short, please consider
using a translator comment instead of a context to give long hints to translators.</li>
</ul>
<pre>
// i18n: this is a test sentence
i18n("The quick brown fox jumps over the lazy dog");
</pre>

<h4>i18n calls</h4>

<p>The basic call, a message without arguments, context or plural, remains as is:</p>
<pre>
i18n("Just plain info");
</pre>

<p>If there are arguments, <code>arg</code> methods are no longer used to substitute the placeholders. Instead, arguments are added to the call:</p>
<pre>
i18n("%1 has scored %2", playerName, score);
</pre>
<p>Arguments can be of several integer types, <code>double</code>, <code>QString</code>, <code>QChar</code> (and perhaps more in the future).</p>

<p>Context call now has a different name, <code>i18nc</code>, and takes arguments in the same way:</p>
<pre>
i18nc("Player name - score", "%1 - %2", playerName, score);
</pre>

<p>Plural call is renamed to <code>i18np</code> and does away with <code>%n</code> placeholder, all being numbered instead:</p>
<pre>
i18np("One image in album %2", "%1 images in album %2", n, albumName);
</pre>
<p>The plural form is decided by first integer-valued argument.</p>

<p>There is one new call variant, the context-plural call:</p>
<pre>
i18ncp("Personal file", "One file", "%1 files", n);
</pre>

<p><code>i18n*</code> calls are realized as templates, and so will take at most some finite number of arguments.</p>

<p>Notes on placeholder substitution:</p>
<ul>
<li>Placeholders are substituted in one pass, so no need to worry about argument itself containing a placeholder.</li>
<li>All same-numbered placeholders are substituted with same argument. This is in contrast to what single-argument <code>arg</code> methods of <code>QString</code> do.</li>
<li>Placeholders directly index arguments: they should be numbered from 1 upwards, without gaps in the sequence so that each argument is indexed. The exception is plural-deciding argument in plural call, where it is allowed to drop its placeholder in either singular or plural form.</li>
</ul>

<p>Sometimes you might need old-style syntax for argument substitution. For example, when there are many arguments, or, more importantly, when it is convenient to <i>defer</i> substitution of arguments. This is possible using new <code>ki18n</code> call, with <code>subs</code> methods for argument substitution and <code>toString</code> method for finalization:</p>
<pre>
KLocalizedString ks = ki18n("The Foo-machine reported: %1");
case (fooErrCode) {
    ERR_OXI: ks.subs(i18n("Out of oxidizer")); break;
    ERR_HYD: ks.subs(i18n("Out of hydrazine")); break;
    ERR_PIL: ks.subs(i18n("Out of pilots")); break;
    default: ks.subs(i18n("Unknown catastrophe"));
}
QString scream = ks.toString();
</pre>

<p>Note that <code>ki18n</code> returns object of type <code>KLocalizedString</code>, hence the <code>toString</code> method for conversion to plain <code>QString</code>. The <code>ki18n</code> call should be used rarely; the previous example can as well be rewritten to:</p>
<pre>
QString problem;
case (fooErrCode) {
    ERR_OXI: problem = i18n("Out of oxidizer"); break;
    ...
}
QString scream = i18n("The Foo-machine reported: %1", problem);
</pre>

<p>Another case when you might want to use <code>ki18n</code> is if you want to format arguments. <code>subs</code> methods can take formatting arguments, similar to those of <code>arg</code> methods in <code>QString</code>. You should <i>never</i> use methods other than <code>subs</code> to format numbers in localized messages:</p>
<pre>
i18n("Rounds: %1", myNumberFormat(n, 8)); // bad, number not localized
ki18n("Rounds: %1").subs(n, 8).toString(); // good, number is localized
</pre>

<p>There is a context, plural and context-plural variant of <code>ki18n</code> as well:</p>
<pre>
ki18nc("No function", "None").toString();
ki18np("One file found", "%1 files found").subs(n).toString();
ki18ncp("Personal file", "One file", "%1 files").subs(n).toString();
</pre>

<p>If you need translation using locale (KLocale object) other than the default, you can use overloaded <code>toString</code> method which takes pointer to locale object (this replaces <code>KLocale::translate(...)</code> from KDE3):</p>
<pre>
KLocale *myLocale;
...
ki18n("Welcome").toString(myLocale);
</pre>

<p>There is a script for semi-automatic conversion of KDE 3 code, <code>i18nk34conv.pl</code> in <code>trunk/l10n-kde4/scripts/conversion/</code>. It will convert most of the calls automatically, and mark the places that need manual review. There is also the script <code>i18ncheckarg.pl</code> in <code>trunk/l10n-kde4/scripts/conversion/</code>, which will check whether placeholders and arguments match. Use it to catch and correct deferred substitutions (like in the examples above). Both these scripts you can just run without any arguments in top directory of your sources (but you can also specify paths or filenames as arguments). <i>Do not</i> run conversion script twice on same sources!</p>

<h4 align="right"><a href="#TOC">Return to the Table of Contents</a></h4>

<h3><a name="kssl">Changes in KSSL</a></h3>

<h4>KSSLCertDialog</h4>
<ul>
<li>KSSLCertDlg was renamed to KSSLCertDialog. The header was renamed to ksslcertdialog.h</li>
</ul>

<h4>KSSLInfoDialog</h4>
<ul>
<li>KSSLInfoDlg was renamed to KSSLInfoDialog</li>
<li>ksslinfodlg.h was moved to ksslinfodialog.h</li>
</ul>

<h4 align="right"><a href="#TOC">Return to the Table of Contents</a></h4>

<h3><a name="mimetypes">Changes in mime types names</a></h3>

<p>KDE 4 switched to the XDG mime types, thus the names for some mime types have changed.</p>

<p>The following list contains the renamings from the KDE mime types to the XDG ones.</p>

<p>Notes:</p>
<ul>
  <li>(alias) means that the old KDE mime type is an alias in the corresponding XDG mime type, so the conversion is not strictly needed (although suggested)</li>
</ul>

<table border="1" summary="Table of KDE vs. XDG mime types">
<tr>
  <th>Old KDE mime type</th>
  <th>XDG mime type</th>
</tr>
<tr>
  <td>application/chm</td>
  <td>application/x-chm</td>
</tr>
<tr>
  <td>application/fits</td>
  <td>image/x-fits</td>
</tr>
<tr>
  <td>application/java</td>
  <td>application/x-java</td>
</tr>
<tr>
  <td>application/mathml+xml</td>
  <td>text/mathml</td>
</tr>
<tr>
  <td>application/msexcel</td>
  <td>application/vnd.ms-excel (alias)</td>
</tr>
<tr>
  <td>application/mspowerpoint</td>
  <td>application/vnd.ms-powerpoint (alias)</td>
</tr>
<tr>
  <td>application/ms-tnef</td>
  <td>application/vnd.ms-tnef</td>
</tr>
<tr>
  <td>application/pgp</td>
  <td>application/pgp-encrypted (alias)</td>
</tr>
<tr>
  <td>application/vnd.ms-asf</td>
  <td>video/x-ms-asf</td>
</tr>
<tr>
  <td>application/vnd.ms-word</td>
  <td>application/msword (alias)</td>
</tr>
<tr>
  <td>application/vnd.palm</td>
  <td>application/x-palm-database (alias)</td>
</tr>
<tr>
  <td>application/vnd.stardivision.writer-global</td>
  <td>application/vnd.stardivision.writer</td>
</tr>
<tr>
  <td>application/vnd.sun.xml.base</td>
  <td>application/vnd.oasis.opendocument.database</td>
</tr>
<tr>
  <td>application/vnd.sun.xml.writer.master</td>
  <td>application/vnd.sun.xml.writer.global</td>
</tr>
<tr>
  <td>application/wordperfect</td>
  <td>application/vnd.wordperfect (alias)</td>
</tr>
<tr>
  <td>application/x-7z</td>
  <td>application/x-7z-compressed</td>
</tr>
<tr>
  <td>application/x-afm</td>
  <td>application/x-font-afm</td>
</tr>
<tr>
  <td>application/x-applixgraphics</td>
  <td>image/x-applix-graphics</td>
</tr>
<tr>
  <td>application/x-applixspread</td>
  <td>application/x-applix-spreadsheet</td>
</tr>
<tr>
  <td>application/x-applixword</td>
  <td>application/x-applix-word</td>
</tr>
<tr>
  <td>application/x-bz2dvi</td>
  <td>application/x-bzdvi</td>
</tr>
<tr>
  <td>application/x-bzip2</td>
  <td>application/x-bzip (alias)</td>
</tr>
<tr>
  <td>application/x-dbase</td>
  <td>application/x-dbf (alias)</td>
</tr>
<tr>
  <td>application/x-font-ghostscript</td>
  <td>application/x-font-type1</td>
</tr>
<tr>
  <td>application/x-font-ttc</td>
  <td>application/x-font-ttf</td>
</tr>
<tr>
  <td>application/x-gettext</td>
  <td>text/x-gettext-translation (*.po)<br>
      text/x-gettext-translation-template (*.pot)</td>
</tr>
<tr>
  <td>application/x-hancomword</td>
  <td>application/x-hwp</td>
</tr>
<tr>
  <td>application/x-iso</td>
  <td>application/x-cd-image</td>
</tr>
<tr>
  <td>application/x-jar</td>
  <td>application/x-java-archive (alias)</td>
</tr>
<tr>
  <td>application/x-javascript</td>
  <td>application/javascript (alias)</td>
</tr>
<tr>
  <td>application/x-msaccess</td>
  <td>application/vnd.ms-access (alias)</td>
</tr>
<tr>
  <td>application/x-msdos-program</td>
  <td>application/x-ms-dos-executable</td>
</tr>
<tr>
  <td>application/x-msmetafile</td>
  <td>image/x-wmf</td>
</tr>
<tr>
  <td>application/x-ogg</td>
  <td>application/ogg</td>
</tr>
<tr>
  <td>application/x-perl-module</td>
  <td>application/x-perl</td>
</tr>
<tr>
  <td>application/x-python</td>
  <td>text/x-python</td>
</tr>
<tr>
  <td>application/x-rar-compressed</td>
  <td>application/x-rar</td>
</tr>
<tr>
  <td>application/x-tbz</td>
  <td>application/x-bzip-compressed-tar</td>
</tr>
<tr>
  <td>application/x-tgz</td>
  <td>application/x-compressed-tar</td>
</tr>
<tr>
  <td>application/x-troff</td>
  <td>text/troff (alias)</td>
</tr>
<tr>
  <td>application/x-zip</td>
  <td>application/zip</td>
</tr>
<tr>
  <td>application/x-zip-compressed</td>
  <td>application/zip (alias)</td>
</tr>
<tr>
  <td>application/xml-dtd</td>
  <td>text/x-dtd</td>
</tr>
<tr>
  <td>audio/mpegurl</td>
  <td>audio/x-mpegurl (alias)</td>
</tr>
<tr>
  <td>audio/x-midi</td>
  <td>audio/midi (alias)</td>
</tr>
<tr>
  <td>audio/x-mp3</td>
  <td>audio/mpeg (alias)</td>
</tr>
<tr>
  <td>audio/x-oggflac</td>
  <td>audio/x-flac+ogg</td>
</tr>
<tr>
  <td>audio/x-pn-realaudio</td>
  <td>audio/vnd.rn-realaudio (alias)</td>
</tr>
<tr>
  <td>audio/x-speex</td>
  <td>audio/x-speex+ogg</td>
</tr>
<tr>
  <td>audio/x-vorbis</td>
  <td>audio/x-vorbis+ogg</td>
</tr>
<tr>
  <td>audio/vorbis</td>
  <td>audio/x-vorbis+ogg</td>
</tr>
<tr>
  <td>image/fits</td>
  <td>image/x-fits</td>
</tr>
<tr>
  <td>image/jp2</td>
  <td>image/jpeg2000</td>
</tr>
<tr>
  <td>image/jpg</td>
  <td>image/jpeg</td>
</tr>
<tr>
  <td>image/pjpeg</td>
  <td>image/jpeg (alias)</td>
</tr>
<tr>
  <td>image/svg-xml</td>
  <td>image/svg+xml</td>
</tr>
<tr>
  <td>image/svg+xml</td>
  <td>image/svg+xml (*.svg)<br>
      image/svg+xml-compressed (*.svgz)</td>
</tr>
<tr>
  <td>image/x-bmp</td>
  <td>image/bmp</td>
</tr>
<tr>
  <td>image/x-djvu</td>
  <td>image/vnd.djvu (alias)</td>
</tr>
<tr>
  <td>image/x-portable-greymap</td>
  <td>image/x-portable-graymap</td>
</tr>
<tr>
  <td>image/x-raw</td>
  <td>image/x-dcraw (general mime type)<br><br>
      Specific mime types (all subclasses of image/x-dcraw):<br>
      image/x-panasonic-raw (*.raw)<br>
      image/x-kodak-dcr (*.dcr)<br>
      image/x-adobe-dng (*.dng)<br>
      image/x-canon-crw (*.crw *.cr2)<br>
      image/x-nikon-nef (*.nef)<br>
      image/x-minolta-mrw (*.mrw)<br>
      image/x-kodak-k25 (*.k25)<br>
      image/x-kodak-kdc (*.kdc)<br>
      image/x-olympus-orf (*.orf)<br>
      image/x-pentax-pef (*.pef)<br>
      image/x-fuji-raf (*.raf)<br>
      image/x-sony-sr2 (*.sr2)<br>
      image/x-sony-srf (*.srf)<br>
      image/x-sigma-x3f (*.x3f)<br>
      other extensions that were part of image/x-raw: image/x-kde-raw
  </td>
</tr>
<tr>
  <td>image/x-targa</td>
  <td>image/x-tga</td>
</tr>
<tr>
  <td>image/x-vnd.adobe.photoshop</td>
  <td>image/x-psd</td>
</tr>
<tr>
  <td>image/x-xbm</td>
  <td>image/x-xbitmap</td>
</tr>
<tr>
  <td>image/x-xcf-gimp</td>
  <td>image/x-xcf</td>
</tr>
<tr>
  <td>image/x-xpm</td>
  <td>image/x-xpixmap</td>
</tr>
<tr>
  <td>text/docbook</td>
  <td>application/docbook+xml</td>
</tr>
<tr>
  <td>text/javascript</td>
  <td>application/javascript (alias)</td>
</tr>
<tr>
  <td>text/rss</td>
  <td>application/rss+xml (alias)</td>
</tr>
<tr>
  <td>text/rtf</td>
  <td>application/rtf</td>
</tr>
<tr>
  <td>text/x-csv</td>
  <td>text/csv</td>
</tr>
<tr>
  <td>text/x-diff</td>
  <td>text/x-patch</td>
</tr>
<tr>
  <td>text/x-latex</td>
  <td>text/x-tex</td>
</tr>
<tr>
  <td>text/xml</td>
  <td>application/xml (alias)</td>
</tr>
<tr>
  <td>text/x-mswinurl</td>
  <td>application/x-mswinurl</td>
</tr>
<tr>
  <td>text/x-vcalendar</td>
  <td>text/calendar (alias)</td>
</tr>
<tr>
  <td>text/x-vcard</td>
  <td>text/directory (alias)</td>
</tr>
<tr>
  <td>text/x-xslt</td>
  <td>application/xslt+xml</td>
</tr>
<tr>
  <td>video/avi</td>
  <td>video/x-msvideo</td>
</tr>
<tr>
  <td>video/x-ogm</td>
  <td>video/x-ogm+ogg</td>
</tr>
<tr>
  <td>video/x-theora</td>
  <td>video/x-theora+ogg</td>
</tr>
</table>

<h4 align="right"><a href="#TOC">Return to the Table of Contents</a></h4>

<h3><a name="knewstuff">Changes in KNewStuff</a></h3>

<h4>General</h4>
KNewStuff is replaced with KNewStuff2. The API for applications has changed
completely, as the library is a rewrite and not an update.
Do not inherit from any class, use only KNS::Engine.
All application-specific properties especially about what to do with
downloaded files are configured in *.knsrc files; have a look at
knewstuff/doc/porting.txt and knewstuff/doc/tutorial.txt.

<h4>Upload</h4>
<ul>
<li>use <pre>KNS::Entry *entry = KNS::Engine::uploadDialogModal()</pre></li>
<li>do something with entry, if needed</li>
</ul>

<h4>Download</h4>
<ul>
<li>use <pre>KNS::Entry::List entries = KNS::Engine::downloadDialogModal()</pre></li>
<li>do something with the entries, if needed</li>
</ul>

<h4 align="right"><a href="#TOC">Return to the Table of Contents</a></h4>


<h3><a name="dcop">DCOP</a></h3>

DCOP has been replaced with D-Bus.<br />
Help with porting from DCOP to D-Bus can be found at
<a href="http://techbase.kde.org/Development/Tutorials/Porting_to_D-Bus">http://techbase.kde.org/Development/Tutorials/Porting_to_D-Bus</a>

<h4 align="right"><a href="#TOC">Return to the Table of Contents</a></h4>


<h3><a name="printing">Printing</a></h3>

<p>libkdeprint has been replaced by enhanced printing support in Qt 4.  Qt 4.3
is still lacking in a print preview feature and a customisable print dialog.
KPrintPreview (kutils) provides the former, and KdePrint::createPrintDialog()
(kdeui) provides the latter, at least for Qt 4.3.2 onwards.</p>

<h4>Porting involves the following</h4>
<ul>
<li>using QPrinter instead of KPrinter</li>
<li>using KdePrint::createPrintDialog() (in kdeui) to get a (customised) QPrintDialog, rather than using KPrinter::setup()</li>
<li>using KPrintPreview (in kutils) for print preview, rather than KPrinter::setPreviewOnly(true)</li>
<li>removing the dependency on libkdeprint</li>
</ul>

<p>If the code uses addDialogPage, you need to change the KPrintDialogPage to a
QWidget, and you can get rid of the getOptions and setOptions methods in favor
of a method for each option (since QPrintDialog doesn't do anything with the widget
except display it). Then the code that called KPrinter::addDialogPage and
KPrinter::setup needs to use KdePrint::createPrintDialog instead and get the options
directly from the widgets passed to createPrintDialog rather than from the QPrinter.
The widgets should also use setWindowTitle() rather than setTitle().</p>

<h4>For more details, see the following:</h4>
<ul>
<li><a href="http://doc.trolltech.com/4.3/printing.html">Printing with Qt</a></li>
<li><a href="http://api.kde.org/4.0-api/kdelibs-apidocs/kutils/html/classKPrintPreview.html">KPrintPreview apidocs</a></li>
<li><a href="http://api.kde.org/4.0-api/kdelibs-apidocs/kdeui/html/namespaceKdePrint.html">KdePrint::createPrintDialog apidocs</a></li>
<li><a href="http://techbase.kde.org/Projects/KDEPrint/KDE4#Porting">KDEPrint Porting on TechBase</a></li>
</ul>


<h4 align="right"><a href="#TOC">Return to the Table of Contents</a></h4>

</body>
</html>