trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: February 2014

Re: [trinity-devel] R: [trinity-devel] KXMLedit is MISSING from TDE - Slavek can you convert/add?

From: Slávek Banko <slavek.banko@...>
Date: Sat, 22 Feb 2014 19:02:31 +0100
On Saturday 22 of February 2014 18:58:10 David C. Rankin wrote:
> On 02/22/2014 08:55 AM, Slávek Banko wrote:
> > On Saturday 22 of February 2014 15:39:04 Michele Calgaro wrote:
> >> Added to bugszilla bug 1955
> >>
> >>   Michele
> >
> > Great, thank you.
> >
> > Slavek
>
> Slavek - I think I am almost done with the conversion. After spending 5
> hours on it, I can say with authority, by far, the the most costly
> miscalculation the TDE project made was to take a *meat-cleaver* k->tde
> renaming approach, that has resulted in wholesale renaming of k->tde and
> K->TDE to some classes,, headers and functions and NOT others, instead of
> taking a surgical minimal renaming approach to insure only conflicting
> executables, libraries and docbook language were renamed.
>
> You get into the code to migrate an application and there is NO rhyme or
> reason to why some of the classes and headers are Kfoo or kfoo.h and why
> some have been renamed TDEfoo or tdefoo.h. They are intermixed like
> scrambled eggs :(
>
> I am on build 23 of kxmleditor after having:
>
> # convert_existing_qt3_app_to_tqt3
> # copy tde/common/admin
> # sed -i 's/klocale.h/tdelocale.h/' *
> # sed -i 's/klocale.h/tdelocale.h/' part/*.{cpp,h}
> # sed -i 's/kmessagebox.h/tdemessagebox.h/' *
> # sed -i 's/kmessagebox.h/tdemessagebox.h/' part/*.cpp
> # sed -i 's/kapplication.h/tdeapplication.h/'
> kxmleditor/kxmleditor/main.cpp # sed -i 's/kfiledialog.h/tdefiledialog.h/'
> kxmleditor/part/kxmleditorpart.cpp # sed -i
> 's/kpopupmenu.h/tdepopupmenu.h/' kxmleditor/part/kxe_treeview.cpp # sed -i
> 's/kpopupmenu.h/tdepopupmenu.h/' kxmleditor/part/kxmleditorpart.cpp # sed
> -i 's/kglobal.h/tdeglobal.h/' kxmleditor/part/kxeconfiguration.cpp # sed -i
> 's/KGlobal/TDEGlobal/' kxmleditor/part/kxe_treeview.cpp
> # sed -i 's/KGlobal/TDEGlobal/' kxmleditor/part/kxeconfiguration.{h,cpp}
> # sed -i 's/KConfig/TDEConfig/' kxmleditor/part/*.{cpp,h}
> # sed -i 's/KConfig/TDEConfig/'
> kxmleditor/kxmleditor/kxmleditorshell.{cpp,h} # sed -i 's/KIcon/TDEIcon/g'
> kxmleditor/part/kxeconfiguration.cpp
> # sed -i 's/kconfig.h/tdeconfig.h/' kxmleditor/part/*.cpp
> # sed -i 's/kfontcombo.h/tdefontcombo.h/' kxmleditor/part/*.{cpp,ui}
> # sed -i 's/KFontCombo/TDEFontCombo/'
> kxmleditor/part/kxeprintsettingspage.{h,cpp,ui}
> # sed -i 's/klistview.h/tdelistview.h/'
> kxmleditor/part/kxe_treeviewitem.cpp # sed -i
> 's/klistview.h/tdelistview.h/' kxmleditor/part/kxe_treeview.h # sed -i
> 's/KListView/TDEListView/' kxmleditor/part/kxe_treeview.{cpp,h} # sed -i
> 's/KListView/TDEListView/' kxmleditor/part/kxe_treeviewitem.{cpp,h} # sed
> -i 's/kglobalsettings.h/tdeglobalsettings.h/'
> kxmleditor/part/kxe_treeview.cpp # sed -i 's/kaction.h/tdeaction.h/'
> kxmleditor/part/actions.h
> # sed -i 's/kaction.h/tdeaction.h/' kxmleditor/part/kxmleditorpart.cpp
> # sed -i 's/kaction.h/tdeaction.h/' kxmleditor/part/kxedocument.cpp
> # sed -i 's/ktoolbar.h/tdetoolbar.h/' kxmleditor/part/actions.cpp
> # sed -i 's/ktoolbar.h/tdetoolbar.h/' kxmleditor/part/kxmleditorpart.cpp
> # sed -i 's/KAction/TDEAction/'
> kxmleditor/kxmleditor/kxmleditorshell.{h,cpp} # sed -i
> 's/KToolBar/TDEToolBar/' kxmleditor/kxmleditor/kxmleditorshell.{h,cpp} #
> sed -i 's/KAction/TDEAction/' kxmleditor/part/kxmleditorpart.{h,cpp} # sed
> -i 's/KToolBar/TDEToolBar/' kxmleditor/part/kxmleditorpart.{h,cpp} # sed -i
> 's/KAction/TDEAction/' kxmleditor/part/actions.cpp
> # sed -i 's/KToolBar/TDEToolBar/' kxmleditor/part/actions.cpp
> # sed -i 's/ktempfile.h/tdetempfile.h/g' kxmleditor/part/kxmleditorpart.cpp
> # sed -i 's/ktempfile.h/tdetempfile.h/g' kxmleditor/part/kxedocument.cpp
> # sed -i 's/KInstance/TDEInstance/'
> kxmleditor/part/kxmleditorfactory.{cpp,h} # sed -i
> 's/KPopupMenu/TDEPopupMenu/' kxmleditor/kxmleditor/kxmleditorshell.{cpp,h}
> # sed -i 's/KPopupMenu/TDEPopupMenu/g' kxmleditor/part/kxmleditorpart.cpp #
> sed -i 's/kaboutdata.h/tdeaboutdata.h/' kxmleditor/kxmleditor/main.cpp #
> sed -i 's/kaboutdata.h/tdeaboutdata.h/' kxmleditor/part/kxmleditorabout.h #
> sed -i 's/KAboutData/TDEAboutData/g' kxmleditor/part/kxmleditorabout.h #
> sed -i 's/kfile.h/tdefile.h/' kxmleditor/part/kxedocument.cpp
>
>   I am still not done, but I'm getting close because it builds for several
> minutes (about the time you would expect for an app this size) before
> crashing. The point being it has taken some 5 hours of effort in the build,
> fail, what failed, grep it, check /opt/trinity/include or /opt/tqt3/include
> to see if we really are k or t, edit/sed, recreate tarball, rsync to build
> host, (repeat). If there are ~130 modules in TDE many much, much larger
> than kxmleditor, that is literally THOUSANDS of man hours put toward a
> ham-fisted renaming, when something much smaller (or docbook only) may have
> been the smarter way to go...

Oops, oops, what are you doing. You do not know script 
experimental/kde-tde/convert_existing_kde3_app_to_tde?


Slavek
--