summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVenu <venugopal.shivashankar@digia.com>2013-06-04 15:35:23 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-04 20:54:27 +0200
commit726a593fb6a8e8aa642e92684ed4ef3032702ade (patch)
tree6260f09f6aa2213c5faed3b3b0206d5cf80377dc
parent7310d8f60775040f620b8ccec201391bf1c7a79e (diff)
Doc: Minor language edits and broken link fixes
Task-number: QTBUG-30173 Change-Id: I56e4611b33856cbb075b0710917a1687239259a2 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
-rw-r--r--doc/src/portingcppapps_toqt5.qdoc36
-rw-r--r--doc/src/portingqmlapp.qdoc22
2 files changed, 32 insertions, 26 deletions
diff --git a/doc/src/portingcppapps_toqt5.qdoc b/doc/src/portingcppapps_toqt5.qdoc
index e6ea08aa9..2e63eb266 100644
--- a/doc/src/portingcppapps_toqt5.qdoc
+++ b/doc/src/portingcppapps_toqt5.qdoc
@@ -29,36 +29,42 @@
\title Porting C++ Applications to Qt 5
\brief Provides instructions to migrate a Qt 4 C++ application to Qt 5.
-This topic talks about the Qt Widgets change and provides guidance to handle it.
-The following step-by-step instructions takes you through the changes required
-to port the \l{Animated Tiles Example}{Animated Tiles} C++ application to Qt 5:
+This topic talks about the Qt Widgets and Qt WebKit changes in Qt 5. The
+following step-by-step instructions take you through the changes required to
+port the \l{Animated Tiles Example}{Animated Tiles} application to Qt 5:
\list 1
- \li Edit \c {main.cpp} and change the \c {#include <QtGui>} to \c {#include <QtWidgets>}.
- \note You can find a perl script called fixqt4headers in the bin directory of your Qt package that will
- automate many of the required header file changes.
- \li Edit the \c {animatedtiles.pro} and add \c {QT += widgets} towards the end of the file.
+ \li Open the Animated Tiles project using Qt Creator.
+ \li Edit \c {main.cpp} and replace the \c {#include <QtGui>} instance with
+ \c {#include <QtWidgets>}.
+ \li Edit the \c {animatedtiles.pro} and add \c {QT += widgets} towards the
+ end of the file.
\note QtGui is included by default in all Qt applications unless excluded using the \c {QT -= gui} directive in the \c{qmake} project file.
- \li Run qmake and make utilities to build the binary.
+ \li Save the changes and run the application.
\endlist
-This creates the \c animatedtiles executable. Try running the executable to see if the application behaves as expected.
+Once you see the application running, check whether it behaves as expected.
\image animatedtiles_snapshot.png "A snapshot of the \c animatedtiles application running on Ubuntu v12.04"
-A similar change is needed for porting Qt 4 applications using Qt WebKit to Qt 5. The following
+A similar change is needed to port Qt 4 C++ applications using Qt WebKit. The following
step-by-step instructions take you through the changes required to achieve this:
\list 1
- \li If using \c {#include <QtWebKit>}, add \c {#include <QtWebKitWidgets} in your source code.
- \li Edit the pro file and add \c {QT += webkitwidgets} towards the end of the file.
- \li Run qmake and make utilities to build the binary.
+ \li Open your project using Qt Creator.
+ \li Replace all \c {#include <QtWebKit>} instances with
+ \c {#include <QtWebKitWidgets>} in your project source.
+ \li Edit the \c{.pro} file and add \c {QT += webkitwidgets}.
+
+ \note If the \c {QT +=} statement already exists, append \c webkitwidgets
+ to it.
+ \li Save changes and run your application.
\endlist
\section1 Related topics
\list
-\li \l {API Changes}
+\li \l {C++ API Changes}
\li \l {Porting QML Applications to Qt 5 Example}
-\li \l {QML Examples and Demos}
+\li \l {Qt Examples And Tutorials}
\endlist
*/
diff --git a/doc/src/portingqmlapp.qdoc b/doc/src/portingqmlapp.qdoc
index f7c685833..daa23b56c 100644
--- a/doc/src/portingqmlapp.qdoc
+++ b/doc/src/portingqmlapp.qdoc
@@ -38,17 +38,19 @@ QML demo work on Qt 5. If you have the SDK based on Qt 4.8 installed, you can
find this demo application under
\c{<install_dir_root>/Examples/4.x/declarative/demos/}.
-The \c{flickr} application is a complete application that comes with a launcher.
-
-Follow these step-by-step instructions to make the \e{flickr} Qt 4 QML
-application work on Qt 5:
+Follow these step-by-step instructions to port the \e{flickr} Qt 4 QML
+application work to Qt 5:
\list 1
- \li Edit all the \c{.qml} files and replace \c{import QtQuick 1.0} statements
+ \li Open the \e{flickr} project using Qt Creator.
+ \li Edit all the \c{.qml} files and replace the \c{import QtQuick 1.0} statements
with \c{import QtQuick 2.0}.
\li Add the additional \c{import QtQuick.XmlListModel 2.0} statement to
\c{qml/common/RssModel.qml}.
- \note XmlListModel is part of a submodule under QtQuick and it must be
- imported explicitly to use it.
+
+ \note \l{Qt Quick XmlListModel QML Types}{XmlListModel} is part of a
+ submodule under \l{QtQuick} and it must be imported explicitly in order
+ to use it.
+
\li Make the following changes to
\c{qmlapplicationviewer/qmlapplicationviewer.h}:
\list
@@ -80,12 +82,10 @@ application work on Qt 5:
\li Remove the code between \c{#if QT_VERSION < 0x040702} and \c{#else}, and
\c{#endif // QT_VERSION < 0x040702} macros towards the end.
\endlist
- \li Run the \c{qmake} and \c{make} utilities to build the application.
- \note Ensure that the \c{PATH} environment variable is pointing to the
- Qt 5 binaries and libraries directories, before running \c{qmake}.
+ \li Save changes to the project and run the application.
\endlist
-Run the \c{flickr} application to see whether it behaves as expected. Here is a
+Once you see the application running, check whether it behaves as expected. Here is a
snapshot of the application running on Ubuntu v12.04:
\image flickr_application.png