-rwxr-xr-x | scripts/fixincludes | 61 |
1 files changed, 3 insertions, 58 deletions
diff --git a/scripts/fixincludes b/scripts/fixincludes index da8613c..f07965e 100755 --- a/scripts/fixincludes +++ b/scripts/fixincludes | |||
@@ -14,19 +14,19 @@ sub remove_include ($$$); | |||
14 | sub replace_include ($$$); | 14 | sub replace_include ($$$); |
15 | sub fix_duplicates($); | 15 | sub fix_duplicates($); |
16 | sub fix_compat_includes($); | 16 | sub fix_compat_includes($); |
17 | sub fix_unnecessary($); | 17 | sub fix_unnecessary($); |
18 | sub copy_file($$); | 18 | sub copy_file($$); |
19 | sub process_source_file($); | 19 | sub process_source_file($); |
20 | 20 | ||
21 | # some global variables | 21 | # some global variables |
22 | $verbose = 0; # turns on debugging | 22 | $verbose = 1; # turns on debugging |
23 | $modify = 0; # if 1 it should try to fix the files as well | 23 | $modify = 1; # if 1 it should try to fix the files as well |
24 | $experimental = 0; # try&error if an include is obsolete (slow!!) | 24 | $experimental = 1; # try&error if an include is obsolete (slow!!) |
25 | @explicitfiles = (); # filled in if passing files on the command line | 25 | @explicitfiles = (); # filled in if passing files on the command line |
26 | 26 | ||
27 | # statistic variables | 27 | # statistic variables |
28 | $exp_success = 0; | 28 | $exp_success = 0; |
29 | $exp_failure = 0; | 29 | $exp_failure = 0; |
30 | 30 | ||
31 | while (defined ($ARGV[0])) | 31 | while (defined ($ARGV[0])) |
32 | { | 32 | { |
@@ -50,71 +50,16 @@ while (defined ($ARGV[0])) | |||
50 | } | 50 | } |
51 | } | 51 | } |
52 | 52 | ||
53 | $cppExt = "(cpp|cc|cxx|C|c\\+\\+)"; | 53 | $cppExt = "(cpp|cc|cxx|C|c\\+\\+)"; |
54 | $hExt = "(h|H|hh|hxx|hpp|h\\+\\+)"; | 54 | $hExt = "(h|H|hh|hxx|hpp|h\\+\\+)"; |
55 | 55 | ||
56 | # list of compat headers. scroll down ... much of boring stuff here.. | 56 | # list of compat headers. scroll down ... much of boring stuff here.. |
57 | %compatmap = ( | 57 | %compatmap = ( |
58 | 'qapp.h' => "qapplication.h", | ||
59 | #'qarray.h' => "qmemarray.h", | ||
60 | #'qbitarry.h' => "qbitarray.h", | ||
61 | 'qbttngrp.h' => "qbuttongroup.h", | ||
62 | #'qchkbox.h' => "qcheckbox.h", | ||
63 | 'qclipbrd.h' => "qclipboard.h", | ||
64 | #'qcollect.h' => "qptrcollection.h", | ||
65 | #'qcollection.h' => "qptrcollection.h", | ||
66 | 'qcombo.h' => "qcombobox.h", | ||
67 | 'qconnect.h' => "qconnection.h", | ||
68 | 'qdatetm.h' => "qdatetime.h", | ||
69 | 'qdrawutl.h' => "qdrawutil.h", | ||
70 | 'qdstream.h' => "qdatastream.h", | ||
71 | #'qfiledef.h' => "private/qfiledefs_p.h", | ||
72 | 'qfiledlg.h' => "qfiledialog.h", | ||
73 | 'qfileinf.h' => "qfileinfo.h", | ||
74 | 'qfontdta.h' => "qfontdata.h", | ||
75 | 'qfontinf.h' => "qfontinfo.h", | ||
76 | 'qfontmet.h' => "qfontmetrics.h", | ||
77 | 'qgrpbox.h' => "qgroupbox.h", | ||
78 | 'qintcach.h' => "qintcache.h", | ||
79 | 'qiodev.h' => "qiodevice.h", | ||
80 | 'qlcdnum.h' => "qlcdnumber.h", | ||
81 | 'qlined.h' => "qlineedit.h", | ||
82 | #'qlist.h' => "qptrlist.h", | ||
83 | 'qmenudta.h' => "qmenudata.h", | ||
84 | 'qmetaobj.h' => "qmetaobject.h", | ||
85 | 'qmlined.h' => "qtmultilineedit.h", | ||
86 | 'qmsgbox.h' => "qmessagebox.h", | ||
87 | 'qmultilinedit.h' => "qmultilineedit.h", | ||
88 | 'qobjcoll.h' => "qobjectlist.h>\n\#include <qobjectdict.h", | ||
89 | 'qobjdefs.h' => "qobjectdefs.h", | ||
90 | 'qpaintd.h' => "qpaintdevice.h", | ||
91 | 'qpaintdc.h' => "qpaintdevicedefs.h", | ||
92 | 'qpdevmet.h' => "qpaintdevicemetrics.h", | ||
93 | 'qpmcache.h' => "qpixmapcache.h", | ||
94 | 'qpntarry.h' => "qpointarray.h", | ||
95 | 'qpopmenu.h' => "qpopupmenu.h", | ||
96 | 'qprndlg.h' => "qprintdialog.h", | ||
97 | 'qprogbar.h' => "qprogressbar.h", | ||
98 | 'qprogdlg.h' => "qprogressdialog.h", | ||
99 | 'qpsprn.h' => "<private/qpsprinter_p.h>", | ||
100 | 'qpushbt.h' => "qpushbutton.h", | ||
101 | 'qqueue.h' => "qptrqueue.h", | ||
102 | 'qradiobt.h' => "qradiobutton.h", | ||
103 | 'qrangect.h' => "qrangecontrol.h", | ||
104 | 'qscrbar.h' => "qscrollbar.h", | ||
105 | 'qsocknot.h' => "qsocketnotifier.h", | ||
106 | # 'qstack.h' => "qptrstack.h", | ||
107 | 'qtabdlg.h' => "qtabdialog.h", | ||
108 | 'qtstream.h' => "qtextstream.h", | ||
109 | # 'qvector.h' => "qptrvector.h", | ||
110 | 'qwidcoll.h' => "qwidgetlist.h\n\#include <qwidgetintdict.h", | ||
111 | 'qwindefs.h' => "qwindowdefs.h", | ||
112 | |||
113 | # and now the KDE specific compat includes | 58 | # and now the KDE specific compat includes |
114 | # 'kapp.h' => "kapplication.h", | 59 | # 'kapp.h' => "kapplication.h", |
115 | # 'kstddirs.h' => "kstandarddirs.h", | 60 | # 'kstddirs.h' => "kstandarddirs.h", |
116 | # 'kuniqueapp.h' => "kuniqueapplication.h", | 61 | # 'kuniqueapp.h' => "kuniqueapplication.h", |
117 | # 'ktmainwindow.h'=> "kmainwindow.h", | 62 | # 'ktmainwindow.h'=> "kmainwindow.h", |
118 | # 'kcolorbtn.h' => "kcolorbutton.h", | 63 | # 'kcolorbtn.h' => "kcolorbutton.h", |
119 | # 'kcolordlg.h' => "kcolordialog.h", | 64 | # 'kcolordlg.h' => "kcolordialog.h", |
120 | # 'kxmlgui.h' => "kxmlguifactory.h", | 65 | # 'kxmlgui.h' => "kxmlguifactory.h", |