From ffe8a83e053396df448e9413828527613ca3bd46 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:46:43 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- KDE3PORTING.html | 126 +++++++++++++++++++++++++++---------------------------- 1 file changed, 63 insertions(+), 63 deletions(-) (limited to 'KDE3PORTING.html') diff --git a/KDE3PORTING.html b/KDE3PORTING.html index 416b6024b..e249020f6 100644 --- a/KDE3PORTING.html +++ b/KDE3PORTING.html @@ -68,7 +68,7 @@ The old name will still work unless KDE_NO_COMPAT is defined.

Changes in kdecore

KDesktopWidget

-KDesktopWidget is obsolete. Include <qdesktopwidget.h> and use QDesktopWidget +KDesktopWidget is obsolete. Include <tqdesktopwidget.h> and use QDesktopWidget instead, everything else is source compatible.

Header file names

@@ -112,13 +112,13 @@ The old name will still work unless KDE_NO_COMPAT is defined. KPixmapSplitter has now been moved to the new kdefx library.

KStringHandler

-The matchFilename( const QString& filename, const QString& pattern ) method has been -renamed to
matchFileName( const QString& filename, const QString& pattern ). +The matchFilename( const TQString& filename, const TQString& pattern ) method has been +renamed to
matchFileName( const TQString& filename, const TQString& pattern ). The old name will still work unless KDE_NO_COMPAT is defined.

KStyle

-Due to the major changes in the QStyle API in Qt3, KStyle has been completely -re-written. KStyle is now a thin wrapper around QCommonStyle with a few extra +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 present in kdecore. It is now in a new library called kdefx to allow Qt apps to @@ -131,20 +131,20 @@ The old name will still work unless KDE_NO_COMPAT is defined.

KMD5

HASHHEX and HASH has been removed to make this class namespace clean. -They have been replaced by QCString and KMD5::Digest.
+They have been replaced by TQCString and KMD5::Digest.
The API has been cleaned up, it is no longer necessary to call finalize(). Simply remove any calls to it.

