Source

Target

Commits (2)
Showing with 74 additions and 58 deletions
...@@ -30,66 +30,70 @@ ...@@ -30,66 +30,70 @@
\title Core Internals \title Core Internals
\brief Qt's core topics \brief Qt's core topics
Qt contains a rich set of fundamental enablers, mainly in the \l{QtCore}{Qt Qt contains a rich set of fundamental enablers, mainly from the \l{Qt Core}
Core module}. Qt uses these enablers to provide higher-level UI and module. Qt uses these enablers to provide higher-level UI and application
application development components. The following topics explain the most development components. The following topics explain the most important enablers
important enablers and show how to use them to implement specialized and show how to use them to implement specialized functionality not already
functionality not already provided by Qt. provided by Qt.
\section1 Objects, Properties and Events \section1 Objects, Properties, and Events
The QObject class serves as the main class in Qt's \l{object model} and is used as a superclass The QObject class forms the foundation of Qt's \l{object model} and is the
of a great number of other Qt classes. It provides features such as a parent class of many Qt classes. The object model introduces many mechanisms such
\l{The Meta-Object System}{meta-object system} which allows run-time introspection, manipulation as a \l{The Meta-Object System}{meta-object system} which allows run-time
and invocation of \l{The property system}{properties} and methods in the object. It also introspection, manipulation, and invocation of \l{The property
serves as the basis for Qt's \l{The Event System}{event system}, which is a low-level way of system}{properties} and methods in the object. It also serves as the basis for
communicating between QObject-based objects. Another, more high-level form of communication is Qt's \l{The Event System}{event system}, which is a low-level way of
provided in Qt's \l{Signals & Slots} mechanism. These features can also be used in combination communicating between QObject-based objects. Another high-level form of
with \l{The State Machine Framework} which provides a formally defined and predictable way of communication is provided in Qt's \l{Signals & Slots} mechanism. These features
managing the states of your application. can also be used in combination with \l{The State Machine Framework} which
provides a formally defined and predictable way of managing the states of your
application.
\section1 Container Classes \section1 Container Classes
A container is a data structure whose instances are collections of other A \e container is a data structure whose instances are collections of other
objects. Some examples of containers are: dynamic arrays, queues, linked objects. Some examples of containers are: dynamic arrays, queues, linked
lists, and associative arrays. Qt provides a set of general purpose, lists, and associative arrays. Qt provides a set of general purpose,
template-based container classes that can be used to store data in memory. template-based container classes for structuring data in memory.
See the full list of \l {Container Classes} for more details. See the full list of \l {Container Classes} for more details.
\section1 Internationalization \section1 Internationalization
Qt uses \l{Unicode in Qt}{unicode} for the encoding of displayable text strings in order to provide Qt uses \l{Unicode in Qt}{Unicode} for the encoding of displayable text strings.
support for all commonly used writing systems in the world. Applications can also be written Unicode provides support for all commonly used writing systems in the world and
to support any number of different languages with one code base using Qt's powerful is ideal for cross-platform development. Applications can also be written to
support any number of different languages with one code base using Qt's powerful
\l{Internationalization with Qt}{internationalization system}. \l{Internationalization with Qt}{internationalization system}.
\section1 Inter-Process Communication \section1 Inter-Process Communication
Qt provides several classes to support Qt provides several classes to support \l{Inter-Process Communication in
\l{Inter-Process Communication in Qt}{communication between processes}. You can also launch Qt}{communication between processes}. You can also launch and manage external
and manage external processes using the \l{QProcess} class. processes using the \l{QProcess} class.
\section1 Threading \section1 Threading
Qt supports \l{Thread Support in Qt}{primitives and convenience functionality} to manage Qt supports \l{Thread Support in Qt}{primitives and convenience functionality}
\l{Threading Basics}{threads and parallelize code} in a safe and platform-independent way. to manage \l{Threading Basics}{threads and parallelized code} in a safe and
platform-independent way.
\section1 Platform Support \section1 Platform Support
Qt allows you to write platform-independent code, where the same code base can be compiled Qt allows you to write platform-independent code, where the same code base can
for and deployed on different platforms without any changes. In cases where you need to use be compiled for and deployed on different platforms without any changes. In
platform-specific features and integrate with system libraries, Qt also provides solutions cases where you need to use platform-specific features and integrate with system
for this. libraries, Qt also provides solutions for this.
Qt integrates with the windowing system on the target platform using the Qt integrates with the windowing system on the target platform using \l{Qt
\l{Qt Platform Abstraction}. This is an abstraction of the windowing system which Platform Abstraction} (QPA). QPA is an abstraction of a windowing system which
makes porting Qt to new platforms simple and quick. One such system is the makes porting Qt to new platforms simple and quick. One such system is the
Wayland protocol. \l{Wayland Support in Qt}{Qt can be used together with Wayland}, which e.g. can Wayland protocol. Qt can be used together with \l{Wayland Support in Qt}{
serve as a light-weight windowing system on embedded hardware to support a multi-process graphical user Wayland} as light-weight windowing system on embedded hardware to support a
interface. multi-process graphical user interface.
The Qt Platform Abstraction uses \l{How to Create Qt Plugins}{Qt's plugin system}. This system The Qt Platform Abstraction uses \l{How to Create Qt Plugins}{Qt's plugin
provides APIs to extend Qt in specific areas (such as adding support for new image formats, database system}. This system provides APIs to extend Qt in specific areas (such as
drivers, etc.) and also for writing your own extensible Qt applications which support third-party adding support for new image formats, database drivers, and so on) and also for
plugins. writing your own extensible Qt applications which support third-party plugins.
*/ */
...@@ -27,36 +27,48 @@ ...@@ -27,36 +27,48 @@
/*! /*!
\page testing-and-debugging.html \page testing-and-debugging.html
\title Testing and debugging \title Testing and Debugging
\brief Writing unit tests and debugging with Qt \brief Writing unit tests and debugging with Qt
Qt provides various functionality to help you develop high quality code. There are features Qt provides various functionality to help you develop high quality code. There
that assist in debugging to track down bugs, and testing facilities that help to keep the bugs out. are features that assist in debugging to track down bugs, and testing facilities
that help to keep the bugs out.
\section1 Testing Qt-based code \section1 Unit Testing
The fundamental level of code testing is the unit test. Qt facilitates the creation of unit tests: Qt facilitates the creation of unit tests to test interfaces such as classes,
functions, or whole libraries.
\list \list
\li \l {Qt Test Overview}{Qt Test Module} (also known as "testlib") provides a framework for unit tests of C++ code \li \l {Qt Test Overview}{Qt Test} (also known as \e testlib) - a framework for unit tests of C++ code
\li \l {QtQuickTest Reference Documentation}{Qt QuickTest} is a framework for unit tests of QML code \li \l {Qt Quick Test Reference Documentation}{Qt Quick Test} - a framework for unit tests of QML code
\endlist \endlist
Qt itself has a significant number of self-tests built with the Qt Test and QuickTest frameworks. These \section2 Autotests
self-tests are available for study in the \c tests/auto subdirectories of the source code of each Qt module.
The self-tests are an important part of the continuous quality assurance in the development of Qt.
For higher-level testing, powerful third-party tools are available in the Qt ecosystem. Qt itself has a significant number of unit tests written with the Qt Test and Qt
Quick Test frameworks (\e autotests). These autotests are available for study in
the \c tests/auto directories of the source code of each Qt module. The
autotests are an important part of the continuous quality assurance in the
development of Qt.
\section1 Debugging Qt applications \section1 Testing with Qt Creator
Qt provides many facilities to assist with debugging: Qt Creator's full debugging workflow supports debugging both C++ and QML code
as well as the ability to profile code.
For more information, consult the \l{Qt Creator Manual}:
\list \list
\li \l {Debugging Techniques} for Qt C++ code \li \l{Qt Creator: Debugging}{Debugging}
\li \l{Qt Creator: Analyzing Code}{Analyzing Code}
\endlist
\section1 Debugging Techniques
These pages contain suggestions for debugging under various circumstances:
\list
\li \l {Debugging Techniques} - for C++ code
\li \l {Debugging QML Applications} \li \l {Debugging QML Applications}
\li The "Debugging Plugins" section of the \l {Deploying Plugins} overview \li \l {Debugging Plugins}
\li The "Debugging" chapter of the Qt Creator Manual
\endlist \endlist
*/ */