summaryrefslogtreecommitdiffstats
path: root/doc/porting3.doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/porting3.doc')
-rw-r--r--doc/porting3.doc114
1 files changed, 57 insertions, 57 deletions
diff --git a/doc/porting3.doc b/doc/porting3.doc
index 38209ed7..c3d192b8 100644
--- a/doc/porting3.doc
+++ b/doc/porting3.doc
@@ -1,10 +1,10 @@
/****************************************************************************
**
-** Help with porting from Qt 2.x to Qt 3.x
+** Help with porting from TQt 2.x to TQt 3.x
**
** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved.
**
-** This file is part of the Qt GUI Toolkit.
+** This file is part of the TQt GUI Toolkit.
**
** This file may be used under the terms of the GNU General
** Public License versions 2.0 or 3.0 as published by the Free
@@ -13,7 +13,7 @@
** Alternatively you may (at your option) use any later version
** of the GNU General Public License if such license has been
** publicly approved by Trolltech ASA (or its successors, if any)
-** and the KDE Free Qt Foundation.
+** and the KDE Free TQt Foundation.
**
** Please review the following information to ensure GNU General
** Public Licensing requirements will be met:
@@ -39,28 +39,28 @@
/*!
\page porting.html
-\title Porting to Qt 3.x
+\title Porting to TQt 3.x
-This document describes porting applications from Qt 2.x to Qt 3.x.
+This document describes porting applications from TQt 2.x to TQt 3.x.
-The Qt 3.x series is not binary compatible with the 2.x series. This
-means programs compiled for Qt 2.x must be recompiled to work with Qt
-3.x. Qt 3.x is also not completely \e source compatible with 2.x,
+The TQt 3.x series is not binary compatible with the 2.x series. This
+means programs compiled for TQt 2.x must be recompiled to work with Qt
+3.x. TQt 3.x is also not completely \e source compatible with 2.x,
however all points of incompatibility cause compiler errors or
-run-time messages (rather than mysterious results). Qt 3.x includes
+run-time messages (rather than mysterious results). TQt 3.x includes
many additional features and discards obsolete functionality. Porting
-from Qt 2.x to Qt 3.x is straightforward, and once completed makes
-the considerable additional power and flexibility of Qt 3.x available
+from TQt 2.x to TQt 3.x is straightforward, and once completed makes
+the considerable additional power and flexibility of TQt 3.x available
for use in your applications.
-To port code from Qt 2.x to Qt 3.x:
+To port code from TQt 2.x to TQt 3.x:
\list 1
\i Briefly read the porting notes below to get an idea of what to expect.
\i Be sure your code compiles and runs well on all your target platforms
- with Qt 2.x.
-\i Recompile with Qt 3.x. For each error, search below for related
+ with TQt 2.x.
+\i Recompile with TQt 3.x. For each error, search below for related
identifiers (e.g. function names, class names). This document
mentions all relevant identifiers to help you get the information
you need at the cost of being a little verbose.
@@ -77,13 +77,13 @@ Table of contents:
\target Linkerrors
\section1 Link Errors on Windows
-On Windows, originally in Qt 2.x, the default configuration of the Qt
+On Windows, originally in TQt 2.x, the default configuration of the Qt
library is static. If you just use the default configuration you
-don't need to set certain preprocessor defines. In Qt 3.0, the
-default configuration of the Qt library is to build it as a shared
+don't need to set certain preprocessor defines. In TQt 3.0, the
+default configuration of the TQt library is to build it as a shared
library, therefore the preprocessor define \c QT_DLL is needed.
-If you use tmake with Qt 2.x, and now use qmake with Qt 3.x, then the
+If you use tmake with TQt 2.x, and now use qmake with TQt 3.x, then the
cause of the problem is with the project file. In the project file,
there is usually line that looks like:
@@ -93,7 +93,7 @@ this should be changed to
\c CONFIG += ...
-so that qmake can look at the configuration that Qt was built with and
+so that qmake can look at the configuration that TQt was built with and
set any relevant preprocessor defines in the makefile.
\target Headers
@@ -123,12 +123,12 @@ Header files that you might need to add #include directives for include:
\section1 Namespace
Qt 3.x is namespace clean. A few global identifiers that had been
-left in Qt 2.x have been discarded.
+left in TQt 2.x have been discarded.
Enumeration \l Qt::CursorShape and its values are now part of the
-special \c Qt class defined in ntqnamespace.h. If you get compilation
+special \c TQt class defined in ntqnamespace.h. If you get compilation
errors about these being missing (unlikely, since most of your code will
-be in classes that inherit from the Qt namespace class), then apply
+be in classes that inherit from the TQt namespace class), then apply
the following changes:
\list
@@ -185,7 +185,7 @@ have been changed:
\section1 Removed Functions
-All these functions have been removed in Qt 3.x:
+All these functions have been removed in TQt 3.x:
\list
\i QFont::charSet()
\i QFont::setCharSet()
@@ -215,12 +215,12 @@ global functions have been renamed:
\section1 Obsoleted Functions
-The following functions have been obsoleted in Qt 3.0. The
+The following functions have been obsoleted in TQt 3.0. The
documentation of each of these functions should explain how to
-replace them in Qt 3.0.
+replace them in TQt 3.0.
\warning It is best to consult \l http://doc.trolltech.com/3.0/
-rather than the documentation supplied with Qt to obtain the latest
+rather than the documentation supplied with TQt to obtain the latest
information regarding obsolete functions and how to replace them in
new code.
@@ -377,16 +377,16 @@ old header-file names are still supported.
\section1 QButtonGroup
-In Qt 2.x, the function QButtonGroup::selected() returns the selected
-\e radio button (QRadioButton). In Qt 3.0, it returns the selected \e
+In TQt 2.x, the function QButtonGroup::selected() returns the selected
+\e radio button (QRadioButton). In TQt 3.0, it returns the selected \e
toggle button (\l QButton::toggleButton), a more general concept.
This might affect programs that use QButtonGroups that contain a
mixture of radio buttons and non-radio (e.g. QCheckBox) toggle buttons.
\section1 QDate
-Two QDate member functions that were virtual in Qt 2.0 are not virtual
-in Qt 3.0. This is only relevant if you subclassed QDate and
+Two QDate member functions that were virtual in TQt 2.0 are not virtual
+in TQt 3.0. This is only relevant if you subclassed QDate and
reimplemented these functions:
\list
@@ -403,17 +403,17 @@ compatibility.
\section1 QFileDialog
If the mode was not set explicitly, and the user entered a
-non-existent file, the dialog would accept this. In Qt 3.x, you must
+non-existent file, the dialog would accept this. In TQt 3.x, you must
set the mode, e.g. setMode(QFileDialog::AnyFile), to get the same
behavior.
\section1 QFont
-The internals of QFont have changed significantly between Qt 2.2 and
+The internals of QFont have changed significantly between TQt 2.2 and
Qt 3.0, to give better Unicode support and to make developing
internationalized applications easier. The original API has been
preserved with minimal changes. The CharSet enum and its related
-functions have disappeared. This is because Qt now handles all charset
+functions have disappeared. This is because TQt now handles all charset
related issues internally, and removes this burden from the developer.
If you used the CharSet enum or its related functions, e.g
@@ -442,21 +442,21 @@ might be removed in a future version.
\section1 QListViewItem
-The paintBranches() function in Qt 2.x had a GUIStyle parameter; this
-has been dropped for Qt 3.x since GUI style is handled by the new
+The paintBranches() function in TQt 2.x had a GUIStyle parameter; this
+has been dropped for TQt 3.x since GUI style is handled by the new
style engine (See \l QStyle.)
\section1 QMoveEvent
-In Qt 2.x, the function QMoveEvent::pos() returned the position of the
-widget in its parent widget, including the window frame. In Qt 3.0,
+In TQt 2.x, the function QMoveEvent::pos() returned the position of the
+widget in its parent widget, including the window frame. In TQt 3.0,
it returns the new position of the widget, excluding window frame for
top level widgets.
\section1 QMultiLineEdit
-The QMultiLineEdit was a simple editor widget in previous Qt versions.
-Since Qt 3.0 includes a new richtext engine, which also supports
+The QMultiLineEdit was a simple editor widget in previous TQt versions.
+Since TQt 3.0 includes a new richtext engine, which also supports
editing, QMultiLineEdit is obsolete. For the sake of compatibility
QMultiLineEdit is still provided. It is now a subclass of QTextEdit
which wraps the old QMultiLineEdit so that it is mostly source
@@ -495,8 +495,8 @@ to ensure it has the same runtime behaviour on both Unix and Windows. In 2.x,
QPrinter behaved differently on Windows and Unix, when using view
transformations on the QPainter. This has changed now, and QPrinter
behaves consistently across all platforms. A compatibilty mode has been
-added that forces the old behaviour, to ease porting from Qt 2.x
-to Qt 3.x. This compatibilty mode can be enabled by passing the
+added that forces the old behaviour, to ease porting from TQt 2.x
+to TQt 3.x. This compatibilty mode can be enabled by passing the
QPrinter::Compatible flag to the QPrinter constructor.
On X11, QPrinter used to generate encapsulated postscript when
@@ -514,7 +514,7 @@ automatically when you include \c <ntqstringlist.h>. See
\link #Headers above \endlink for details.
\omit
-In Qt 3.0, ntqregexp.h has to
+In TQt 3.0, ntqregexp.h has to
include ntqstringlist.h, so it's no good to have ntqstringlist.h include ntqregexp.h,
unless one wants to achieve an Escher effect.
\endomit
@@ -529,11 +529,11 @@ there.
Example: Old code like
\code
- QRegExp rx( "([0-9|]*\\)" ); // works in Qt 2.x
+ QRegExp rx( "([0-9|]*\\)" ); // works in TQt 2.x
\endcode
should be converted into
\code
- QRegExp rx( "\\([0-9\\|]*\\)" ); // works in Qt 2.x and 3.x
+ QRegExp rx( "\\([0-9\\|]*\\)" ); // works in TQt 2.x and 3.x
\endcode
(Within character classes, the backslash is not necessary in front of certain
characters, e.g. <tt>|</tt>, but it doesn't hurt.)
@@ -555,7 +555,7 @@ string.
\section2 QRegExp::operator=()
-This function has been replaced by \l QRegExp::setPattern() in Qt 2.2.
+This function has been replaced by \l QRegExp::setPattern() in TQt 2.2.
Old code such as
\code
QRegExp rx( "alpha" );
@@ -563,7 +563,7 @@ Old code such as
rx.setWildcard( TRUE );
rx = "beta";
\endcode
-still compiles with Qt 3, but produces a different result (the case sensitivity
+still compiles with TQt 3, but produces a different result (the case sensitivity
and wildcard options are forgotten). This way,
\code
rx = "beta";
@@ -587,7 +587,7 @@ QRegExp::match() documentation \endlink explains how to replace it.
\section2 QRegExp::find()
-This function was removed, after a brief appearance in Qt 2.2. Its
+This function was removed, after a brief appearance in TQt 2.2. Its
name clashed with QString::find(). Use \l QRegExp::search() or \l
QString::find() instead.
@@ -600,7 +600,7 @@ For example,
\code
QString( "" ).contains( QRegExp("") )
\endcode
-returns 1 in Qt 2.0; it returns 0 in Qt 3.0. Also, "^" now really means
+returns 1 in TQt 2.0; it returns 0 in TQt 3.0. Also, "^" now really means
start of input, so
\code
QString( "Heisan Hoppsan" ).contains( QRegExp("^.*$") )
@@ -611,13 +611,13 @@ This change affect very few existing programs.
\section2 QString::replace()
-With Qt 1.0 and 2.0, a QString is converted implicitly into a QRegExp
+With TQt 1.0 and 2.0, a QString is converted implicitly into a QRegExp
as the first argument to QString::replace():
\code
QString text = fetch_it_from_somewhere();
text.replace( QString("[A-Z]+"), "" );
\endcode
-With Qt 3.0, the compiler gives an error. The solution is to use a
+With TQt 3.0, the compiler gives an error. The solution is to use a
QRegExp cast:
\code
text.replace( QRegExp("[A-Z]+"), "" );
@@ -656,7 +656,7 @@ icons. In 3.0, this mechanism was moved into the \l QIconSet class
The old \l QToolButton::onIconSet and \l QToolButton::offIconSet
properties are still provided so that old source will compile, but
their semantics have changed: they are now synonyms for \l
-QToolButton::iconSet. If you used that distinction in Qt 2.x, you will
+QToolButton::iconSet. If you used that distinction in TQt 2.x, you will
need to adjust your code to use the QIconSet On/Off mechanism.
Likewise, the \e on parameter of these two functions is now ignored:
@@ -694,7 +694,7 @@ the new names.
\section1 QTranslator
-The \l QTranslator class was extended in Qt 2.2, and these extensions
+The \l QTranslator class was extended in TQt 2.2, and these extensions
lead to a new interface. This interface is used mainly by translation
tools (for example, \link linguist-manual.book Qt
Linguist \endlink). For source compatibility, no member function was
@@ -718,7 +718,7 @@ future extensions.
QWidget::backgroundColor(), QWidget::setBackgroundColor(),
QWidget::backgroundPixmap() and QWidget::setBackgroundPixmap() have
-often been the source of much confusion in previous releases. Qt 3.0
+often been the source of much confusion in previous releases. TQt 3.0
addresses this by obsoleting these functions and by replacing them
with eight new functions: QWidget::eraseColor(),
QWidget::setEraseColor(), QWidget::erasePixmap(),
@@ -776,9 +776,9 @@ They are now obsolete.
\section1 Transparent widgets
-In Qt 2.x, the AutoMask property was used to obtain a
+In TQt 2.x, the AutoMask property was used to obtain a
transparent-looking widget. In general, this approach is slow and
-processor hungry. Qt 3.0 uses the BackgroundOrigin which provides
+processor hungry. TQt 3.0 uses the BackgroundOrigin which provides
vastly improved performance and more flexibility in most cases. The
few classes for which the AutoMask property is still the best approach
are QCheckBox, QComboBox, QPushButton, QRadioButton and QTabWidget.
@@ -799,13 +799,13 @@ respectively. Neither the arguments nor the resulting curve have changed.
\section1 Locale-aware String Comparisons in QIconView, QListBox,
QListView and QTable
-In Qt 2.x, QString only provided string comparisons using the Unicode
+In TQt 2.x, QString only provided string comparisons using the Unicode
values of the characters of a string. This is efficient and reliable,
but it is not the appropriate order for most languages. For example,
French users expect '&eacute;' (e acute) to be treated essentially as
'e' and not put after 'z'.
-In Qt 3.0, QString::localeAwareCompare() implements locale aware
+In TQt 3.0, QString::localeAwareCompare() implements locale aware
string comparisions on certain platforms. The classes \l QIconView, \l
QListBox, \l QListView and \l QTable now use
QString::localeAwareCompare() instead of QString::compare(). If you