diff options
| author | Darrell Anderson <humanreadable@yahoo.com> | 2013-03-02 15:57:34 -0600 |
|---|---|---|
| committer | Darrell Anderson <humanreadable@yahoo.com> | 2013-03-02 15:57:34 -0600 |
| commit | 7c0b0c9dc9fcbe9c198925bdc7ee18ac6be49f4f (patch) | |
| tree | c76702a7f6310fbe9d437e347535422e836e94e9 /KDE3PORTING.html | |
| parent | a2a38be7600e2a2c2b49c66902d912ca036a2c0f (diff) | |
| parent | 27bbee9a5f9dcda53d8eb23863ee670ad1360e41 (diff) | |
| download | tdelibs-7c0b0c9dc9fcbe9c198925bdc7ee18ac6be49f4f.tar.gz tdelibs-7c0b0c9dc9fcbe9c198925bdc7ee18ac6be49f4f.zip | |
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tdelibs
Diffstat (limited to 'KDE3PORTING.html')
| -rw-r--r-- | KDE3PORTING.html | 146 |
1 files changed, 73 insertions, 73 deletions
diff --git a/KDE3PORTING.html b/KDE3PORTING.html index eb17c6fc6..47246adb8 100644 --- a/KDE3PORTING.html +++ b/KDE3PORTING.html @@ -20,10 +20,10 @@ or <a href="http://doc.trolltech.com/3.0/porting.html">this page online</a>.<P> <LI><A HREF="#tdecore">Changes in tdecore</A></LI> <LI><A HREF="#tdeui">Changes in tdeui</A></LI> <LI><A HREF="#kio">Changes in kio</A></LI> -<LI><A HREF="#kparts">Changes in kparts</A></LI> -<LI><A HREF="#kspell">Changes in kspell</A></LI> -<LI><A HREF="#khtmlpart">API-cleanup in KHTML</A></LI> -<LI><A HREF="#kfile">Changes in kfile</A></LI> +<LI><A HREF="#tdeparts">Changes in tdeparts</A></LI> +<LI><A HREF="#tdespell">Changes in tdespell</A></LI> +<LI><A HREF="#tdehtmlpart">API-cleanup in TDEHTML</A></LI> +<LI><A HREF="#tdefile">Changes in tdefile</A></LI> <LI><A HREF="#kcontrol">TDE Control Center</A></LI> <LI><A HREF="#kicker">Panel Applets and Extensions</A></LI> </UL> @@ -73,7 +73,7 @@ instead, everything else is source compatible. <H4>Header file names</H4> <UL> -<LI>kapp.h is now kapplication.h</LI> +<LI>kapp.h is now tdeapplication.h</LI> <LI>kuniqueapp.h is now kuniqueapplication.h</LI> <LI>kstddirs.h is now kstandarddirs.h</LI> <LI>kcolorbtn.h is now kcolorbutton.h</LI> @@ -95,7 +95,7 @@ DCOPClient you do not need to change anything. <p> It is no longer possible to make calls to an application registered as "<appid>-<pid>" with "<appid>" only. The full name can be obtained by using -either KApplication::startServiceBy...() or DCOPClient::findObject() or +either TDEApplication::startServiceBy...() or DCOPClient::findObject() or their command line equivalents "dcopstart" and "dcopfind". <H4>KLibFactory</H4> @@ -116,11 +116,11 @@ The <i>matchFilename( const TQString& filename, const TQString& pattern )</i> me renamed to <br><i>matchFileName( const TQString& filename, const TQString& pattern )</i>. The old name will still work unless KDE_NO_COMPAT is defined. -<H4>KStyle</H4> -Due to the major changes in the TQStyle API in Qt3, KStyle has been completely -re-written. KStyle is now a thin wrapper around TQCommonStyle with a few extra -primitive elements and a simple popupMenu transparency engine. All KStyles can -now style Qt apps like designer and assistant automatically. KStyle is no longer +<H4>TDEStyle</H4> +Due to the major changes in the TQStyle API in Qt3, TDEStyle has been completely +re-written. TDEStyle is now a thin wrapper around TQCommonStyle with a few extra +primitive elements and a simple popupMenu transparency engine. All TDEStyles can +now style Qt apps like designer and assistant automatically. TDEStyle is no longer present in tdecore. It is now in a new library called tdefx to allow Qt apps to use KDE's styles without having the styles linked to tdecore/tdeui. @@ -135,7 +135,7 @@ They have been replaced by TQCString and KMD5::Digest. <br> The API has been cleaned up, it is no longer necessary to call finalize(). Simply remove any calls to it. -<H4>KLocale</H4> +<H4>TDELocale</H4> <li>charset() has been removed. You might want to use encoding() instead. <li>setCharset(const TQString &) has been removed. You might want to use setEncoding(int) instead. @@ -143,43 +143,43 @@ setEncoding(int) instead. <li>formatNumber(const TQString &) has been removed. <li>languages() has been removed. Use languageList() instead. <li>All references to monthName(), monthNamePossessive(), and weekDayName() -should be replaced with methods from KLocale::calendar(). +should be replaced with methods from TDELocale::calendar(). <li>Hard coded date handling or date handling with TQDate should in most -cases be replaced by methods in KLocale::calendar(). +cases be replaced by methods in TDELocale::calendar(). <H4>Accelerators Keys</H4> -<h5>KAccel</h5> +<h5>TDEAccel</h5> The following methods of been deprecated, and if KDE_NO_COMPAT is defined they will not be available. <ul> - <li> KAccel::insertItem() and KAccel::connectItem(). + <li> TDEAccel::insertItem() and TDEAccel::connectItem(). <pre> - - kaccel->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" ); - - kaccel->connectItem( "Scroll Up", this, TQT_SLOT(scrollUp()) ); - + kaccel->insert( "Scroll Up", i18n("Scroll Up"), TQString::null, + - tdeaccel->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" ); + - tdeaccel->connectItem( "Scroll Up", this, TQT_SLOT(scrollUp()) ); + + tdeaccel->insert( "Scroll Up", i18n("Scroll Up"), TQString::null, Key_Up, this, TQT_SLOT(scrollUp()) ); </pre> Note that a What's This parameter is now a part of the insert function. You might replace the TQString::null parameter with <pre> i18n("Scroll the current document's contents up by one line.") </pre> for example.</li> - <li> KAccel::changeMenuAccel() has been deprecated because it was + <li> TDEAccel::changeMenuAccel() has been deprecated because it was never used in cvs. If you've used it in your application, the following can replace it. Note, however, that this would be handled automatically - by using KAction instead. + by using TDEAction instead. <pre> - - kaccel->changeMenuAccel( menu, id, "file_open" ); - + menu->setAccel( kaccel->shortcut( "file_open" ).keyCodeQt(), id ); + - tdeaccel->changeMenuAccel( menu, id, "file_open" ); + + menu->setAccel( tdeaccel->shortcut( "file_open" ).keyCodeQt(), id ); </pre> </li> </ul> -The preferred means of defining a shortcut, however, is to use <b>KAction</b>. +The preferred means of defining a shortcut, however, is to use <b>TDEAction</b>. <pre> - new KAction( i18n("Scroll Up"), Key_Up, + new TDEAction( i18n("Scroll Up"), Key_Up, this, TQT_SLOT(scrollUp()), actionCollection(), "Scroll Up" ); </pre> -<h5>KGlobalAccel</h5> +<h5>TDEGlobalAccel</h5> <ul> <li>Call <i>updateConnections()</i> after all <i>insert()</i> or <i>insertItem()</i> (deprecated) calls have been made. This function then performs the @@ -189,59 +189,59 @@ The preferred means of defining a shortcut, however, is to use <b>KAction</b>. shortcut reassignments, which in turn used to make an expensive ungrab of the old key and second grab of the new key necessary.</li> </ul> -<h5>KStdAccel</h5> +<h5>TDEStdAccel</h5> <ul> <li><i>StdAccel::WhatThis</i> has been renamed to <i>StdAccel::WhatsThis</i>. <li><i>StdAccel::Insert</i> and the corresponding <i>insert()</i> have been removed. (Nobody on the list knew what its function was supposed to be.) Calls to <i>insert()</i> and the equivalent - <i>key(KStdAccel::Insert)</i> can be replaced with the former default + <i>key(TDEStdAccel::Insert)</i> can be replaced with the former default of <i>Qt::CTRL+Qt::Key_Insert</i>.</li> <li>The following functions have been deprecated and will need to be changed if KDE_NO_COMPAT is defined: <table border=1> <tr><th>Old</th><th>New</th></tr> <tr><td>TQString action(StdAccel id)</td><td>TQString name(StdAccel id)</td></tr> - <tr><td>int defaultKey(StdAccel accel)</td><td>KShortcut shortcutDefault(StdAccel id)</td></tr> + <tr><td>int defaultKey(StdAccel accel)</td><td>TDEShortcut shortcutDefault(StdAccel id)</td></tr> <tr><td>TQString description(StdAccel id)</td><td>TQString label(StdAccel id)</td></tr> <tr><td>bool isEqual(const TQKeyEvent* pEvent, int keyQt)</td> <td>The best method for replacing this varies. One possibility is to use <i>KKey(const TQKeyEvent*) == KKey(int)</i>. Another is to use - <i>KShortcut::contains( const KKey&/KKeySequence& )</i>.</td></tr> - <tr><td>int key(StdAccel)</td><td>const KShortcut& shortcut(StdAccel)</td></tr> + <i>TDEShortcut::contains( const KKey&/KKeySequence& )</i>.</td></tr> + <tr><td>int key(StdAccel)</td><td>const TDEShortcut& shortcut(StdAccel)</td></tr> </table></li--> </ul> -<H4>KIconLoader, KIconTheme</H4> -Methods now use KIcon::Group and KIcon::Context instead of int as types for group and context arguments. +<H4>TDEIconLoader, TDEIconTheme</H4> +Methods now use TDEIcon::Group and TDEIcon::Context instead of int as types for group and context arguments. The change should affect only code using hardcoded numeric values instead of using the proper enum constants. -This applies to classes KIconLoader, KIconTheme and (in kio and kfile) KMimeType, KService, KIconDialog, KIconButton, +This applies to classes TDEIconLoader, TDEIconTheme and (in kio and tdefile) KMimeType, KService, TDEIconDialog, TDEIconButton, KURLBar and KURLBarItem. <H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4> <H3><A NAME="tdeui">Changes in tdeui</A></H3> -<H4>KAccelMenu</H4> +<H4>TDEAccelMenu</H4> This class has been removed, Qt offers the same functionality. -Use QPopupMenu/KPopupMenu or the XML-UI method for building menus. +Use QPopupMenu/TDEPopupMenu or the XML-UI method for building menus. -<H4>KAction</H4> +<H4>TDEAction</H4> <ul> <li>The following methods have been deprecated and will need to be replaced if KDE_NO_COMPAT is defined. <table border=1> <tr><th>Old</th><th>New</th></tr> - <tr><td>int accel()</td><td>const KShortcut& shortcut()</td></tr> + <tr><td>int accel()</td><td>const TDEShortcut& shortcut()</td></tr> <tr><td>int menuId()</td><td>int itemId()</td></tr> - <tr><td>void setAccel(int)</td><td>void setShortcut(const KShortcut&)</td></tr> + <tr><td>void setAccel(int)</td><td>void setShortcut(const TDEShortcut&)</td></tr> </table></li> </ul> -<h4>KActionCollection</h4> +<h4>TDEActionCollection</h4> <ul> - <li>When constructing a KActionCollection object, a pointer to the focus widget should be passed.</li> + <li>When constructing a TDEActionCollection object, a pointer to the focus widget should be passed.</li> <li>The insert(), remove(), and take() methods have been deprecated. - If you wish to keep a list of actions, use the KActionPtrList container instead. + If you wish to keep a list of actions, use the TDEActionPtrList container instead. If you want to configure the shortcuts from multiple actions collections, pass each collection to KKeyChooser or KKeyDialog via their insert() methods.</li> </ul> @@ -318,28 +318,28 @@ The KRootPixmap class has been extended to make it more flexible, and the The old name will still work unless KDE_NO_COMPAT is defined. <H4>KThemeBase, KThemeStyle</H4> -KThemeBase and KThemeStyle have been ported over to the new QStyle/KStyle API +KThemeBase and KThemeStyle have been ported over to the new QStyle/TDEStyle API present in Qt3/KDE3. KThemeBase is no longer in tdeui, but in kstyles/kthemestyle as its use is basically limited to KThemeStyle. -<H4>KAction, KToolBar, KToolBarButton and icons</H4> -The preferred way for specifying icons is passing the icon names (and the icons will be loaded by KIconLoader), +<H4>TDEAction, TDEToolBar, TDEToolBarButton and icons</H4> +The preferred way for specifying icons is passing the icon names (and the icons will be loaded by TDEIconLoader), instead of using TQIconSet or TQPixmap. This results in always using the correct icon size and allows delayed on-demand icon loading. <p> -Method KAction::hasIconSet() has been renamed to KAction::hasIcon(), the old name will still work unless KDE_NO_COMPAT is defined. -KAction::iconSet() now has an argument specifying icon group, the old KAction::iconSet() is still available unless KDE_NO_COMPAT -is defined and returns KIcon::Small iconset, just like in KDE2. +Method TDEAction::hasIconSet() has been renamed to TDEAction::hasIcon(), the old name will still work unless KDE_NO_COMPAT is defined. +TDEAction::iconSet() now has an argument specifying icon group, the old TDEAction::iconSet() is still available unless KDE_NO_COMPAT +is defined and returns TDEIcon::Small iconset, just like in KDE2. <p> -KToolBarButton methods setPixmap(), setDefaultPixmap(), setDisabledPixmap(), setDefaultIcon() and setDisabledIcon() are deprecated. -Use KToolBarButton::setIcon() (preferred) or KToolBarButton::setIconSet() instead. +TDEToolBarButton methods setPixmap(), setDefaultPixmap(), setDisabledPixmap(), setDefaultIcon() and setDisabledIcon() are deprecated. +Use TDEToolBarButton::setIcon() (preferred) or TDEToolBarButton::setIconSet() instead. -<H4>KAction and derived classes</H4> +<H4>TDEAction and derived classes</H4> The protected set* methods have been renamed to update* and they now take only one argument (i.e. setText(int, const TQString&) is now updateText(int) ). Because the former second argument was always the value of the a corresponding data member, you can simply call the accessor method (i.e. in updateText() call text() to get the text). -<H4>KToggleAction</H4> +<H4>TDEToggleAction</H4> exclusiveGroup() is no more virtual. setExclusiveGroup(const TQString&) is not a slot anymore. @@ -391,7 +391,7 @@ TQString&) is not a slot anymore. <li>setMaxCacheAge( int ) <li>setUseCache( bool ) <li>setMaxCacheSize( int ) -<li>setCacheControl( KIO::CacheControl ) +<li>setCacheControl( TDEIO::CacheControl ) <li>setUseProxy( bool ) <li>setUseReverseProxy( bool ) <li>setProxyType( ProxyType ) @@ -406,7 +406,7 @@ TQString&) is not a slot anymore. <li>In order to support files > 4Gb, the file size / file-offset argument in the signals totalSize, processedSize and canResume, which are used by the io-slaves and passed along to jobs, has been changed from - <b>unsigned long</b> to <b>KIO::filesize_t</b>. + <b>unsigned long</b> to <b>TDEIO::filesize_t</b>. Make sure to check if you use these signals since your compiler will typically not generate a compile-time error for these changes, instead you might get a run-time error when you try to connect to @@ -416,11 +416,11 @@ TQString&) is not a slot anymore. <H4>KOpenWithHandler / KFileOpenWithHandler</H4> Those two classes are deprecated, no need to create a KFileOpenWithHandler anymore. -The merging of libkio, libksycoca, libkfile and libkssl into a single libkio has +The merging of libtdeio, libtdesycoca, libtdefile and libkssl into a single libtdeio has allowed to fix this dependency problem: KRun can now use the OpenWith dialog directly. <H4>KMimeType, KService</H4> -Methods now use KIcon::Group and KIcon::Context instead of int as types for group and context arguments. +Methods now use TDEIcon::Group and TDEIcon::Context instead of int as types for group and context arguments. The change should affect only code using hardcoded numeric values instead of using the proper enum constants. <H4>KFilterDev</H4> @@ -440,7 +440,7 @@ The createFilterDevice method is deprecated. Use deviceForFile instead. <H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4> -<H3><A NAME="kparts">Changes in kparts</A></H3> +<H3><A NAME="tdeparts">Changes in tdeparts</A></H3> <H4>KParts::Factory</H4> The createPart method is no more virtual and the createPartObject method @@ -468,7 +468,7 @@ setURLArgs does the job. <H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4> -<H3><A NAME="kspell">Changes in kspell</A></H3> +<H3><A NAME="tdespell">Changes in tdespell</A></H3> <H4>KSpell</H4> The API has been cleaned up to be in line with the rest of tdelibs, in particular: @@ -495,9 +495,9 @@ The API has been cleaned up to be in line with the rest of tdelibs, in particula <H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4> -<H3><A NAME="khtmlpart">API-cleanups in KHTML</A></H3> +<H3><A NAME="tdehtmlpart">API-cleanups in TDEHTML</A></H3> -There were a few relatively minor API-adjustements in KHTMLPart. In particular: +There were a few relatively minor API-adjustements in TDEHTMLPart. In particular: <ul><li>enableJScript(bool) has been replaced by setJScriptEnabled(bool) <li>enableJava(bool) has been replaced by setJavaEnabled(bool) <li>enablePlugins(bool) has been replaced by setPluginsEnabled(bool) @@ -505,7 +505,7 @@ There were a few relatively minor API-adjustements in KHTMLPart. In particular: <li>enableMetaRefresh(bool) has been replaced by setMetaRefreshEnabled(bool) <li>setBaseURL and setBaseTarget have been removed. baseURL(), baseTarget() and completeURL() are remained for compatibility reasons, but they're deprecated now. use the variants in DOM::HTMLDocument() instead. -<li>the second parameter of KHTMLPart::completeURL is removed. it didn't have +<li>the second parameter of TDEHTMLPart::completeURL is removed. it didn't have any effect before either. </ul> Besides that, all methods previously marked as deprecated or were internal @@ -513,21 +513,21 @@ but accidentally part of the public API are now private or removed. As they were marked as becoming private already you should not experience any problems. Backward compatibility exists for the common methods, to disable this use a #define KDE_NO_COMPAT. -<p>In KHTMLView, the following changes were done: +<p>In TDEHTMLView, the following changes were done: <ul> <li>gotoNextLink has been replaced by gotoLink(true); <li>gotoPrevLink has been replaced by gotoLink(false); </ul> <H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4> -<H3><A NAME="kfile">Changes in kfile</A></H3> -The kfile-library, as used by the KFileDialog provides classes for directory browsing widgets. +<H3><A NAME="tdefile">Changes in tdefile</A></H3> +The tdefile-library, as used by the KFileDialog provides classes for directory browsing widgets. Those classes gained some new features, some parts were merged with other existing classes -and in some cases the API was cleaned up/fixed. The library is now built as part of libkio -library (there's no need to modify Makefiles which use $LIB_KFILE instead of hardcoding -lkfile). +and in some cases the API was cleaned up/fixed. The library is now built as part of libtdeio +library (there's no need to modify Makefiles which use $LIB_TDEFILE instead of hardcoding -ltdefile). <p> Even if the list of changes is long, the affected code base should be relatively small, as most -parts are rarely used outside of kfile. +parts are rarely used outside of tdefile. <p> The changes are: <H4>KFileItem</H4> @@ -563,12 +563,12 @@ flexibility and efficiency. <br><br> Sorting has changed radically. Previously, KFileView had protected methods QuickSort, compareItems() and mergeLists() to sort directory entries for displaying in the views. Now, -KFileView does not do any sorting anymore. Instead, the view's (i.e. KIconView, KListView) +KFileView does not do any sorting anymore. Instead, the view's (i.e. TDEIconView, TDEListView) sorting is utilized by letting its view-items provide a TQString key() method. Therefore, KFileView offers the two methods <ul> <li>TQString sortingKey( const TQString& value, bool isDir, int sortSpec )</li> -<li>TQString sortingKey( KIO::filesize_t value, bool isDir, int sortSpec )</li> +<li>TQString sortingKey( TDEIO::filesize_t value, bool isDir, int sortSpec )</li> </ul> which the view-classes can use to generate the string for the key() method. The KFile::SortMode enum has been removed, as TQDir::SortSpec is used entirely. @@ -577,8 +577,8 @@ enum has been removed, as TQDir::SortSpec is used entirely. Further changes: <table> <tr><th>Old:</th><th>New:</th></tr> -<tr><td>not existant</td><td>virtual void readConfig( KConfig *, const TQString& group = TQString::null )</td></tr> -<tr><td>not existant</td><td>void writeConfig( KConfig *, const TQString& group = TQString::null)</td></tr> +<tr><td>not existant</td><td>virtual void readConfig( TDEConfig *, const TQString& group = TQString::null )</td></tr> +<tr><td>not existant</td><td>void writeConfig( TDEConfig *, const TQString& group = TQString::null)</td></tr> <tr><td>virtual void setCurrentItem( const TQString& filename, KFileViewItem * )</td><td>Replaced with the two methods below.</td></tr> <tr><td> </td><td>void setCurrentItem( const TQString& filename );</td></tr> <tr><td> </td><td>virtual void setCurrentItem( const KFileViewItem * ) = 0;</td></tr> @@ -613,8 +613,8 @@ have been merged into the new method activate( const KFileItem * ). <br><br> Carsten Pfeiffer <A HREF="mailto:pfeiffer@kde.org">pfeiffer@kde.org</A> -<H4>KIconDialog, KIconButton, KURLBar, KURLBarItem</H4> -Methods now use KIcon::Group and KIcon::Context instead of int as types for group and context arguments. +<H4>TDEIconDialog, TDEIconButton, KURLBar, KURLBarItem</H4> +Methods now use TDEIcon::Group and TDEIcon::Context instead of int as types for group and context arguments. The change should affect only code using hardcoded numeric values instead of using the proper enum constants. <H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4> |
