From 28edc0aa2ab09297288186f5bc15765eb7be58c0 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 24 Jan 2013 13:47:22 -0600 Subject: Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4 --- KDE2PORTING.html | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'KDE2PORTING.html') diff --git a/KDE2PORTING.html b/KDE2PORTING.html index c69d11732..41b9f5379 100644 --- a/KDE2PORTING.html +++ b/KDE2PORTING.html @@ -22,7 +22,7 @@ or this page online.

  • TDEApplication
  • TDECmdLineArgs
  • KLocale
  • -
  • KGlobal: access to KDE global objects.
  • +
  • TDEGlobal: access to KDE global objects.
  • KIconLoader
  • KTMainWindow
  • KHelpMenu
  • @@ -37,7 +37,7 @@ or this page online.

  • kcharsets
  • KWizard, KNoteBook
  • KSpinBox, KNumericSpinBox
  • -
  • KClipboard
  • +
  • TDEClipboard
  • KPanner, KNewPanner
  • KTreeList, KTreeListItem
  • KMsgBox
  • @@ -110,11 +110,11 @@ or this page online.

    TDEApplication

    doesn't hold any longer a KLocale instance. With this getLocale() - and isLocaleInstantiated are now replaced by KGlobal::locale()

    + and isLocaleInstantiated are now replaced by TDEGlobal::locale()

    it also doesn't hold a KiconLoader instance. As this also getIconLoader() has been removed. Replace kapp->getIconLoader()->loadIcon() with - BarIcon() or use KGlobal::iconLoader() instead of getIconLoader()

    + BarIcon() or use TDEGlobal::iconLoader() instead of getIconLoader()

    kde_*dir() have been removed as they require a unique top level directory for all applications (TDEDIR). This concept doesn't exist in KDE 2.0 @@ -125,16 +125,16 @@ or this page online.

    Replace code that uses kde_*dir() + filename with calls to locate(filetype, filename) where filetype is what * used to be in kde_*dir(). locate is defined as function in kstddirs.h to call - KGlobal::dirs()->findResource.

    + TDEGlobal::dirs()->findResource.

    Use locateLocal to get the path of a writable file. For instance, TDEApplication::localconfigdir()+filename is now locateLocal( "config", filename ), - but for most cases, simply using KGlobal::config() is enough, if you're happy + but for most cases, simply using TDEGlobal::config() is enough, if you're happy with saving the application's configuration into appnamerc, or KSimpleConfig cfg("anothercfgfile") to create a config file with another name.

    generalFont() and fixedFont() are deprecated and will be removed soon. - Please use KGlobalSettings::generalFont() and KGlobalSettings::fixedFont() instead.

    + Please use TDEGlobalSettings::generalFont() and TDEGlobalSettings::fixedFont() instead.

    appName() is deprecated. Please use TQApplication::name() or instanceName instead.

    @@ -193,9 +193,9 @@ or this page online.

    Return to the Table of Contents

    -

    KGlobal: access to KDE global objects.

    +

    TDEGlobal: access to KDE global objects.

    -KGlobal allows centralized access to KDE global objects without including +TDEGlobal allows centralized access to KDE global objects without including extraneous headers. object creation is deferred if possible.

    All methods are static and headers for returned types are not included. You @@ -215,11 +215,11 @@ must have created a TDEApplication object before the methods can be used.

         ...
    -        	KConfig *appcfg = KGlobal::config();
    +        	KConfig *appcfg = TDEGlobal::config();
     	        TQString mystr	 = i18n( "This is a string" );
     
     
    -		KIconLoader *loader = KGlobal::iconLoader();
    +		KIconLoader *loader = TDEGlobal::iconLoader();
         
    @@ -309,9 +309,9 @@ you should or should not use them.

    1. fork + exec

    You never want to use this unless you have a very good reason why it is -impossible to use KProcess. +impossible to use TDEProcess.

    -

    2. KProcess

    +

    2. TDEProcess

    You want to use this if you need to start a new process which needs to be a child of your process, e.g. because you want to catch stdout/stderr or need @@ -323,7 +323,7 @@ off with KProcIO

    3. KProcIO

    -Like KProcess. Unlike KProcess, this class actually makes it easy to +Like TDEProcess. Unlike TDEProcess, this class actually makes it easy to send data to and receive data from the process.

    @@ -534,7 +534,7 @@ The kcharsets class has been completely rewritten, and most of it has vanished, since support for it moved to Qt.

    Most applications will only need to replace kapp->getKCharsets() with -KGlobal::charsets().

    +TDEGlobal::charsets().

    For conversion of various input formats to QStrings, please have a look at TQTextCodec and classes derived from it.

    @@ -570,9 +570,9 @@ HINTS:

    Return to the Table of Contents

    -

    KClipboard

    +

    TDEClipboard

    -KClipboard has been removed. In case you've been using KClipboard, +TDEClipboard has been removed. In case you've been using TDEClipboard, QClipboard is the way to go now, as it has all the functionality the K version had, and more.

    -- cgit v1.2.1