KLocale

  • charset() has been removed. You might want to use encoding() instead. -
  • setCharset(const QString &) has been removed. You might want to use +
  • setCharset(const TQString &) has been removed. You might want to use setEncoding(int) instead. -
  • formatMoney(const QString &) has been removed. -
  • formatNumber(const QString &) has been removed. +
  • formatMoney(const TQString &) has been removed. +
  • formatNumber(const TQString &) has been removed.
  • languages() has been removed. Use languageList() instead.
  • All references to monthName(), monthNamePossessive(), and weekDayName() should be replaced with methods from KLocale::calendar(). -
  • Hard coded date handling or date handling with QDate should in most +
  • Hard coded date handling or date handling with TQDate should in most cases be replaced by methods in KLocale::calendar().

    Accelerators Keys

    @@ -155,12 +155,12 @@ not be available.
  • KAccel::insertItem() and KAccel::connectItem().
     	- kaccel->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" );
    -	- kaccel->connectItem( "Scroll Up", this, SLOT(scrollUp()) );
    -	+ kaccel->insert( "Scroll Up", i18n("Scroll Up"), QString::null,
    -		Key_Up, this, SLOT(scrollUp()) );
    +	- kaccel->connectItem( "Scroll Up", this, TQT_SLOT(scrollUp()) );
    +	+ kaccel->insert( "Scroll Up", i18n("Scroll Up"), TQString::null,
    +		Key_Up, this, TQT_SLOT(scrollUp()) );
     
    Note that a What's This parameter is now a part of the insert function. - You might replace the QString::null parameter with + You might replace the TQString::null parameter with
     i18n("Scroll the current document's contents up by one line.") 
    for example.
  • KAccel::changeMenuAccel() has been deprecated because it was @@ -176,7 +176,7 @@ not be available. The preferred means of defining a shortcut, however, is to use KAction.
     	new KAction( i18n("Scroll Up"), Key_Up,
    -		this, SLOT(scrollUp()), actionCollection(), "Scroll Up" );
    +		this, TQT_SLOT(scrollUp()), actionCollection(), "Scroll Up" );
     
    KGlobalAccel
    @@ -200,12 +200,12 @@ The preferred means of defining a shortcut, however, is to use KAction.
  • The following functions have been deprecated and will need to be changed if KDE_NO_COMPAT is defined: - + - - + +
    OldNew
    QString action(StdAccel id)QString name(StdAccel id)
    TQString action(StdAccel id)TQString name(StdAccel id)
    int defaultKey(StdAccel accel)KShortcut shortcutDefault(StdAccel id)
    QString description(StdAccel id)QString label(StdAccel id)
    bool isEqual(const QKeyEvent* pEvent, int keyQt)
    TQString description(StdAccel id)TQString label(StdAccel id)
    bool isEqual(const TQKeyEvent* pEvent, int keyQt) The best method for replacing this varies. One possibility is to use - KKey(const QKeyEvent*) == KKey(int). Another is to use + KKey(const TQKeyEvent*) == KKey(int). Another is to use KShortcut::contains( const KKey&/KKeySequence& ).
    int key(StdAccel)const KShortcut& shortcut(StdAccel)
    @@ -261,7 +261,7 @@ This class has been removed, use Qt layouts instead.

    KCommand

    This class has been made lighter: the name isn't stored into the command anymore, but must be provided by the inherited class, as the result of the virtual name() function. -This saves storing a QString into each command in memory. +This saves storing a TQString into each command in memory. The former behavior is available in the class KNamedCommand, so for a quick port simply replace KCommand with KNamedCommand. @@ -273,7 +273,7 @@ The deprecated getMainWidget() method has been removed. Use mainWidget() instead functionality.

    KDockWidget

    -The WidgetList parameter has been renamed to QWidgetList. Behaviour +The WidgetList parameter has been renamed to TQWidgetList. Behaviour is identical.

    KEdit

    @@ -306,11 +306,11 @@ for more informations on this new extension. PixmapEffect has now been moved to the new kdefx library.

    KProgress

    -KProgress is now based on QProgressBar. +KProgress is now based on TQProgressBar. This has led to a few API changes. In particular the constructors have been simplified, you simply need to pass the total number of steps instead of min / max / initialvalue / orientation. See documentation of both KProgress -and QProgressBar. +and TQProgressBar.

    KRootPixmap

    The KRootPixmap class has been extended to make it more flexible, and the @@ -324,7 +324,7 @@ as its use is basically limited to KThemeStyle.

    KAction, KToolBar, KToolBarButton and icons

    The preferred way for specifying icons is passing the icon names (and the icons will be loaded by KIconLoader), -instead of using QIconSet or QPixmap. This results in always using the correct icon size and allows delayed +instead of using TQIconSet or TQPixmap. This results in always using the correct icon size and allows delayed on-demand icon loading.

    Method KAction::hasIconSet() has been renamed to KAction::hasIcon(), the old name will still work unless KDE_NO_COMPAT is defined. @@ -335,13 +335,13 @@ KToolBarButton methods setPixmap(), setDefaultPixmap(), setDisabledPixmap(), set Use KToolBarButton::setIcon() (preferred) or KToolBarButton::setIconSet() instead.

    KAction and derived classes

    -The protected set* methods have been renamed to update* and they now take only one argument (i.e. setText(int, const QString&) +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).

    KToggleAction

    exclusiveGroup() is no more virtual. setExclusiveGroup(const -QString&) is not a slot anymore. +TQString&) is not a slot anymore.

    Return to the Table of Contents

    @@ -350,7 +350,7 @@ QString&) is not a slot anymore.

    KPropertiesDialog

    @@ -362,15 +362,15 @@ QString&) is not a slot anymore.
  • A base class KArchive has been written, to support other archive formats in the future
  • KTarEntry is now KArchiveEntry, KTarDirectory is now KArchiveDirectory, and KTarFile is now KArchiveFile.
  • The classes ProgressBase, StatusbarProgress and DefaultProgress have been moved to the KIO namespace.
  • -
  • The signal KDirLister::started(const QString &url) has changed to KDirLister::started(const KURL &url).
  • -
  • KServiceTypeProfile::preferredService( const QString & serviceType, bool needApp ) has been removed, use +
  • The signal KDirLister::started(const TQString &url) has changed to KDirLister::started(const KURL &url).
  • +
  • KServiceTypeProfile::preferredService( const TQString & serviceType, bool needApp ) has been removed, use KServiceTypeProfile::preferredService( ..., "Application") if needApp was true, or - KServiceTypeProfile::preferredService( ..., QString::null) if needApp was false. + KServiceTypeProfile::preferredService( ..., TQString::null) if needApp was false.
  • The following functions in KProtocolManager have been replaced:
  • The following functions in KProtocolManager have been removed:
  • In order to support files > 4Gb, the file size / file-offset argument @@ -428,10 +428,10 @@ The createFilterDevice method is deprecated. Use deviceForFile instead.

    KDirWatch