diff options
author | David Boddie <david.boddie@nokia.com> | 2011-02-28 15:33:14 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2011-02-28 15:33:14 (GMT) |
commit | a220e7c51c701a81a675a46a76838260527fcc8e (patch) | |
tree | a12130be836dba239c22dbd7d2af9db05d0a830c | |
parent | a27bce53b8d629c6eb41804476594abd0c9a482f (diff) | |
parent | f691e052afbc6fef9f2954e7a7915be85a10f473 (diff) | |
download | Qt-a220e7c51c701a81a675a46a76838260527fcc8e.zip Qt-a220e7c51c701a81a675a46a76838260527fcc8e.tar.gz Qt-a220e7c51c701a81a675a46a76838260527fcc8e.tar.bz2 |
Merge commit 'refs/merge-requests/1113' of git://gitorious.org/qt/qt into merge-requests/1113
Conflicts:
doc/src/development/qmake-manual.qdoc
34 files changed, 1398 insertions, 923 deletions
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc index 0f69bdb..019f04a 100644 --- a/doc/src/declarative/extending.qdoc +++ b/doc/src/declarative/extending.qdoc @@ -55,7 +55,7 @@ to either instantiating an object instance, or assigning a property a value. QML relies heavily on Qt's meta object system and can only instantiate classes that derive from QObject. For visual element types, this will usually mean a subclass of QDeclarativeItem; for models used with the view elements, a subclass of QAbstractItemModel; -and for abitrary objects with properties, a direct subclass of QObject. +and for arbitrary objects with properties, a direct subclass of QObject. The QML engine has no intrinsic knowledge of any class types. Instead the programmer must register the C++ types with their corresponding QML names. @@ -526,7 +526,7 @@ The \c {invite()} method is similarly available if it is declared as a slot. \snippet examples/declarative/cppextensions/referenceexamples/valuesource/example.qml 0 \snippet examples/declarative/cppextensions/referenceexamples/valuesource/example.qml 1 -The QML snippet shown above applies a property value source to the \c announcment property. +The QML snippet shown above applies a property value source to the \c announcement property. A property value source generates a value for a property that changes over time. Property value sources are most commonly used to do animation. Rather than @@ -566,7 +566,7 @@ assignment fails does the engine call the \l {QDeclarativePropertyValueSource::} the type to also be used in contexts other than just as a value source. \l {Extending QML - Property Value Source Example} shows the complete code used -implement the \c HappyBirthdaySong property value source. +to implement the \c HappyBirthdaySong property value source. \section1 Property Binding diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc index 6cfe356..d4e2a7a 100644 --- a/doc/src/development/qmake-manual.qdoc +++ b/doc/src/development/qmake-manual.qdoc @@ -34,26 +34,26 @@ \ingroup qttools \keyword qmake - \l {qmake}{ \c qmake} is a tool that helps simplify the build - process for development project across different platforms. \l {qmake}{ \c qmake} + \l{qmake}{\c qmake} is a tool that helps simplify the build process for + development project across different platforms. \l{qmake}{\c qmake} automates the generation of Makefiles so that only a few lines of - information are needed to create each Makefile. \l {qmake}{ \c qmake} can be used for - any software project, whether it is written in Qt or not. - - \l {qmake}{ \c qmake} generates a Makefile based on the information in a project - file. Project files are created by the developer, and are usually - simple, but more sophisticated project files can be created for - complex projects. - \l {qmake}{ \c qmake} contains additional features to support development with Qt, - automatically including build rules for \l{moc.html}{moc} + information are needed to create each Makefile. \l{qmake}{\c qmake} can be + used for any software project, whether it is written in Qt or not. + + \l{qmake}{\c qmake} generates a Makefile based on the information in a + project file. Project files are created by the developer, and are usually + simple, but more sophisticated project files can be created for complex + projects. + \l{qmake}{\c qmake} contains additional features to support development + with Qt, automatically including build rules for \l{moc.html}{moc} and \l{uic.html}{uic}. - \l {qmake}{ \c qmake} can also generate projects for Microsoft Visual studio + \l{qmake}{\c qmake} can also generate projects for Microsoft Visual studio without requiring the developer to change the project file. \section1 Getting Started The \l{qmake Tutorial} and guide to \l{qmake Common Projects} provide overviews - that aim to help new users get started with \l {qmake}{ \c qmake}. + that aim to help new users get started with \l{qmake}{\c qmake}. \list \o \l{qmake Tutorial} @@ -98,23 +98,24 @@ \previouspage qmake Manual \nextpage qmake Project Files - \l {qmake}{ \c qmake} provides a project-oriented system for managing the build - process for applications, libraries, and other components. This - approach gives developers control over the source files used, and + \l{qmake Manual#qmake}{\c qmake} provides a project-oriented system for + managing the buildprocess for applications, libraries, and other components. + This approach gives developers control over the source files used, and allows each of the steps in the process to be described concisely, - typically within a single file. \l {qmake}{ \c qmake} expands the information in - each project file to a Makefile that executes the necessary commands - for compiling and linking. + typically within a single file. \l{qmake Manual#qmake}{\c qmake} expands + the information in each project file to a Makefile that executes the necessary + commands for compiling and linking. In this document, we provide a basic introduction to project files, - describe some of the main features of \l {qmake}{ \c qmake}, and show how to use - \l {qmake}{ \c qmake} on the command line. + describe some of the main features of \l{qmake Manual#qmake}{\c qmake}, + and show how to use \l{qmake Manual#qmake}{\c qmake} on the command line. \section1 Describing a Project Projects are described by the contents of project (\c .pro) files. - The information within these is used by \l {qmake}{ \c qmake} to generate a Makefile - containing all the commands that are needed to build each project. + The information within these is used by \l{qmake Manual#qmake}{\c qmake} + to generate a Makefile containing all the commands that are needed to + build each project. Project files typically contain a list of source and header files, general configuration information, and any application-specific details, such as a list of extra libraries to link against, or a list of extra @@ -134,13 +135,14 @@ \section1 Building a Project - For simple projects, you only need to run \l {qmake}{ \c qmake} in the top - level directory of your project. By default, \l {qmake}{ \c qmake} generates a - Makefile that you then use to build the project, and you can then - run your platform's \c make tool to build the project. + For simple projects, you only need to run \l{qmake Manual#qmake}{\c qmake} + in the top level directory of your project. By default, + \l{qmake Manual#qmake}{\c qmake} generates a Makefile that you then use + to build the project, and you can then run your platform's \c make tool + to build the project. - \l {qmake}{ \c qmake} can also be used to generate project files. A full - description of \c{qmake}'s command line options can be found in the + \l{qmake Manual#qmake}{\c qmake} can also be used to generate project files. + A full description of \c{qmake}'s command line options can be found in the \l{Running qmake} chapter of this manual. \section1 Using Precompiled Headers @@ -157,38 +159,40 @@ \previouspage Using qmake \nextpage Running qmake - Project files contain all the information required by \l {qmake}{ \c qmake} to build - your application, library, or plugin. The resources used by your project - are generally specified using a series of declarations, but support for - simple programming constructs allow you to describe different build - processes for different platforms and environments. + Project files contain all the information required by + \l{qmake Manual#qmake}{\c qmake} to build your application, library, + or plugin. The resources used by your project are generally specified + using a series of declarations, but support for simple programming + constructs allow you to describe different build processes for different + platforms and environments. \tableofcontents \section1 Project File Elements - The project file format used by \l {qmake}{ \c qmake} can be used to support both - simple and fairly complex build systems. Simple project files will - use a straightforward declarative style, defining standard variables - to indicate the source and header files that are used in the project. - Complex projects may use the control flow structures to fine-tune the - build process. + The project file format used by \l{qmake Manual#qmake}{\c qmake} can be + used to support both simple and fairly complex build systems. + Simple project files will use a straightforward declarative style, + defining standard variables to indicate the source and header files + that are used in the project. Complex projects may use the control flow + structures to fine-tune the build process. The following sections describe the different types of elements used in project files. \section2 Variables - In a project file, variables are used to hold lists of strings. - In the simplest projects, these variables inform \l {qmake}{ \c qmake} about the - configuration options to use, or supply filenames and paths to use - in the build process. + In a project file, variables are used to hold lists of strings. In the + simplest projects, these variables inform \l{qmake Manual#qmake}{\c qmake} + about the configuration options to use, or supply filenames and paths to + use in the build process. - \l {qmake}{ \c qmake} looks for certain variables in each project file, and it - uses the contents of these to determine what it should write to a - Makefile. For example, the list of values in the \c HEADERS and - \c SOURCES variables are used to tell \l {qmake}{ \c qmake} about header and - source files in the same directory as the project file. + \l{qmake Manual#qmake}{\c qmake} looks for certain variables in each + project file, and it uses the contents of these to determine what it + should write to a Makefile. For example, the list of values in the + \c HEADERS and \c SOURCES variables are used to tell + \l{qmake Manual#qmake}{\c qmake} about header and source files in the + same directory as the project file. Variables can also be used internally to store temporary lists of values, and existing lists of values can be overwritten or extended with new @@ -206,14 +210,15 @@ \snippet doc/src/snippets/qmake/variables.pro 1 - The \c CONFIG variable is another special variable that \l {qmake}{ \c qmake} - uses when generating a Makefile. It is discussed in the section on + The \c CONFIG variable is another special variable that + \l{qmake Manual#qmake}{\c qmake} uses when generating a Makefile. + It is discussed in the section on \l{#GeneralConfiguration}{general configuration} later in this chapter. In the above line, \c qt is added to the list of existing values contained in \c CONFIG. - The following table lists the variables that \l {qmake}{ \c qmake} recognizes, and - describes what they should contain. + The following table lists the variables that \l{qmake Manual#qmake}{\c qmake} + recognizes, and describes what they should contain. \table \header \o Variable \o Contents @@ -276,8 +281,9 @@ \section2 Built-in Functions and Control Flow - \l {qmake}{ \c qmake} provides a number of built-in functions to allow the contents - of variables to be processed. The most commonly used function in simple + \l{qmake Manual#qmake}{\c qmake} provides a number of built-in functions + to allow the contents of variables to be processed. + The most commonly used function in simple project files is the \c include function which takes a filename as an argument. The contents of the given file are included in the project file at the place where the \c include function is used. @@ -295,7 +301,8 @@ The assignments inside the braces are only made if the condition is true. In this case, the special \c win32 variable must be set; this happens automatically on Windows, but this can also be specified on - other platforms by running \l {qmake}{ \c qmake} with the \c{-win32} command line + other platforms by running \l{qmake Manual#qmake}{\c qmake} + with the \c{-win32} command line option (see \l{Running qmake} for more information). The opening brace must stand on the same line as the condition. @@ -316,15 +323,17 @@ \section1 Project Templates The \c TEMPLATE variable is used to define the type of project that will - be built. If this is not declared in the project file, \l {qmake}{ \c qmake} assumes - that an application should be built, and will generate an appropriate - Makefile (or equivalent file) for the purpose. + be built. If this is not declared in the project file, + \l{qmake Manual#qmake}{\c qmake} assumes that an application should be + built, and will generate an appropriate Makefile (or equivalent file) + for the purpose. The types of project available are listed in the following table with - information about the files that \l {qmake}{ \c qmake} will generate for each of them: + information about the files that \l{qmake Manual#qmake}{\c qmake} + will generate for each of them: \table - \header \o Template \o Description of \l {qmake}{ \c qmake}output + \header \o Template \o Description of \l{qmake Manual#qmake}{\c qmake} output \row \o app (default) \o Creates a Makefile to build an application. \row \o lib \o Creates a Makefile to build a library. \row \o subdirs \o Creates a Makefile containing rules for the @@ -339,9 +348,10 @@ See the \l{qmake Tutorial} for advice on writing project files for projects that use the \c app and \c lib templates. - When the \c subdirs template is used, \l {qmake}{ \c qmake} generates a Makefile - to examine each specified subdirectory, process any project file it finds - there, and run the platform's \c make tool on the newly-created Makefile. + When the \c subdirs template is used, \l{qmake Manual#qmake}{\c qmake} + generates a Makefile to examine each specified subdirectory, + process any project file it finds there, and run the platform's + \c make tool on the newly-created Makefile. The \l{qmake Variable Reference#SUBDIRS}{SUBDIRS} variable is used to contain a list of all the subdirectories to be processed. @@ -351,7 +361,8 @@ The \l{qmake Variable Reference#CONFIG}{CONFIG variable} specifies the options and features that the compiler should use and the libraries that should be linked against. Anything can be added to the \c CONFIG variable, - but the options covered below are recognized by \l {qmake}{ \c qmake} internally. + but the options covered below are recognized by + \l{qmake Manual#qmake}{\c qmake} internally. The following options control the compiler flags that are used to build the project: @@ -363,11 +374,11 @@ \row \o debug \o The project is to be built in debug mode. \row \o debug_and_release \o The project is built in \e both debug and release modes. - \row \o debug_and_release_target \o The project is built in \e both debug + \row \o debug_and_release_target \o The project is built in \e both debug and release modes. TARGET is built into \e both the debug and release directories. \row \o build_all \o If \c debug_and_release is specified, the project is built in both debug and release modes by default. - \row \o autogen_precompile_source \o Automatically generates a \c .cpp file that includes + \row \o autogen_precompile_source \o Automatically generates a \c .cpp file that includes the precompiled header file specified in the .pro file. \row \o ordered \o When using the \c subdirs template, this option specifies that the directories listed should be processed in the @@ -375,13 +386,13 @@ \row \o warn_on \o The compiler should output as many warnings as possible. This is ignored if \c warn_off is specified. \row \o warn_off \o The compiler should output as few warnings as possible. - \row \o copy_dir_files \o Enables the install rule to also copy directories, not just files. + \row \o copy_dir_files \o Enables the install rule to also copy directories, not just files. \endtable The \c debug_and_release option is special in that it enables \e both debug and release versions of a project to be built. In such a case, the Makefile that - \l {qmake}{ \c qmake} generates includes a rule that builds both versions, and this can be - invoked in the following way: + \l{qmake Manual#qmake}{\c qmake} generates includes a rule that builds both versions, + and this can be invoked in the following way: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 0 @@ -428,8 +439,9 @@ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 1 - Note, that you must use "+=", not "=", or \l {qmake}{ \c qmake} will not be able to - use Qt's configuration to determine the settings needed for your project. + Note, that you must use "+=", not "=", or \l{qmake Manual#qmake}{\c qmake} + will not be able to use Qt's configuration to determine the settings + needed for your project. \section1 Declaring Qt Libraries @@ -478,14 +490,14 @@ \section1 Configuration Features - \l {qmake}{ \c qmake} can be set up with extra configuration features that are specified - in feature (.prf) files. These extra features often provide support for - custom tools that are used during the build process. To add a feature to - the build process, append the feature name (the stem of the feature filename) - to the \c CONFIG variable. + \l{qmake Manual#qmake}{\c qmake} can be set up with extra configuration + features that are specified in feature (.prf) files. These extra features + often provide support for custom tools that are used during the build + process. To add a feature to the build process, append the feature name + (the stem of the feature filename) to the \c CONFIG variable. - For example, \l {qmake}{ \c qmake} can configure the build process to take advantage - of external libraries that are supported by + For example, \l{qmake Manual#qmake}{\c qmake} can configure the build + process to take advantage of external libraries that are supported by \l{http://www.freedesktop.org/wiki/Software_2fpkgconfig}{pkg-config}, such as the D-Bus and ogg libraries, with the following lines: @@ -501,8 +513,8 @@ If you are using other libraries in your project in addition to those supplied with Qt, you need to specify them in your project file. - The paths that \l {qmake}{ \c qmake} searches for libraries and the specific libraries - to link against can be added to the list of values in the + The paths that \l{qmake Manual#qmake}{\c qmake} searches for libraries + and the specific libraries to link against can be added to the list of values in the \l{qmake Variable Reference#LIBS}{LIBS} variable. The paths to the libraries themselves can be given, or the familiar Unix-style notation for specifying libraries and paths can be used if preferred. @@ -527,8 +539,8 @@ \previouspage qmake Project Files \nextpage qmake Platform Notes - The behavior of \l {qmake}{ \c qmake} can be customized when it is run by - specifying various options on the command line. These allow the + The behavior of \l{qmake Manual#qmake}{\c qmake} can be customized when it + is run by specifying various options on the command line. These allow the build process to be fine-tuned, provide useful diagnostic information, and can be used to specify the target platform for your project. @@ -540,21 +552,23 @@ \section2 Syntax - The syntax used to run \l {qmake}{ \c qmake} takes the following simple form: + The syntax used to run \l{qmake Manual#qmake}{\c qmake} takes the + following simple form: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 8 - \l {qmake}{ \c qmake} supports two different modes of operation: In the default mode, - \l {qmake}{ \c qmake} will use the description in a project file to generate a Makefile, - but it is also possible to use \l {qmake}{ \c qmake} to generate project files. + \l{qmake Manual#qmake}{\c qmake} supports two different modes of operation: + In the default mode,\l{qmake Manual#qmake}{\c qmake} will use the + description in a project file to generate a Makefile, but it is also + possible to use \l{qmake Manual#qmake}{\c qmake} to generate project files. If you want to explicitly set the mode, you must specify it before all other options. The \c mode can be either of the following two values: \list \o \c -makefile \BR - \c qmake output will be a Makefile. + \l{qmake Manual#qmake}{\c qmake} output will be a Makefile. \o \c -project \BR - \c qmake output will be a project file. \BR + \l{qmake Manual#qmake}{\c qmake} output will be a project file. \BR \bold{Note:} It is likely that the created file will need to be edited; for example, adding the \c QT variable to suit what modules are required for the project. \endlist @@ -570,42 +584,48 @@ \section2 Options - A wide range of options can be specified on the command line to \l {qmake}{ \c qmake} in - order to customize the build process, and to override default settings for - your platform. The following basic options provide usage information, specify - where \l {qmake}{ \c qmake} writes the output file, and control the level of debugging - information that will be written to the console: + A wide range of options can be specified on the command line to + \l{qmake Manual#qmake}{\c qmake} in order to customize the build process, + and to override default settings for your platform. The following basic + options provide usage information, specify where + \l{qmake Manual#qmake}{\c qmake} writes the output file, and control the + level of debugging information that will be written to the console: \list \o \c -help \BR - \c qmake will go over these features and give some useful help. + \l{qmake Manual#qmake}{\c qmake} will go over these features and give some + useful help. \o \c -o file \BR - \c qmake output will be directed to \e file. If this option - is not specified, \c qmake will try to use a suitable file name for its - output, depending on the mode it is running in.\BR + \l{qmake Manual#qmake}{\c qmake} output will be directed to \e file. If + this option is not specified, \l{qmake Manual#qmake}{\c qmake} will try + to use a suitable file name for its output, depending on the mode it is + running in.\BR If '-' is specified, output is directed to stdout. \o \c -d \BR - \c qmake will output debugging information. + \l{qmake Manual#qmake}{\c qmake} will output debugging information. \endlist - For projects that need to be built differently on each target platform, with - many subdirectories, you can run \l {qmake}{ \c qmake} with each of the following - options to set the corresponding platform-specific variable in each - project file: + For projects that need to be built differently on each target platform, + with many subdirectories, you can run \l{qmake Manual#qmake}{\c qmake} with + each of the following options to set the corresponding platform-specific + variable in each project file: \list \o \c -unix \BR - \c qmake will run in unix mode. In this mode, Unix file - naming and path conventions will be used, additionally testing for \c unix - (as a scope) will succeed. This is the default mode on all Unices. + \l{qmake Manual#qmake}{\c qmake} will run in unix mode. In this mode, + Unix file naming and path conventions will be used, additionally + testing for \c unix (as a scope) will succeed. This is the default + mode on all Unices. \o \c -macx \BR - \c qmake will run in Mac OS X mode. In this mode, Unix file - naming and path conventions will be used, additionally testing for \c macx - (as a scope) will succeed. This is the default mode on Mac OS X. + \l{qmake Manual#qmake}{\c qmake} will run in Mac OS X mode. In this + mode, Unix file naming and path conventions will be used, additionally + testing for \c macx (as a scope) will succeed. This is the default mode + on Mac OS X. \o \c -win32 \BR - \c qmake will run in win32 mode. In this mode, Windows file naming and path - conventions will be used, additionally testing for \c win32 (as a scope) - will succeed. This is the default mode on Windows. + \l{qmake Manual#qmake}{\c qmake} will run in win32 mode. In this mode, + Windows file naming and path conventions will be used, additionally + testing for \c win32 (as a scope) will succeed. This is the default + mode on Windows. \endlist The template used for the project is usually specified by the \c TEMPLATE @@ -614,10 +634,11 @@ \list \o \c -t tmpl \BR - \c qmake will override any set \c TEMPLATE variables with tmpl, but only - \e after the .pro file has been processed. + \l{qmake Manual#qmake}{\c qmake} will override any set \c TEMPLATE + variables with tmpl, but only \e after the .pro file has been processed. \o \c -tp prefix \BR - \c qmake will add the prefix to the \c TEMPLATE variable. + \l{qmake Manual#qmake}{\c qmake} will add the prefix to the \c TEMPLATE + variable. \endlist The level of warning information can be fine-tuned to help you find problems in @@ -625,17 +646,19 @@ \list \o \c -Wall \BR - \c qmake will report all known warnings. + \l{qmake Manual#qmake}{\c qmake} will report all known warnings. \o \c -Wnone \BR - No warning information will be generated by \c qmake. + No warning information will be generated by \ + l{qmake Manual#qmake}{\c qmake}. \o \c -Wparser \BR - \c qmake will only generate parser warnings. This will alert - you to common pitfalls and potential problems in the parsing of your - project files. + \l{qmake Manual#qmake}{\c qmake} will only generate parser warnings. + This will alert you to common pitfalls and potential problems in the + parsing of your project files. \o \c -Wlogic \BR - \c qmake will warn of common pitfalls and potential problems in your - project file. For example, \c qmake will report whether a file is placed - into a list of files multiple times, or if a file cannot be found. + \l{qmake Manual#qmake}{\c qmake} will warn of common pitfalls and + potential problems in your project file. For example, + \l{qmake Manual#qmake}{\c qmake} will report whether a file is placed + into a list of files multiple times, or if a file cannot be found. \endlist \target MakefileMode @@ -643,28 +666,31 @@ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 9 - In Makefile mode, \l {qmake}{ \c qmake} will generate a Makefile that is used to build the - project. Additionally, the following options may be used in this mode to - influence the way the project file is generated: + In Makefile mode, \l{qmake Manual#qmake}{\c qmake} will generate a Makefile + that is used to build the project. Additionally, the following options may + be used in this mode to influence the way the project file is generated: \list \o \c -after \BR - \c qmake will process assignments given on the command line after - the specified files. + \l{qmake Manual#qmake}{\c qmake} will process assignments given on the + command line after the specified files. \o \c -nocache \BR - \c qmake will ignore the .qmake.cache file. + \l{qmake Manual#qmake}{\c qmake} will ignore the .qmake.cache file. \o \c -nodepend \BR - \c qmake will not generate any dependency information. + \l{qmake Manual#qmake}{\c qmake} will not generate any dependency + information. \o \c -cache file \BR - \c qmake will use \e file as the cache file, ignoring any other - .qmake.cache files found. + \l{qmake Manual#qmake}{\c qmake} will use \e file as the cache file, + ignoring any other .qmake.cache files found. \o \c -spec spec \BR - \c qmake will use \e spec as a path to platform and compiler information, - and the value of \c QMAKESPEC will be ignored. + \l{qmake Manual#qmake}{\c qmake} will use \e spec as a path to + platform and compiler information, and the value of \c QMAKESPEC will + be ignored. \endlist - You may also pass \l {qmake}{ \c qmake} assignments on the command line; - they will be processed before all of the files specified. For example: + You may also pass \l{qmake Manual#qmake}{\c qmake} assignments on the + command line; they will be processed before all of the files specified. + For example: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 10 @@ -684,15 +710,16 @@ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 12 - In project mode, \l {qmake}{ \c qmake} will generate a project file. Additionally, you - may supply the following options in this mode: + In project mode, \l{qmake Manual#qmake}{\c qmake} will generate a project + file. Additionally, you may supply the following options in this mode: \list \o \c -r \BR - \c qmake will look through supplied directories recursively + \l{qmake Manual#qmake}{\c qmake} will look through supplied directories + recursively \o \c -nopwd \BR - \c qmake will not look in your current working directory for - source code and only use the specified \c files + \l{qmake Manual#qmake}{\c qmake} will not look in your current working + directory for source code and only use the specified \c files \endlist In this mode, the \c files argument can be a list of files or directories. @@ -715,9 +742,10 @@ Many cross-platform projects can be handled by the \c{qmake}'s basic configuration features. On some platforms, it is sometimes useful, or even - necessary, to take advantage of platform-specific features. \l {qmake}{ \c qmake} knows - about many of these features, and these can be accessed via specific - variables that only have an effect on the platforms where they are relevant. + necessary, to take advantage of platform-specific features. + \l{qmake Manual#qmake}{\c qmake} knows about many of these features, and + these can be accessed via specific variables that only have an effect on + the platforms where they are relevant. \tableofcontents @@ -728,15 +756,16 @@ \section2 Source and Binary Packages - The version of \l {qmake}{ \c qmake} supplied in source packages is configured slightly - differently to that supplied in binary packages in that it uses a different - feature specification. Where the source package typically uses the - \c macx-g++ specification, the binary package is typically configured to - use the \c macx-xcode specification. + The version of \l{qmake Manual#qmake}{\c qmake} supplied in source packages + is configured slightly differently to that supplied in binary packages in + that it uses a different feature specification. Where the source package + typically uses the \c macx-g++ specification, the binary package is + typically configured to use the \c macx-xcode specification. - Users of each package can override this configuration by invoking \l {qmake}{ \c qmake} - with the \c -spec option (see \l{Running qmake} for more information). This - makes it possible, for example, to use \l {qmake}{ \c qmake} from a binary package to + Users of each package can override this configuration by invoking + \l{qmake Manual#qmake}{\c qmake} with the \c -spec option (see + \l{Running qmake} for more information). This makes it possible, for + example, to use \l{qmake Manual#qmake}{\c qmake} from a binary package to create a Makefile in a project directory with the following command line invocation: @@ -744,9 +773,9 @@ \section2 Using Frameworks - \l {qmake}{ \c qmake} is able to automatically generate build rules for linking against - frameworks in the standard framework directory on Mac OS X, located at - \c{/Library/Frameworks/}. + \l{qmake Manual#qmake}{\c qmake} is able to automatically generate build + rules for linking against frameworks in the standard framework directory on + Mac OS X, located at \c{/Library/Frameworks/}. Directories other than the standard framework directory need to be specified to the build system, and this is achieved by appending linker options to the @@ -804,8 +833,9 @@ The architectures to be supported in the binary are specified with the \l{qmake Variable Reference#CONFIG}{CONFIG} variable. For example, the - following assignment causes \l {qmake}{ \c qmake} to generate build rules to create - a universal binary for both PowerPC and x86 architectures: + following assignment causes \l{qmake Manual#qmake}{\c qmake} to generate + build rules to create a universal binary for both PowerPC and x86 + architectures: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 18 @@ -819,13 +849,15 @@ Developers on Mac OS X can take advantage of \c{qmake}'s support for Xcode project files, as described in \l{Qt is Mac OS X Native#Development Tools}{Qt is Mac OS X Native}, - by running \l {qmake}{ \c qmake} to generate an Xcode project from an existing \l {qmake}{ \c qmake} - project files. For example: + by running \l{qmake Manual#qmake}{\c qmake} to generate an Xcode project + from an existing \l{qmake Manual#qmake}{\c qmake} project files. For + example: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 19 - Note that, if a project is later moved on the disk, \l {qmake}{ \c qmake} must be run - again to process the project file and create a new Xcode project file. + Note that, if a project is later moved on the disk, + \l{qmake Manual#qmake}{\c qmake} must be run again to process the project + file and create a new Xcode project file. \section2 On supporting two build targets simultaneously @@ -863,10 +895,12 @@ \l{Qt Commercial Edition} and do not need to worry about how project dependencies are managed. - However, some developers may need to import an existing \l {qmake}{ \c qmake} project - into Visual Studio. \l {qmake}{ \c qmake} is able to take a project file and create a - Visual Studio project that contains all the necessary information required - by the development environment. This is achieved by setting the \c qmake + However, some developers may need to import an existing + \l{qmake Manual#qmake}{\c qmake} project into Visual Studio. + \l{qmake Manual#qmake}{\c qmake} is able to take a project file and create + a Visual Studio project that contains all the necessary information + required by the development environment. This is achieved by setting the + \l{qmake Manual#qmake}{\c qmake} \l{qmake Variable Reference#TEMPLATE}{project template} to either \c vcapp (for application projects) or \c vclib (for library projects). @@ -879,8 +913,9 @@ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 21 - Each time you update the project file, you need to run \l {qmake}{ \c qmake} to generate - an updated Visual Studio project. + Each time you update the project file, you need to run + \l{qmake Manual#qmake}{\c qmake} to generate an updated Visual Studio + project. \note If you are using the Visual Studio Add-in, you can import \c .pro files via the \gui{Qt->Import from .pro file} menu item. @@ -971,20 +1006,18 @@ suitable for development and debugging. This value should be manually specified for applications that are to be released. See the \l{Symbian Signed} Web site for information about obtaining an official - UID. - - Both \c SID and \c VID default to empty values. + UID. Both \c SID and \c VID default to empty values. There exists one UID1 too, but this should not be touched by any application. - - The UID2 has a specific value for different types of files - e.g. apps/exes + + The UID2 has a specific value for different types of files; e.g. apps/exes are always 0x100039CE. The toolchain will set this for value for the most common file types like, - EXE/APP and shared library DLL. + EXE/APP and shared library DLL. For more information about unique identifiers and their meaning for Symbian applications, please refer to the \l{UID Q&As (Symbian Signed)} page in the \l{Forum Nokia Wiki} for more information. - + \section2 Capabilities Capabilities define extra privileges for the application, such as the @@ -1009,14 +1042,14 @@ \previouspage Using Precompiled Headers \nextpage qmake Variable Reference - This reference is a detailed index of all the variables and function - that are available for use in \c qmake project files. + This reference is a detailed index of all the variables and function that + are available for use in \l{qmake Manual#qmake}{\c qmake} project files. \section1 Variable Reference The \l{qmake Variable Reference} describes the variables that are - recognized by \l {qmake}{ \c qmake}when configuring the build process for - projects. + recognized by \l{qmake Manual#qmake}{\c qmake}when configuring the build + process for projects. \section1 Function Reference @@ -1065,8 +1098,8 @@ \section1 Environment Variables and Configuration The \l{Configuring qmake's Environment} chapter of this manual - describes the environment variables that \l {qmake}{ \c qmake} uses when - configuring the build process. + describes the environment variables that \l{qmake Manual#qmake}{\c qmake} + uses when configuring the build process. */ /*! @@ -1095,21 +1128,21 @@ \e {This is only used on the Symbian platform.} - Generic \c bld.inf file content can be specified with \c BLD_INF_RULES variables. - The section of \c bld.inf file where each rule goes is appended to + Generic \c bld.inf file content can be specified with \c BLD_INF_RULES variables. + The section of \c bld.inf file where each rule goes is appended to \c BLD_INF_RULES with a dot. For example: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 152 - This will add the specified statements to the \c prj_exports section of the + This will add the specified statements to the \c prj_exports section of the generated \c bld.inf file. It is also possible to add multiple rows in a single block. Each double quoted string will be placed on a new row in the generated \c bld.inf file. - For example: + For example: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 143 @@ -1121,7 +1154,7 @@ The \c CONFIG variable specifies project configuration and compiler options. The values will be recognized internally by - \l {qmake}{ \c qmake} and have special meaning. They are as follows. + \l{qmake Manual#qmake}{\c qmake} and have special meaning. They are as follows. These \c CONFIG values control compilation flags: @@ -1157,25 +1190,28 @@ defined in the \c CONFIG variable, it is necessary to use the \c debug_and_release option if you want to allow both debug and release versions of a project to be built. In such a case, the Makefile that - \l {qmake}{ \c qmake} generates includes a rule that builds both versions, and this can - be invoked in the following way: + \l{qmake Manual#qmake}{\c qmake} generates includes a rule that builds both + versions, and this can be invoked in the following way: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 24 - When linking a library, \l {qmake}{ \c qmake} relies on the underlying platform to know - what other libraries this library links against. However, if linking - statically, \l {qmake}{ \c qmake} will not get this information unless we use the following - \c CONFIG options: + When linking a library, \l{qmake Manual#qmake}{\c qmake} relies on the + underlying platform to know what other libraries this library links + against. However, if linking statically, \l{qmake Manual#qmake}{\c qmake} + will not get this information unless we use the following \c CONFIG + options: \table 95% \header \o Option \o Description - \row \o create_prl \o This option enables \l {qmake}{ \c qmake} to track these - dependencies. When this option is enabled, \l {qmake}{ \c qmake} will create a file + \row \o create_prl \o This option enables + \l{qmake Manual#qmake}{\c qmake} to track these dependencies. When this + option is enabled, \l{qmake Manual#qmake}{\c qmake} will create a file ending in \c .prl which will save meta-information about the library (see \l{LibDepend}{Library Dependencies} for more info). - \row \o link_prl \o When this is enabled, \l {qmake}{ \c qmake} will process all - libraries linked to by the application and find their meta-information - (see \l{LibDepend}{Library Dependencies} for more info). + \row \o link_prl \o When this is enabled, + \l{qmake Manual#qmake}{\c qmake} will process all libraries linked to + by the application and find their meta-information(see + \l{LibDepend}{Library Dependencies} for more info). \endtable Please note that \c create_prl is required when \e {building} a @@ -1293,7 +1329,7 @@ \row \o stdbinary \o Builds an Open C binary (i.e. STDDLL, STDEXE, or STDLIB, depending on the target binary type.) \row \o no_icon \o Doesn't generate resources needed for displaying an icon - for executable in application menu (app only). + for executable in application menu (app only). \row \o symbian_test \o Places mmp files and extension makefiles under test sections in generated bld.inf instead of their regular sections. Note that this only affects automatically generated bld.inf content; @@ -1327,8 +1363,8 @@ \target DEFINES \section1 DEFINES - \l {qmake}{ \c qmake} adds the values of this variable as compiler C - preprocessor macros (-D option). + \l{qmake Manual#qmake}{\c qmake} adds the values of this variable as + compiler C preprocessor macros (-D option). For example: @@ -1393,7 +1429,7 @@ dynamically loadable libraries need special handling. When deploying extra executables or dynamically loadable libraries, the target path must specify \\sys\\bin. For plugins, the target path must specify the - location where the plugin stub will be deployed to (see the + location where the plugin stub will be deployed to (see the \l{How to Create Qt Plugins} document for more information about plugins). If the binary cannot be found from the indicated source path, the directory Symbian build process moves the executables to is @@ -1404,7 +1440,7 @@ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 128 On the Symbian platform, generic PKG file content can also be specified with this - variable. You can use either \c pkg_prerules or \c pkg_postrules to + variable. You can use either \c pkg_prerules or \c pkg_postrules to pass raw data to PKG file. The strings in \c pkg_prerules are added before package-body and \c pkg_postrules after. \c pkg_prerules is used for defining vendor information, dependencies, custom package headers, and the @@ -1531,8 +1567,8 @@ available in Qt can be explicitly deployed to the device. See \l{Static Plugins}{Static Plugins} for a complete list. - \note In Windows CE, No plugins will be deployed automatically. - If the application depends on plugins, these plugins have to be specified + \note In Windows CE, No plugins will be deployed automatically. + If the application depends on plugins, these plugins have to be specified manually. \note On the Symbian platform, all plugins supported by this variable @@ -1558,10 +1594,11 @@ \target DESTDIR_TARGET \section1 DESTDIR_TARGET - This variable is set internally by \l {qmake}{ \c qmake}, which is basically the - \c DESTDIR variable with the \c TARGET variable appened at the end. - The value of this variable is typically handled by \l {qmake}{ \c qmake} or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable is set internally by \l{qmake Manual#qmake}{\c qmake}, which + is basically the \c DESTDIR variable with the \c TARGET variable appened at + the end. The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \target DLLDESTDIR \section1 DLLDESTDIR @@ -1581,10 +1618,11 @@ \target DSP_TEMPLATE \section1 DSP_TEMPLATE - This variable is set internally by \l {qmake}{ \c qmake}, which specifies where the - dsp template file for basing generated dsp files is stored. The value - of this variable is typically handled by \l {qmake}{ \c qmake} or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable is set internally by \l{qmake Manual#qmake}{\c qmake}, which + specifies where the dsp template file for basing generated dsp files is + stored. The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \target FORMS \section1 FORMS @@ -1629,12 +1667,12 @@ Defines the header files for the project. - \l {qmake}{ \c qmake} will generate dependency information (unless \c -nodepend - is specified on the \l{Running qmake#Commands}{command line}) - for the specified headers. \l {qmake}{ \c qmake} will also automatically detect if - \c moc is required by the classes in these headers, and add the - appropriate dependencies and files to the project for generating and - linking the moc files. + \l{qmake Manual#qmake}{\c qmake} will generate dependency information (unless + \c -nodepend is specified on the \l{Running qmake#Commands}{command line}) + for the specified headers. \l{qmake Manual#qmake}{\c qmake} will also + automatically detect if \c moc is required by the classes in these headers, + and add the appropriate dependencies and files to the project for generating + and linking the moc files. For example: @@ -1682,22 +1720,23 @@ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 36 - Note that \l {qmake}{ \c qmake} will skip files that are executable. If you need to install - executable files, you can unset the files' executable flags. + Note that \l{qmake Manual#qmake}{\c qmake} will skip files that are + executable. If you need to install executable files, you can unset the + files' executable flags. \target LEXIMPLS \section1 LEXIMPLS This variable contains a list of lex implementation files. The value - of this variable is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely - needs to be modified. + of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \target LEXOBJECTS \section1 LEXOBJECTS This variable contains the names of intermediate lex object files.The value of this variable is typically handled by - \l {qmake}{ \c qmake} and rarely needs to be modified. + \l{qmake Manual#qmake}{\c qmake} and rarely needs to be modified. \target LEXSOURCES \section1 LEXSOURCES @@ -1772,9 +1811,10 @@ \section1 MAKEFILE This variable specifies the name of the Makefile which - \l {qmake}{ \c qmake} should use when outputting the dependency information - for building a project. The value of this variable is typically - handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + \l{qmake Manual#qmake}{\c qmake} should use when outputting the dependency + information for building a project. The value of this variable is + typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \bold{Note:} On the Symbian platform, this variable is ignored. @@ -1783,14 +1823,15 @@ This variable contains the name of the Makefile generator to use when generating a Makefile. The value of this variable is typically - handled internally by \l {qmake}{ \c qmake} and rarely needs to be modified. + handled internally by \l{qmake Manual#qmake}{\c qmake} and rarely needs to + be modified. \target MMP_RULES \section1 MMP_RULES \e {This is only used on the Symbian platform.} - Generic MMP file content can be specified with this variable. + Generic MMP file content can be specified with this variable. For example: @@ -1801,12 +1842,12 @@ It is also possible to add multiple rows in a single block. Each double quoted string will be placed on a new row in the generated MMP file. - For example: + For example: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 138 If you need to include a hash (\c{#}) character inside the - \c MMP_RULES statement, it can be done with the variable + \c MMP_RULES statement, it can be done with the variable \c LITERAL_HASH as follows: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 139 @@ -1820,7 +1861,7 @@ \note You should not use this variable to add MMP statements that are explicitly supported by their own variables, such as - \c TARGET.EPOCSTACKSIZE. + \c TARGET.EPOCSTACKSIZE. Doing so could result in duplicate statements in the MMP file. \target MOC_DIR @@ -1839,8 +1880,8 @@ This variable is generated from the \link #SOURCES SOURCES \endlink variable. The extension of each source file will have been replaced by .o (Unix) or .obj (Win32). The value of this variable is - typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and - rarely needs to be modified. + typically handled by \l {qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \target OBJECTS_DIR \section1 OBJECTS_DIR @@ -1855,11 +1896,11 @@ \target OBJMOC \section1 OBJMOC - This variable is set by \l {qmake}{ \c qmake} if files can be found that - contain the Q_OBJECT macro. \c OBJMOC contains the - name of all intermediate moc object files. The value of this variable - is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be - modified. + This variable is set by \l{qmake Manual#qmake}{\c qmake} if files can be + found that contain the Q_OBJECT macro. \c OBJMOC contains the name of all + intermediate moc object files. The value of this variable is typically + handled by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} + and rarely needs to be modified. \target POST_TARGETDEPS \section1 POST_TARGETDEPS @@ -1898,67 +1939,71 @@ This variable contains a list of header files that require some sort of pre-compilation step (such as with moc). The value of this - variable is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be - modified. + variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \target PWD \section1 PWD This variable contains the full path leading to the directory where - the \l {qmake}{ \c qmake} project file (project.pro) is located. + the \l{qmake Manual#qmake}{\c qmake} project file (project.pro) is located. \target OUT_PWD \section1 OUT_PWD This variable contains the full path leading to the directory where - \l {qmake}{ \c qmake} places the generated Makefile. + \l{qmake Manual#qmake}{\c qmake} places the generated Makefile. \target QMAKE_systemvariable \section1 QMAKE - This variable contains the name of the \l {qmake}{ \c qmake} program - itself and is placed in generated Makefiles. The value of this - variable is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be - modified. + This variable contains the name of the \l{qmake Manual#qmake}{\c qmake} + program itself and is placed in generated Makefiles. The value of this + variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \target QMAKESPEC_systemvariable \section1 QMAKESPEC - This variable contains the name of the \l {qmake}{ \c qmake} - configuration to use when generating Makefiles. The value of this - variable is typically handled by \l {qmake}{ \c qmake} and rarely needs to be modified. + This variable contains the name of the \l{qmake Manual#qmake}{\c qmake} + configuration to use when generating Makefiles. The value of this variable + is typically handled by \l{qmake Manual#qmake}{\c qmake} and rarely needs + to be modified. - Use the \c{QMAKESPEC} environment variable to override the \l {qmake}{ \c qmake} configuration. - Note that, due to the way \l {qmake}{ \c qmake} reads project files, setting the \c{QMAKESPEC} - environment variable from within a project file will have no effect. + Use the \c{QMAKESPEC} environment variable to override the + \l{qmake Manual#qmake}{\c qmake} configuration. Note that, due to the way + \l{qmake Manual#qmake}{\c qmake} reads project files, setting the + \c{QMAKESPEC} environment variable from within a project file will have no + effect. \target QMAKE_APP_FLAG \section1 QMAKE_APP_FLAG This variable is empty unless the \c app \l{#TEMPLATE}{TEMPLATE} is specified. The value of this - variable is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be - modified. Use the following instead: + variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. Use the + following instead: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 42 \target QMAKE_APP_OR_DLL \section1 QMAKE_APP_OR_DLL - This variable is empty unless the \c app or \c dll - \l{#TEMPLATE}{TEMPLATE} is specified. The value of this - variable is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be - modified. + This variable is empty unless the \c app or \c dll \l{#TEMPLATE}{TEMPLATE} + is specified. The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \target QMAKE_AR_CMD \section1 QMAKE_AR_CMD \e {This is used on Unix platforms only.} - This variable contains the command for invoking the program which - creates, modifies and extracts archives. The value of this variable is - typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} - and rarely needs to be modified. + This variable contains the command for invoking the program which creates, + modifies and extracts archives. The value of this variable is typically + handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \target QMAKE_BUNDLE_DATA \section1 QMAKE_BUNDLE_DATA @@ -2006,9 +2051,10 @@ \target QMAKE_CFLAGS_DEBUG \section1 QMAKE_CFLAGS_DEBUG - This variable contains the flags for the C compiler in debug mode.The value of this variable is - typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} - and rarely needs to be modified. + This variable contains the flags for the C compiler in debug mode. The + value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \target QMAKE_CFLAGS_MT \section1 QMAKE_CFLAGS_MT @@ -2016,7 +2062,7 @@ This variable contains the compiler flags for creating a multi-threaded application or when the version of Qt that you link against is a multi-threaded statically linked library. The value of - this variable is typically handled by \l {qmake}{ \c qmake} or + this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \target QMAKE_CFLAGS_MT_DBG @@ -2025,8 +2071,9 @@ This variable contains the compiler flags for creating a debuggable multi-threaded application or when the version of Qt that you link against is a debuggable multi-threaded statically linked library. The - value of this variable is typically handled by \l {qmake}{ \c qmake} or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \target QMAKE_CFLAGS_MT_DLL \section1 QMAKE_CFLAGS_MT_DLL @@ -2036,8 +2083,8 @@ This variable contains the compiler flags for creating a multi-threaded dll or when the version of Qt that you link against is a multi-threaded dll. The value of this variable is typically - handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and - rarely needs to be modified. + handled by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} + and rarely needs to be modified. \target QMAKE_CFLAGS_MT_DLLDBG \section1 QMAKE_CFLAGS_MT_DLLDBG @@ -2047,16 +2094,17 @@ This variable contains the compiler flags for creating a debuggable multi-threaded dll or when the version of Qt that you link against is a debuggable multi-threaded statically linked library. - The value of this variable is typically handled by \l {qmake}{ \c qmake} or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \target QMAKE_CFLAGS_RELEASE \section1 QMAKE_CFLAGS_RELEASE This variable contains the compiler flags for creating a non-debuggable application. The value of this variable is typically - handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and - rarely needs to be modified. + handled by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} + and rarely needs to be modified. \target QMAKE_CFLAGS_SHLIB \section1 QMAKE_CFLAGS_SHLIB @@ -2065,33 +2113,32 @@ This variable contains the compiler flags for creating a shared library. The value of this variable is typically handled by - \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs - to be modified. + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \target QMAKE_CFLAGS_THREAD \section1 QMAKE_CFLAGS_THREAD This variable contains the compiler flags for creating a multi-threaded application. The value of this variable is typically handled by - \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs - to be modified. + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \target QMAKE_CFLAGS_WARN_OFF \section1 QMAKE_CFLAGS_WARN_OFF This variable is not empty if the warn_off \l{#CONFIG}{CONFIG} option is specified. The value of this - variable is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} - and rarely needs to be modified. + variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \target QMAKE_CFLAGS_WARN_ON \section1 QMAKE_CFLAGS_WARN_ON - This variable is not empty if the warn_on - \l{#CONFIG}{CONFIG} option is specified. - The value of this variable is typically handled by - \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs - to be modified. + This variable is not empty if the warn_on \l{#CONFIG}{CONFIG} option is + specified. The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \target QMAKE_CLEAN \section1 QMAKE_CLEAN @@ -2109,11 +2156,11 @@ \section1 QMAKE_CXXFLAGS This variable contains the C++ compiler flags that are used when building - a project. The value of this variable is typically handled by \l {qmake}{ \c qmake} or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. The flags - specific to debug and release modes can be adjusted by modifying - the \c QMAKE_CXXFLAGS_DEBUG and \c QMAKE_CXXFLAGS_RELEASE variables, - respectively. + a project. The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. The flags specific to debug and release modes can be + adjusted by modifying the \c QMAKE_CXXFLAGS_DEBUG and + \c QMAKE_CXXFLAGS_RELEASE variables, respectively. \bold{Note:} On the Symbian platform, this variable can be used to pass architecture specific options to each compiler in the Symbian build system. @@ -2129,24 +2176,24 @@ This variable contains the C++ compiler flags for creating a debuggable application. The value of this variable is typically handled by - \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs - to be modified. + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \target QMAKE_CXXFLAGS_MT \section1 QMAKE_CXXFLAGS_MT This variable contains the C++ compiler flags for creating a multi-threaded application. The value of this variable is typically handled by - \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs - to be modified. + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \target QMAKE_CXXFLAGS_MT_DBG \section1 QMAKE_CXXFLAGS_MT_DBG - This variable contains the C++ compiler flags for creating a debuggable multi-threaded - application. The value of this variable is typically handled by - \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs - to be modified. + This variable contains the C++ compiler flags for creating a debuggable + multi-threaded application. The value of this variable is typically handled + by \l{qmake Manual#qmake}{\c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \target QMAKE_CXXFLAGS_MT_DLL \section1 QMAKE_CXXFLAGS_MT_DLL @@ -2155,56 +2202,58 @@ This variable contains the C++ compiler flags for creating a multi-threaded dll. The value of this variable is typically handled by - \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs - to be modified. + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \target QMAKE_CXXFLAGS_MT_DLLDBG \section1 QMAKE_CXXFLAGS_MT_DLLDBG \c {This is used on Windows only.} - This variable contains the C++ compiler flags for creating a multi-threaded debuggable - dll. The value of this variable is typically handled by - \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs - to be modified. + This variable contains the C++ compiler flags for creating a multi-threaded + debuggable dll. The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \target QMAKE_CXXFLAGS_RELEASE \section1 QMAKE_CXXFLAGS_RELEASE - This variable contains the C++ compiler flags for creating an - application. The value of this variable is typically handled by - \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs - to be modified. + This variable contains the C++ compiler flags for creating an application. + The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \target QMAKE_CXXFLAGS_SHLIB \section1 QMAKE_CXXFLAGS_SHLIB - This variable contains the C++ compiler flags for creating a - shared library. The value of this variable is typically handled by - \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs - to be modified. + This variable contains the C++ compiler flags for creating a shared library. + The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \target QMAKE_CXXFLAGS_THREAD \section1 QMAKE_CXXFLAGS_THREAD - This variable contains the C++ compiler flags for creating a - multi-threaded application. The value of this variable is typically handled by - \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs - to be modified. + This variable contains the C++ compiler flags for creating a multi-threaded + application. The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \target QMAKE_CXXFLAGS_WARN_OFF \section1 QMAKE_CXXFLAGS_WARN_OFF - This variable contains the C++ compiler flags for suppressing compiler warnings. - The value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains the C++ compiler flags for suppressing compiler + warnings. The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \target QMAKE_CXXFLAGS_WARN_ON \section1 QMAKE_CXXFLAGS_WARN_ON This variable contains C++ compiler flags for generating compiler warnings. - The value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \target QMAKE_DISTCLEAN \section1 QMAKE_DISTCLEAN @@ -2214,9 +2263,9 @@ \target QMAKE_EXTENSION_SHLIB \section1 QMAKE_EXTENSION_SHLIB - This variable contains the extention for shared libraries. The value of this - variable is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} - and rarely needs to be modified. + This variable contains the extention for shared libraries. The value of + this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. Note that platform-specific variables that change the extension will override the contents of this variable. @@ -2288,16 +2337,18 @@ \target QMAKE_FAILED_REQUIREMENTS \section1 QMAKE_FAILED_REQUIREMENTS - This variable contains the list of requirements that were failed to be met when - \l {qmake}{ \c qmake}was used. For example, the sql module is needed and wasn't compiled into Qt. The - value of this variable is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} - and rarely needs to be modified. + This variable contains the list of requirements that were failed to be met + when \l{qmake Manual#qmake}{\c qmake} was used. For example, the sql module + is needed and wasn't compiled into Qt. The value of this variable is + typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \target QMAKE_FILETAGS \section1 QMAKE_FILETAGS - This variable contains the file tags needed to be entered into the Makefile, such as SOURCES - and HEADERS. The value of this variable is typically handled by \l {qmake}{ \c qmake}or + This variable contains the file tags needed to be entered into the + Makefile, such as SOURCES and HEADERS. The value of this variable is + typically handled by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \section1 QMAKE_FRAMEWORK_BUNDLE_NAME @@ -2331,26 +2382,28 @@ \target QMAKE_INCDIR \section1 QMAKE_INCDIR - This variable contains the location of all known header files to be added to - INCLUDEPATH when building an application. The value of this variable is - typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely - needs to be modified. + This variable contains the location of all known header files to be added + to INCLUDEPATH when building an application. The value of this variable is + typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \target QMAKE_INCDIR_EGL \section1 QMAKE_INCDIR_EGL - This variable contains the location of EGL header files to be added - to INCLUDEPATH when building an application with OpenGL/ES or - OpenVG support. The value of this variable is typically handled by - \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains the location of EGL header files to be added to + INCLUDEPATH when building an application with OpenGL/ES or OpenVG support. + The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \target QMAKE_INCDIR_OPENGL \section1 QMAKE_INCDIR_OPENGL This variable contains the location of OpenGL header files to be added to INCLUDEPATH when building an application with OpenGL support. The - value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. If the OpenGL implementation uses EGL (most OpenGL/ES systems), then QMAKE_INCDIR_EGL may also need to be set. @@ -2361,8 +2414,9 @@ to INCLUDEPATH when building an application with OpenGL ES 1 or OpenGL ES 2 support respectively. - The value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + The value of this variable is typically handled by \ + l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. If the OpenGL implementation uses EGL (most OpenGL/ES systems), then QMAKE_INCDIR_EGL may also need to be set. @@ -2372,8 +2426,9 @@ This variable contains the location of OpenVG header files to be added to INCLUDEPATH when building an application with OpenVG support. The - value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. If the OpenVG implementation uses EGL then QMAKE_INCDIR_EGL may also need to be set. @@ -2381,28 +2436,28 @@ \target QMAKE_INCDIR_QT \section1 QMAKE_INCDIR_QT - This variable contains the location of all known header file - paths to be added to INCLUDEPATH when building a Qt application. The value - of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains the location of all known header file paths to be + added to INCLUDEPATH when building a Qt application. The value of this + variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \target QMAKE_INCDIR_THREAD \section1 QMAKE_INCDIR_THREAD - This variable contains the location of all known header file - paths to be added to INCLUDEPATH when building a multi-threaded application. - The value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains the location of all known header file paths to be + added to INCLUDEPATH when building a multi-threaded application. The value + of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} + or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \target QMAKE_INCDIR_X11 \section1 QMAKE_INCDIR_X11 \e {This is used on Unix platforms only.} - This variable contains the location of X11 header file paths to be - added to INCLUDEPATH when building a X11 application. The - value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains the location of X11 header file paths to be added + to INCLUDEPATH when building a X11 application. The value of this variable + is typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \target QMAKE_INFO_PLIST \section1 QMAKE_INFO_PLIST @@ -2430,31 +2485,30 @@ \e {This is used on Windows only.} - This variable contains link flags when building console - programs. The value of this variable is typically handled by - \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains link flags when building console programs. The value + of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} + or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \section1 QMAKE_LFLAGS_CONSOLE_DLL \e {This is used on Windows only.} - This variable contains link flags when building console - dlls. The value of this variable is typically handled by - \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains link flags when building console dlls. The value of + this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \section1 QMAKE_LFLAGS_DEBUG - This variable contains link flags when building debuggable applications. The - value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains link flags when building debuggable applications. + The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \section1 QMAKE_LFLAGS_PLUGIN - This variable contains link flags when building plugins. The value - of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains link flags when building plugins. The value of this + variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \section1 QMAKE_LFLAGS_RPATH @@ -2465,122 +2519,125 @@ \section1 QMAKE_LFLAGS_QT_DLL - This variable contains link flags when building programs that - use the Qt library built as a dll. The value of this variable is - typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains link flags when building programs that use the Qt + library built as a dll. The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \section1 QMAKE_LFLAGS_RELEASE - This variable contains link flags when building applications for - release. The value of this variable is typically handled by - \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains link flags when building applications for release. + The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \section1 QMAKE_LFLAGS_SHAPP - This variable contains link flags when building applications which are using - the \c app template. The value of this variable is typically handled by - \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains link flags when building applications which are + using the \c app template. The value of this variable is typically + handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \section1 QMAKE_LFLAGS_SHLIB This variable contains link flags when building shared libraries - The value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \section1 QMAKE_LFLAGS_SONAME This variable specifies the link flags to set the name of shared objects, - such as .so or .dll. The value of this variable is typically handled by \c - qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + such as .so or .dll. The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \section1 QMAKE_LFLAGS_THREAD This variable contains link flags when building multi-threaded projects. - The value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \section1 QMAKE_LFLAGS_WINDOWS \e {This is used on Windows only.} - This variable contains link flags when building Windows GUI projects - (i.e. non-console applications). - The value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains link flags when building Windows GUI projects (i.e. + non-console applications). The value of this variable is typically handled + by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \section1 QMAKE_LFLAGS_WINDOWS_DLL \e {This is used on Windows only.} - This variable contains link flags when building Windows DLL projects. - The value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains link flags when building Windows DLL projects. The + value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \section1 QMAKE_LIBDIR - This variable contains the location of all known library - directories.The value of this variable is typically handled by - \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains the location of all known library directories. The + value of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} + or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \section1 QMAKE_LIBDIR_FLAGS \e {This is used on Unix platforms only.} - This variable contains the location of all library - directory with -L prefixed. The value of this variable is typically handled by - \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains the location of all library directory with -L + prefixed. The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \section1 QMAKE_LIBDIR_EGL - This variable contains the location of the EGL library - directory, when EGL is used with OpenGL/ES or OpenVG. The value - of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains the location of the EGL library directory, when EGL + is used with OpenGL/ES or OpenVG. The value of this variable is typically + handled by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} + and rarely needs to be modified. \section1 QMAKE_LIBDIR_OPENGL - This variable contains the location of the OpenGL library - directory.The value of this variable is typically handled by - \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains the location of the OpenGL library directory. The + value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. If the OpenGL implementation uses EGL (most OpenGL/ES systems), then QMAKE_LIBDIR_EGL may also need to be set. \section1 QMAKE_LIBDIR_OPENVG - This variable contains the location of the OpenVG library - directory. The value of this variable is typically handled by - \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains the location of the OpenVG library directory. The + value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. If the OpenVG implementation uses EGL, then QMAKE_LIBDIR_EGL may also need to be set. \section1 QMAKE_LIBDIR_QT - This variable contains the location of the Qt library - directory.The value of this variable is typically handled by - \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains the location of the Qt library directory. The value + of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} + or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \section1 QMAKE_LIBDIR_X11 \e {This is used on Unix platforms only.} - This variable contains the location of the X11 library - directory.The value of this variable is typically handled by - \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains the location of the X11 library directory. The value + of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} + or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \section1 QMAKE_LIBS - This variable contains all project libraries. The value of this - variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains all project libraries. The value of this variable + is typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \section1 QMAKE_LIBS_CONSOLE @@ -2593,42 +2650,44 @@ \section1 QMAKE_LIBS_EGL - This variable contains all EGL libraries when building Qt with - OpenGL/ES or OpenVG. The value of this variable is typically - handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely + This variable contains all EGL libraries when building Qt with OpenGL/ES + or OpenVG. The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. The usual value is \c{-lEGL}. \section1 QMAKE_LIBS_OPENGL - This variable contains all OpenGL libraries. The value of this - variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains all OpenGL libraries. The value of this variable + is typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. If the OpenGL implementation uses EGL (most OpenGL/ES systems), then QMAKE_LIBS_EGL may also need to be set. \section1 QMAKE_LIBS_OPENGL_QT - This variable contains all OpenGL Qt libraries.The value of this - variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains all OpenGL Qt libraries.The value of this variable + is typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \section1 QMAKE_LIBS_OPENGL_ES1, QMAKE_LIBS_OPENGL_ES2 These variables contain all the OpenGL libraries for OpenGL ES 1 and OpenGL ES 2. - The value of these variables is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + The value of these variables is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. If the OpenGL implementation uses EGL (most OpenGL/ES systems), then QMAKE_LIBS_EGL may also need to be set. \section1 QMAKE_LIBS_OPENVG - This variable contains all OpenVG libraries. The value of this - variable is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} - and rarely needs to be modified. The usual value is \c{-lOpenVG}. + This variable contains all OpenVG libraries. The value of this variable + is typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. The usual + value is \c{-lOpenVG}. Some OpenVG engines are implemented on top of OpenGL. This will be detected at configure time and QMAKE_LIBS_OPENGL will be implicitly @@ -2639,95 +2698,96 @@ \section1 QMAKE_LIBS_QT - This variable contains all Qt libraries.The value of this - variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains all Qt libraries.The value of this variable is + typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \section1 QMAKE_LIBS_QT_DLL \e {This is used on Windows only.} - This variable contains all Qt libraries when Qt is built as a dll. The - value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains all Qt libraries when Qt is built as a dll. The + value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \section1 QMAKE_LIBS_QT_OPENGL - This variable contains all the libraries needed to link against if - OpenGL support is turned on. The - value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains all the libraries needed to link against if OpenGL + support is turned on. The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \section1 QMAKE_LIBS_QT_THREAD - This variable contains all the libraries needed to link against if - thread support is turned on. The - value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains all the libraries needed to link against if thread + support is turned on. The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \section1 QMAKE_LIBS_RT \e {This is used with Borland compilers only.} This variable contains the runtime library needed to link against when - building an application. The - value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + building an application. The value of this variable is typically handled + by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and + rarely needs to be modified. \section1 QMAKE_LIBS_RTMT \e {This is used with Borland compilers only.} This variable contains the runtime library needed to link against when - building a multi-threaded application. The - value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + building a multi-threaded application. The value of this variable is + typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \section1 QMAKE_LIBS_THREAD \e {This is used on Unix and Symbian platforms only.} - This variable contains all libraries that need to be linked against - when building a multi-threaded application. The - value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains all libraries that need to be linked against when + building a multi-threaded application. The value of this variable is + typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \section1 QMAKE_LIBS_WINDOWS \e {This is used on Windows only.} - This variable contains all windows libraries.The value of this - variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains all windows libraries. The value of this variable + is typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \section1 QMAKE_LIBS_X11 \e {This is used on Unix platforms only.} - This variable contains all X11 libraries.The value of this - variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains all X11 libraries.The value of this variable is + typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \section1 QMAKE_LIBS_X11SM \e {This is used on Unix platforms only.} - This variable contains all X11 session management libraries. The - value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains all X11 session management libraries. The value of + this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \section1 QMAKE_LIB_FLAG - This variable is not empty if the \c lib template is specified. The - value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable is not empty if the \c lib template is specified. The value + of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} + or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \section1 QMAKE_LINK_SHLIB_CMD - This variable contains the command to execute when creating a - shared library. The - value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains the command to execute when creating a shared + library. The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \section1 QMAKE_POST_LINK @@ -2745,10 +2805,10 @@ \section1 QMAKE_LN_SHLIB - This variable contains the command to execute when creating a link - to a shared library. The - value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains the command to execute when creating a link to a + shared library. The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \section1 QMAKE_MAC_SDK @@ -2767,28 +2827,29 @@ \section1 QMAKE_MAKEFILE - This variable contains the name of the Makefile to create. The - value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains the name of the Makefile to create. The value of + this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \section1 QMAKE_MOC_SRC - This variable contains the names of all moc source files to - generate and include in the project. The value of this variable is - typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains the names of all moc source files to generate and + include in the project. The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \section1 QMAKE_QMAKE - This variable contains the location of qmake if it is not in the path. - The value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains the location of qmake if it is not in the path. The + value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \section1 QMAKE_QT_DLL - This variable is not empty if Qt was built as a dll. The - value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable is not empty if Qt was built as a dll. The value of this + variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \section1 QMAKE_RESOURCE_FLAGS @@ -2816,39 +2877,44 @@ \section1 QMAKE_RUN_CC - This variable specifies the individual rule needed to build an object. - The value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable specifies the individual rule needed to build an object. The + value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \section1 QMAKE_RUN_CC_IMP - This variable specifies the individual rule needed to build an object. - The value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable specifies the individual rule needed to build an object. The + value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \section1 QMAKE_RUN_CXX - This variable specifies the individual rule needed to build an object. - The value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable specifies the individual rule needed to build an object. The + value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \section1 QMAKE_RUN_CXX_IMP - This variable specifies the individual rule needed to build an object. - The value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable specifies the individual rule needed to build an object. The + value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \section1 QMAKE_TARGET - This variable contains the name of the project target. The value of - this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains the name of the project target. The value of this + variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \section1 QMAKE_UIC - This variable contains the location of uic if it is not in the path. - The value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains the location of uic if it is not in the path. The + value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. It can be used to specify arguments to uic as well, such as additional plugin paths. For example: @@ -2920,8 +2986,9 @@ \section1 RC_FILE This variable contains the name of the resource file for the application. - The value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \target RCC_DIR \section1 RCC_DIR @@ -2936,8 +3003,8 @@ \target REQUIRES \section1 REQUIRES - This is a special variable processed by \c qmake. If the - contents of this variable do not appear in CONFIG by the time this + This is a special variable processed by \l{qmake Manual#qmake}{\c qmake}. + If the contents of this variable do not appear in CONFIG by the time this variable is assigned, then a minimal Makefile will be generated that states what dependencies (the values assigned to REQUIRES) are missing. @@ -2946,22 +3013,23 @@ \section1 RESOURCES - This variable contains the name of the resource collection file (qrc) + This variable contains the name of the resource collection file (qrc) for the application. Further information about the resource collection file can be found at \l{The Qt Resource System}. \section1 RES_FILE This variable contains the name of the resource file for the application. - The value of this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \target RSS_RULES \section1 RSS_RULES - \e {This is only used on the Symbian platform.} + \e {This is only used on the Symbian platform.} - Generic RSS file content can be specified with this variable. The syntax is + Generic RSS file content can be specified with this variable. The syntax is similar to \c MMP_RULES and \c BLD_INF_RULES. For example: @@ -2975,7 +3043,7 @@ It is also possible to add multiple rows in a single block. Each double quoted string will be placed on a new row in the registration resource file. - For example: + For example: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 145 @@ -3044,11 +3112,11 @@ \section1 SRCMOC - This variable is set by \l {qmake}{ \c qmake}if files can be found that - contain the Q_OBJECT macro. \c SRCMOC contains the - name of all the generated moc files. The value of this variable - is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be - modified. + This variable is set by \l{qmake Manual#qmake}{\c qmake} if files can be + found that contain the Q_OBJECT macro. \c SRCMOC contains the name of all + the generated moc files. The value of this variable is typically handled + by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and + rarely needs to be modified. \target SUBDIRS \section1 SUBDIRS @@ -3063,9 +3131,9 @@ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 50 It is essential that the project file in each subdirectory has the same - name as the subdirectory itself, so that \l {qmake}{ \c qmake}can find it. - For example, if the subdirectory is called \c myapp then the project file - in that directory should be called \c myapp.pro. + name as the subdirectory itself, so that \l{qmake Manual#qmake}{\c qmake} + can find it. For example, if the subdirectory is called \c myapp then the + project file in that directory should be called \c myapp.pro. If you need to ensure that the subdirectories are built in the order in which they are specified, update the \l{#CONFIG}{CONFIG} variable to @@ -3220,21 +3288,23 @@ \section1 TARGET_EXT - This variable specifies the target's extension. The value of this variable - is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be - modified. + This variable specifies the target's extension. The value of this variable + is typically handled by \l {qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \section1 TARGET_x - This variable specifies the target's extension with a major version number. The value of this variable - is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be - modified. + This variable specifies the target's extension with a major version number. + The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \section1 TARGET_x.y.z - This variable specifies the target's extension with version number. The value of this variable - is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be - modified. + This variable specifies the target's extension with version number. The + value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \target TEMPLATE \section1 TEMPLATE @@ -3280,16 +3350,16 @@ \section1 UICIMPLS This variable contains a list of the generated implementation files by UIC. - The value of this variable - is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be - modified. + The value of this variable is typically handled by + \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely + needs to be modified. \section1 UICOBJECTS - This variable is generated from the UICIMPLS variable. The extension of each - file will have been replaced by .o (Unix) or .obj (Win32). The value of this variable is - typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and - rarely needs to be modified. + This variable is generated from the UICIMPLS variable. The extension of + each file will have been replaced by .o (Unix) or .obj (Win32). The value + of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} + or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \target UI_DIR \section1 UI_DIR @@ -3350,31 +3420,31 @@ \section1 VPATH - This variable tells \l {qmake}{ \c qmake}where to search for files it cannot - open. With this you may tell \l {qmake}{ \c qmake}where it may look for things - like SOURCES, and if it finds an entry in SOURCES that cannot be - opened it will look through the entire VPATH list to see if it can - find the file on its own. + This variable tells \l{qmake Manual#qmake}{\c qmake} where to search for + files it cannot open. With this you may tell + \l{qmake Manual#qmake}{\c qmake} where it may look for things like SOURCES, + and if it finds an entry in SOURCES that cannot be opened it will look + through the entire VPATH list to see if it can find the file on its own. See also \l{#DEPENDPATH}{DEPENDPATH}. \section1 YACCIMPLS - This variable contains a list of yacc source files. The value of - this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains a list of yacc source files. The value of this + variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \section1 YACCOBJECTS - This variable contains a list of yacc object files. The value of - this variable is typically handled by \l {qmake}{ \c qmake}or - \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + This variable contains a list of yacc object files. The value of this + variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or + \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \target YACCSOURCES \section1 YACCSOURCES This variable contains a list of yacc source files to be included - in the project. All dependencies, headers and source files will + in the project. All dependencies, headers and source files will automatically be included in the project. For example: @@ -3408,8 +3478,8 @@ \previouspage qmake Variable Reference \nextpage Configuring qmake's Environment - \l {qmake}{ \c qmake}provides built-in functions to allow the contents of - variables to be processed, and to enable tests to be performed + \l{qmake Manual#qmake}{\c qmake} provides built-in functions to allow the + contents of variables to be processed, and to enable tests to be performed during the configuration process. Functions that process the contents of variables typically return values that can be assigned to other variables, and these values are obtained by prefixing @@ -3479,9 +3549,9 @@ \section1 error(string) - This function never returns a value. \l {qmake}{ \c qmake}displays the given - \e string to the user, and exits. This function should only be used - for unrecoverable errors. + This function never returns a value. \l{qmake Manual#qmake}{\c qmake} + displays the given \e string to the user, and exits. This function + should only be used for unrecoverable errors. For example: @@ -3490,8 +3560,8 @@ \section1 eval(string) [Conditional] - Evaluates the contents of the string using \c qmake's syntax rules - and returns true. + Evaluates the contents of the string using + \l{qmake Manual#qmake}{\c qmake}'s syntax rules and returns true. Definitions and assignments can be used in the string to modify the values of existing variables or create new definitions. @@ -3555,10 +3625,11 @@ \section1 infile(filename, var, val) [Conditional] - Succeeds if the file \e filename (when parsed by \l {qmake}{ \c qmake}itself) - contains the variable \e var with a value of \e val; otherwise fails. - If you do not specify a third argument (\e val), the function will - only test whether \e var has been declared in the file. + Succeeds if the file \e filename (when parsed by + \l{qmake Manual#qmake}{\c qmake} itself) contains the variable \e var with + a value of \e val; otherwise fails. If you do not specify a third argument + (\e val), the function will only test whether \e var has been declared in + the file. \section1 isEmpty(variablename) [Conditional] @@ -3677,9 +3748,10 @@ \target Properties \section1 Properties - \l {qmake}{ \c qmake}has a system of persistent information, this allows you to - \c set a variable in qmake once, and each time qmake is invoked this - value can be queried. Use the following to set a property in qmake: + \l{qmake Manual#qmake}{\c qmake} has a system of persistent information, + this allows you to \c set a variable in qmake once, and each time qmake is + invoked this value can be queried. Use the following to set a property in + qmake: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 74 @@ -3696,24 +3768,26 @@ This information will be saved into a QSettings object (meaning it will be stored in different places for different platforms). As \c VARIABLE is versioned as well, you can set one value in an older - version of \c qmake, and newer versions will retrieve this value. However, - if you set \c VARIABLE for a newer version of \c qmake, the older version - will not use this value. You can however query a specific version of a - variable if you prefix that version of \l {qmake}{ \c qmake}to \c VARIABLE, as in - the following example: + version of \l{qmake Manual#qmake}{\c qmake}, and newer versions will + retrieve this value. However, if you set \c VARIABLE for a newer version + of \l{qmake Manual#qmake}{\c qmake}, the older version will not use this + value. You can however query a specific version of a variable if you + prefix that version of \l{qmake Manual#qmake}{\c qmake} to \c VARIABLE, + as in the following example: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 76 - \l {qmake}{ \c qmake}also has the notion of \c builtin properties, for example you can - query the installation of Qt for this version of \l {qmake}{ \c qmake}with the + \l{qmake Manual#qmake}{\c qmake} also has the notion of \c builtin + properties, for example you can query the installation of Qt for this + version of \l{qmake Manual#qmake}{\c qmake} with the \c QT_INSTALL_PREFIX property: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 77 - These built-in properties cannot have a version prefixed to them as - they are not versioned, and each version of \l {qmake}{ \c qmake}will have its own - built-in set of these values. The list below outlines the built-in - properties: + These built-in properties cannot have a version prefixed to them as they + are not versioned, and each version of \l{qmake Manual#qmake}{\c qmake} + will have its own built-in set of these values. The list below outlines + the built-in properties: \list \o \c QT_INSTALL_PREFIX - Where the version of Qt this qmake is built for resides @@ -3729,22 +3803,22 @@ \target QMAKESPEC \section1 QMAKESPEC - \l {qmake}{ \c qmake}requires a platform and compiler description file which - contains many default values used to generate appropriate Makefiles. - The standard Qt distribution comes with many of these files, located - in the \c mkspecs subdirectory of the Qt installation. + \l{qmake Manual#qmake}{\c qmake}requires a platform and compiler + description file which contains many default values used to generate + appropriate Makefiles. The standard Qt distribution comes with many of + these files, located in the \c mkspecs subdirectory of the Qt installation. The \c QMAKESPEC environment variable can contain any of the following: \list \o A complete path to a directory containing a \c{qmake.conf} file. - In this case \l {qmake}{ \c qmake}will open the \c{qmake.conf} file from within that - directory. If the file does not exist, \l {qmake}{ \c qmake}will exit with an - error. - \o The name of a platform-compiler combination. In this case, \c qmake - will search in the directory specified by the \c mkspecs subdirectory - of the data path specified when Qt was compiled (see - QLibraryInfo::DataPath). + In this case \l{qmake Manual#qmake}{\c qmake} will open the + \c{qmake.conf} file from within that directory. If the file does not + exist, \l{qmake Manual#qmake}{\c qmake} will exit with an error. + \o The name of a platform-compiler combination. In this case, + \l{qmake Manual#qmake}{\c qmake} will search in the directory specified + by the \c mkspecs subdirectory of the data path specified when Qt was + compiled (see QLibraryInfo::DataPath). \endlist \bold{Note:} The \c QMAKESPEC path will automatically be added to the @@ -3755,28 +3829,29 @@ It is common on Unix to also use the build tool to install applications and libraries; for example, by invoking \c{make install}. For this reason, - \l {qmake}{ \c qmake}has the concept of an install set, an object which contains - instructions about the way part of a project is to be installed. - For example, a collection of documentation files can be described in the - following way: + \l{qmake Manual#qmake}{\c qmake}has the concept of an install set, an + object which contains instructions about the way part of a project is to + be installed. For example, a collection of documentation files can be + described in the following way: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 79 - The \c path member informs \l {qmake}{ \c qmake}that the files should be installed in - \c /usr/local/program/doc (the path member), and the \c files member - specifies the files that should be copied to the installation directory. - In this case, everything in the \c docs directory will be coped to - \c /usr/local/program/doc. + The \c path member informs \l{qmake Manual#qmake}{\c qmake} that the files + should be installed in \c /usr/local/program/doc (the path member), and the + \c files member specifies the files that should be copied to the + installation directory. In this case, everything in the \c docs directory + will be coped to \c /usr/local/program/doc. Once an install set has been fully described, you can append it to the install list with a line like this: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 80 - \l {qmake}{ \c qmake}will ensure that the specified files are copied to the installation - directory. If you require greater control over this process, you can also - provide a definition for the \c extra member of the object. For example, - the following line tells \l {qmake}{ \c qmake}to execute a series of commands for this + \l{qmake Manual#qmake}{\c qmake} will ensure that the specified files are + copied to the installation directory. If you require greater control over + this process, you can also provide a definition for the \c extra member of + the object. For example, the following line tells + \l{qmake Manual#qmake}{\c qmake} to execute a series of commands for this install set: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 81 @@ -3791,23 +3866,24 @@ in the other members of the object are performed. If you append a built-in install set to the \c INSTALLS variable and do - not specify \c files or \c extra members, \l {qmake}{ \c qmake}will decide what needs to - be copied for you. Currently, the only supported built-in install set is - \c target: + not specify \c files or \c extra members, \l{qmake Manual#qmake}{\c qmake} + will decide what needs to be copied for you. Currently, the only supported + built-in install set is \c target: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 82 - In the above lines, \l {qmake}{ \c qmake}knows what needs to be copied, and will handle - the installation process automatically. + In the above lines, \l{qmake Manual#qmake}{\c qmake} knows what needs to + be copied, and will handle the installation process automatically. \target cache \section1 Cache File - The cache file is a special file \l {qmake}{ \c qmake}reads to find settings not specified - in the \c qmake.conf file, project files, or at the command line. If - \c -nocache is not specified when \l {qmake}{ \c qmake}is run, it will try to find a file - called \c{.qmake.cache} in parent directories of the current directory. If - it fails to find this file, it will silently ignore this step of processing. + The cache file is a special file \l{qmake Manual#qmake}{\c qmake} reads to + find settings not specified in the \c qmake.conf file, project files, or + at the command line. If \c -nocache is not specified when + \l{qmake Manual#qmake}{\c qmake} is run, it will try to find a file called + \c{.qmake.cache} in parent directories of the current directory. If it + fails to find this file, it will silently ignore this step of processing. If it finds a \c{.qmake.cache} file then it will process this file first before it processes the project file. @@ -3815,67 +3891,73 @@ \target LibDepend \section1 Library Dependencies - Often when linking against a library, \l {qmake}{ \c qmake}relies on the underlying - platform to know what other libraries this library links against, and - lets the platform pull them in. In many cases, however, this is not - sufficent. For example, when statically linking a library, no other - libraries are linked to, and therefore no dependencies to those - libraries are created. However, an application that later links + Often when linking against a library, \l{qmake Manual#qmake}{\c qmake} + relies on the underlying platform to know what other libraries this + library links against, and lets the platform pull them in. In many cases, + however, this is not sufficent. For example, when statically linking a + library, no other libraries are linked to, and therefore no dependencies + to those libraries are created. However, an application that later links against this library will need to know where to find the symbols that - the static library will require. To help with this situation, \c qmake - attempts to follow a library's dependencies where appropriate, but - this behavior must be explicitly enabled by following two steps. + the static library will require. To help with this situation, + \l{qmake Manual#qmake}{\c qmake} attempts to follow a library's + dependencies where appropriate, but this behavior must be explicitly + enabled by following two steps. The first step is to enable dependency tracking in the library itself. - To do this you must tell \l {qmake}{ \c qmake}to save information about the library: + To do this you must tell \l{qmake Manual#qmake}{\c qmake} to save + information about the library: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 83 - This is only relevant to the \c lib template, and will be ignored for - all others. When this option is enabled, \l {qmake}{ \c qmake}will create a file - ending in .prl which will save some meta-information about the - library. This metafile is just like an ordinary project file, but only + This is only relevant to the \c lib template, and will be ignored for all + others. When this option is enabled, \l{qmake Manual#qmake}{\c qmake} will + create a file ending in .prl which will save some meta-information about + the library. This metafile is just like an ordinary project file, but only contains internal variable declarations. You are free to view this file - and, if it is deleted, \l {qmake}{ \c qmake}will know to recreate it when necessary, - either when the project file is later read, or if a dependent library - (described below) has changed. When installing this library, by - specifying it as a target in an \c INSTALLS declaration, \l {qmake}{ \c qmake}will - automatically copy the .prl file to the installation path. + and, if it is deleted, \l{qmake Manual#qmake}{\c qmake} will know to + recreate it when necessary, either when the project file is later read, or + if a dependent library (described below) has changed. When installing this + library, by specifying it as a target in an \c INSTALLS declaration, + \l{qmake Manual#qmake}{\c qmake} will automatically copy the .prl file to + the installation path. The second step in this process is to enable reading of this meta information in the applications that use the static library: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 84 - When this is enabled, \l {qmake}{ \c qmake}will process all libraries linked to - by the application and find their meta-information. \l {qmake}{ \c qmake}will use - this to determine the relevant linking information, specifically adding - values to the application project file's list of \c DEFINES as well as - \c LIBS. Once \l {qmake}{ \c qmake}has processed this file, it will then look through - the newly introduced libraries in the \c LIBS variable, and find their - dependent .prl files, continuing until all libraries have been resolved. - At this point, the Makefile is created as usual, and the libraries are - linked explicitly against the application. + When this is enabled, \l{qmake Manual#qmake}{\c qmake} will process all + libraries linked to by the application and find their meta-information. + \l{qmake Manual#qmake}{\c qmake} will use this to determine the relevant + linking information, specifically adding values to the application project + file's list of \c DEFINES as well as \c LIBS. Once + \l{qmake Manual#qmake}{\c qmake} has processed this file, it will then + look through the newly introduced libraries in the \c LIBS variable, and + find their dependent .prl files, continuing until all libraries have been + resolved. At this point, the Makefile is created as usual, and the + libraries are linked explicitly against the application. The internals of the .prl file are left closed so they can easily change later. They are not designed to be changed by hand, should only - be created by \c qmake, and should not be transferred between operating - systems as they may contain platform-dependent information. + be created by \{qmake Manual#qmake}{\c qmake}, and should not be + transferred between operating systems as they may contain + platform-dependent information. \target Extensions \section1 File Extensions - Under normal circumstances \l {qmake}{ \c qmake}will try to use appropriate file extensions - for your platform. However, it is sometimes necessary to override the default - choices for each platform and explicitly define file extensions for \l {qmake}{ \c qmake}to use. - This is achieved by redefining certain built-in variables; for example the extension - used for \l moc files can be redefined with the following assignment in a project - file: + Under normal circumstances \l{qmake Manual#qmake}{\c qmake} will try to + use appropriate file extensions for your platform. However, it is + sometimes necessary to override the default choices for each platform and + explicitly define file extensions for \l{qmake Manual#qmake}{\c qmake} to + use. This is achieved by redefining certain built-in variables; for + example the extension used for \l moc files can be redefined with the + following assignment in a project file: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 85 The following variables can be used to redefine common file extensions recognized - by \c qmake: + by \l{qmake Manual#qmake}{\c qmake}: \list \o QMAKE_EXT_MOC - This modifies the extension placed on included moc files. @@ -3893,45 +3975,47 @@ accept a list of values: \list - \o QMAKE_EXT_CPP - Causes \l {qmake}{ \c qmake}to interpret all files with these suffixes as - C++ source files. - \o QMAKE_EXT_H - Causes \l {qmake}{ \c qmake}to interpret all files with these suffixes as - C and C++ header files. + \o QMAKE_EXT_CPP - Causes \l{qmake Manual#qmake}{\c qmake} to interpret + all files with these suffixes as C++ source files. + \o QMAKE_EXT_H - Causes \l qmake Manual#{qmake}{\c qmake} to interpret + all files with these suffixes as C and C++ header files. \endlist \target Customizing \section1 Customizing Makefile Output - \l {qmake}{ \c qmake}tries to do everything expected of a cross-platform build tool. - This is often less than ideal when you really need to run special - platform-dependent commands. This can be achieved with specific instructions - to the different \l {qmake}{ \c qmake}backends. + \l{qmake Manual#qmake}{\c qmake} tries to do everything expected of a + cross-platform build tool. This is often less than ideal when you really + need to run special platform-dependent commands. This can be achieved with + specific instructions to the different \l{qmake Manual#qmake}{\c qmake} + backends. Customization of the Makefile output is performed through an object-style - API as found in other places in \c qmake. Objects are defined automatically - by specifying their members; for example: + API as found in other places in \l{qmake Manual#qmake}{\c qmake}. Objects + are defined automatically by specifying their members; for example: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 86 - The definitions above define a \l {qmake}{ \c qmake}target called \c mytarget, containing - a Makefile target called \c{.buildfile} which in turn is generated with - the \c touch command. Finally, the \c{.depends} member specifies that - \c mytarget depends on \c mytarget2, another target that is defined afterwards. - \c mytarget2 is a dummy target; it is only defined to echo some text to - the console. + The definitions above define a \l{qmake Manual#qmake}{\c qmake} target + called \c mytarget, containing a Makefile target called \c{.buildfile} + which in turn is generated with the \c touch command. Finally, the + \c{.depends} member specifies that \c mytarget depends on \c mytarget2, + another target that is defined afterwards. \c mytarget2 is a dummy target; + it is only defined to echo some text to the console. - The final step is to instruct \l {qmake}{ \c qmake}that this object is a target to be built: + The final step is to instruct \l{qmake Manual#qmake}{\c qmake} that this + object is a target to be built: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 87 - This is all you need to do to actually build custom targets. Of course, you may - want to tie one of these targets to the - \l{qmake Variable Reference#TARGET}{qmake build target}. To do this, you simply need to - include your Makefile target in the list of + This is all you need to do to actually build custom targets. Of course, + you may want to tie one of these targets to the + \l{qmake Variable Reference#TARGET}{qmake build target}. To do this, you + simply need to include your Makefile target in the list of \l{qmake Variable Reference#PRE_TARGETDEPS}{PRE_TARGETDEPS}. - The following tables are an overview of the options available to you with the QMAKE_EXTRA_TARGETS - variable. + The following tables are an overview of the options available to you with + the QMAKE_EXTRA_TARGETS variable. \table \header @@ -3983,8 +4067,9 @@ \c NEW_HEADERS variable (from the \c input member), and the result is written to the file defined by the \c output member; this file is added to the other source files in the project. - Additionally, \l {qmake}{ \c qmake}will execute \c depend_command to generate dependency - information, and place this information in the project as well. + Additionally, \l{qmake Manual#qmake}{\c qmake} will execute + \c depend_command to generate dependency information, and place this + information in the project as well. These commands can easily be placed into a cache file, allowing subsequent project files to add arguments to \c NEW_HEADERS. @@ -4046,15 +4131,15 @@ \o Specifies a command used to generate the list of dependencies for the output. \row \o dependency_type - \o Specifies the type of file the output is, if it is a known type (such as TYPE_C, + \o Specifies the type of file the output is, if it is a known type (such as TYPE_C, TYPE_UI, TYPE_QRC) then it is handled as one of those type of files. \row \o depends \o Specifies the dependencies of the output file. - \row + \row \o input \o The variable that contains the files that should be processed with the custom compiler. - \row + \row \o name \o A description of what the custom compiler is doing. This is only used in some backends. \row @@ -4069,7 +4154,7 @@ in the pro file as $(VARNAME). \row \o variable_out - \o The variable that the files created from the output should be added to. + \o The variable that the files created from the output should be added to. \endtable List of members specific to the CONFIG option: @@ -4086,7 +4171,7 @@ \o Indicates that the output should be added to the list of PRE_TARGETDEPS. \row \o explicit_dependencies - \o The dependencies for the output only get generated from the depends member and from + \o The dependencies for the output only get generated from the depends member and from nowhere else. \row \o no_link @@ -4097,7 +4182,7 @@ not supported on the Symbian platform, so either the \c CONFIG option \c no_link or variable \c variable_out should always be defined for extra compilers. - + */ /*! @@ -4107,12 +4192,13 @@ \previouspage qmake Platform Notes \nextpage Using Precompiled Headers - Many \l {qmake}{ \c qmake}project files simply describe the sources and header files used - by the project, using a list of \c{name = value} and \c{name += value} - definitions. \l {qmake}{ \c qmake}also provides other operators, functions, and scopes - that can be used to process the information supplied in variable declarations. - These advanced features allow Makefiles to be generated for multiple platforms - from a single project file. + Many \l{qmake Manual#qmake}{\c qmake} project files simply describe the + sources and header files used by the project, using a list of + \c{name = value} and \c{name += value} definitions. + \l{qmake Manual#qmake}{\c qmake} also provides other operators, functions, + and scopes that can be used to process the information supplied in + variable declarations. These advanced features allow Makefiles to be + generated for multiple platforms from a single project file. \tableofcontents @@ -4121,10 +4207,11 @@ In many project files, the assignment (\c{=}) and append (\c{+=}) operators can be used to include all the information about a project. The typical pattern of use is to assign a list of values to a variable, and append more values - depending on the result of various tests. Since \l {qmake}{ \c qmake}defines certain - variables using default values, it is sometimes necessary to use the removal - (\c{-=}) operator to filter out values that are not required. The following - operators can be used to manipulate the contents of variables. + depending on the result of various tests. Since + \l{qmake Manual#qmake}{\c qmake} defines certain variables using default + values, it is sometimes necessary to use the removal (\c{-=}) operator to + filter out values that are not required. The following operators can be + used to manipulate the contents of variables. The \c = operator assigns a value to a variable: @@ -4197,9 +4284,9 @@ \snippet doc/src/snippets/qmake/scopes.pro 0 The above code will add the \c paintwidget_win.cpp file to the sources listed - in the generated Makefile if \l {qmake}{ \c qmake}is used on a Windows platform. - If \l {qmake}{ \c qmake}is used on a platform other than Windows, the define will be - ignored. + in the generated Makefile if \l{qmake Manual#qmake}{\c qmake} is used on a + Windows platform. If \l{qmake Manual#qmake}{\c qmake} is used on a + platform other than Windows, the define will be ignored. The conditions used in a given scope can also be negated to provide an alternative set of declarations that will be processed only if the @@ -4231,7 +4318,7 @@ Generally, the \c : operator behaves like a logical AND operator, joining together a number of conditions, and requiring all of them to be true. - There is also the \c | operator to act like a logical OR operator, joining + There is also the \c | operator to act like a logical OR operator, joining together a number of conditions, and requiring only one of them to be true. \snippet doc/src/snippets/qmake/scopes.pro 4 @@ -4247,10 +4334,10 @@ \section2 Configuration and Scopes The values stored in the - \l{qmake-project-files.html#GeneralConfiguration}{\c CONFIG variable} - are treated specially by \c qmake. Each of the possible values can be - used as the condition for a scope. For example, the list of values - held by \c CONFIG can be extended with the \c opengl value: + \l{qmake-project-files.html#GeneralConfiguration}{\c CONFIG variable} are + treated specially by \l{qmake Manual#qmake}{\c qmake}. Each of the possible + values can be used as the condition for a scope. For example, the list of + values held by \c CONFIG can be extended with the \c opengl value: \snippet doc/src/snippets/qmake/configscopes.pro 0 @@ -4293,10 +4380,11 @@ \section1 Variables Many of the variables used in project files are special variables that - \l {qmake}{ \c qmake}uses when generating Makefiles, such as \c DEFINES, \c SOURCES, - and \c HEADERS. It is possible for you to create variables for your own - use; \l {qmake}{ \c qmake}creates new variables with a given name when it encounters - an assignment to that name. For example: + \l{qmake Manual#qmake}{\c qmake} uses when generating Makefiles, such as + \c DEFINES, \c SOURCES, and \c HEADERS. It is possible for you to create + variables for your own use; \l{qmake Manual#qmake}{\c qmake} creates new + variables with a given name when it encounters an assignment to that name. + For example: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 97 @@ -4322,11 +4410,12 @@ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 100 Variables can be used to store the contents of environment variables. - These can be evaluated at the time that \l {qmake}{ \c qmake}is run, or included - in the generated Makefile for evaluation when the project is built. + These can be evaluated at the time that \l{qmake Manual#qmake}{\c qmake} + is run, or included in the generated Makefile for evaluation when the + project is built. - To obtain the contents of an environment value when \l {qmake}{ \c qmake}is run, - use the \c $$(...) operator: + To obtain the contents of an environment value when + \l{qmake Manual#qmake}{\c qmake}is run, use the \c $$(...) operator: \snippet doc/src/snippets/qmake/environment.pro 0 @@ -4359,12 +4448,12 @@ \target VariableProcessingFunctions \section1 Variable Processing Functions - \l {qmake}{ \c qmake}provides a selection of built-in functions to allow the - contents of variables to be processed. These functions process the - arguments supplied to them and return a value, or list of values, as - a result. In order to assign a result to a variable, it is necessary - to use the \c $$ operator with this type of function in the same way - used to assign contents of one variable to another: + \l{qmake Manual#qmake}{\c qmake} provides a selection of built-in + functions to allow the contents of variables to be processed. These + functions process the arguments supplied to them and return a value, or + list of values, as a result. In order to assign a result to a variable, + it is necessary to use the \c $$ operator with this type of function in + the same way used to assign contents of one variable to another: \snippet doc/src/snippets/qmake/functions.pro 1 @@ -4387,9 +4476,9 @@ \target ConditionalFunctions \section1 Conditional Functions - \l {qmake}{ \c qmake}provides built-in functions that can be used as conditions - when writing scopes. These functions do not return a value, but - instead indicate "success" or "failure": + \l{qmake Manual#qmake}{\c qmake} provides built-in functions that can be + used as conditions when writing scopes. These functions do not return a + value, but instead indicate "success" or "failure": \snippet doc/src/snippets/qmake/functions.pro 3 @@ -4404,13 +4493,13 @@ \section1 Adding New Configuration Features - \l {qmake}{ \c qmake}lets you create your own \e features that can be included in - project files by adding their names to the list of values specified by - the \c CONFIG variable. Features are collections of custom functions and - definitions in \c{.prf} files that can reside in one of many standard - directories. The locations of these directories are defined in a number - of places, and \l {qmake}{ \c qmake}checks each of them in the following order when - it looks for \c{.prf} files: + \l{qmake Manual#qmake}{\c qmake} lets you create your own \e features that + can be included in project files by adding their names to the list of + values specified by the \c CONFIG variable. Features are collections of + custom functions and definitions in \c{.prf} files that can reside in one + of many standard directories. The locations of these directories are + defined in a number of places, and \l{qmake Manual#qmake}{\c qmake} checks + each of them in the following order when it looks for \c{.prf} files: \list 1 \o In a directory listed in the \c QMAKEFEATURES environment variable; @@ -4446,10 +4535,10 @@ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 103 - With this addition to the \c CONFIG variable, \l {qmake}{ \c qmake}will search the - locations listed above for the \c myfeatures.prf file after it has - finished parsing your project file. On Unix systems, it will look for - the following file: + With this addition to the \c CONFIG variable, + \l{qmake Manual#qmake}{\c qmake} will search the locations listed above for + the \c myfeatures.prf file after it has finished parsing your project file. + On Unix systems, it will look for the following file: \list 1 \o \c $QMAKEFEATURES/myfeatures.prf (for each directory listed in the @@ -4489,8 +4578,8 @@ specified file. Each subsequent compilation is faster because the stable code does not need to be recompiled. - \l {qmake}{ \c qmake}supports the use of precompiled headers (PCH) on some - platforms and build environments, including: + \l{qmake Manual#qmake}{\c qmake} supports the use of precompiled headers + (PCH) on some platforms and build environments, including: \list \o Windows \list @@ -4535,9 +4624,10 @@ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 105 - \l {qmake}{ \c qmake}will handle the rest, to ensure the creation and use of the - precompiled header file. You do not need to include the precompiled - header file in \c HEADERS, as \l {qmake}{ \c qmake}will do this if the configuration + \l{qmake Manual#qmake}{\c qmake} will handle the rest, to ensure the + creation and use of the precompiled header file. You do not need to + include the precompiled header file in \c HEADERS, as + \l{qmake Manual#qmake}{\c qmake} will do this if the configuration supports PCH. All platforms that support precompiled headers have the configuration @@ -4602,8 +4692,9 @@ \previouspage qmake Manual \nextpage qmake Common Projects - This tutorial teaches you how to use \c qmake. We recommend that - you read the \l {qmake}{ \c qmake}user guide after completing this tutorial. + This tutorial teaches you how to use \l{qmake Manual#qmake}{\c qmake}. We + recommend that you read the \l{qmake Manual#qmake}{\c qmake} user guide + after completing this tutorial. \section1 Starting off Simple @@ -4621,8 +4712,8 @@ the application is that it's written in Qt. First, using your favorite plain text editor, create a file called \c hello.pro in \c{examples/qmake/tutorial}. The first thing you need to do is add the - lines that tell \l {qmake}{ \c qmake}about the source and header files that are part - of your development project. + lines that tell \l{qmake Manual#qmake}{\c qmake} about the source and + header files that are part of your development project. We'll add the source files to the project file first. To do this you need to use the \l{qmake Variable Reference#SOURCES}{SOURCES} variable. @@ -4661,23 +4752,24 @@ The final step is to set the \l{qmake Variable Reference#CONFIG}{CONFIG} variable. Since this is a Qt application, we need to put \c qt on the - \c CONFIG line so that \l {qmake}{ \c qmake}will add the relevant libraries to be - linked against and ensure that build lines for \c moc and \c uic are - included in the generated Makefile. + \c CONFIG line so that \l{qmake Manual#qmake}{\c qmake} will add the + relevant libraries to be linked against and ensure that build lines for + \c moc and \c uic are included in the generated Makefile. The finished project file should look like this: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 113 - You can now use \l {qmake}{ \c qmake}to generate a Makefile for your application. - On the command line, in your project's directory, type the following: + You can now use \l{qmake Manual#qmake}{\c qmake} to generate a Makefile + for your application. On the command line, in your project's directory, + type the following: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 114 Then type \c make or \c nmake depending on the compiler you use. - For Visual Studio users, \l {qmake}{ \c qmake}can also generate \c .dsp or - \c .vcproj files, for example: + For Visual Studio users, \l{qmake Manual#qmake}{\c qmake} can also + generate \c .dsp or \c .vcproj files, for example: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 115 @@ -4693,9 +4785,9 @@ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 116 - Use \l {qmake}{ \c qmake}as before to generate a Makefile and you will be able to - obtain useful information about your application when running it in - a debugging environment. + Use \l{qmake Manual#qmake}{\c qmake} as before to generate a Makefile and + you will be able to obtain useful information about your application when + running it in a debugging environment. \section1 Adding Platform-Specific Source Files @@ -4706,15 +4798,16 @@ hellounix.cpp. We can't just add these to the \c SOURCES variable since this will put both files in the Makefile. So, what we need to do here is to use a scope which will be processed depending on - which platform \l {qmake}{ \c qmake}is run on. + which platform \l{qmake Manual#qmake}{\c qmake} is run on. A simple scope that will add in the platform-dependent file for Windows looks like this: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 117 - So if \l {qmake}{ \c qmake}is run on Windows, it will add \c hellowin.cpp to the - list of source files. If \l {qmake}{ \c qmake}is run on any other platform, it + So if \l{qmake Manual#qmake}{\c qmake} is run on Windows, it will add + \c hellowin.cpp to the list of source files. If + \l{qmake Manual#qmake}{\c qmake} is run on any other platform, it will simply ignore it. Now all that is left to be done is to create a scope for the Unix-specific file. @@ -4723,15 +4816,16 @@ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 118 - Use \l {qmake}{ \c qmake}as before to generate a Makefile. + Use \l{qmake Manual#qmake}{\c qmake} as before to generate a Makefile. \section1 Stopping qmake If a File Doesn't Exist You may not want to create a Makefile if a certain file doesn't exist. We can check if a file exists by using the exists() function. We can - stop \l {qmake}{ \c qmake}from processing by using the error() function. This - works in the same way as scopes do. Simply replace the scope condition - with the function. A check for a \c main.cpp file looks like this: + stop \l{qmake Manual#qmake}{\c qmake} from processing by using the error() + function. This works in the same way as scopes do. Simply replace the + scope condition with the function. A check for a \c main.cpp file looks + like this: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 119 @@ -4741,9 +4835,9 @@ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 120 - Use \l {qmake}{ \c qmake}as before to generate a makefile. If you rename \c - main.cpp temporarily, you will see the message and \l {qmake}{ \c qmake}will stop - processing. + Use \l{qmake Manual#qmake}{\c qmake} as before to generate a makefile. + If you rename \c main.cpp temporarily, you will see the message and + \l{qmake Manual#qmake}{\c qmake} will stop processing. \section1 Checking for More than One Condition @@ -4765,8 +4859,9 @@ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 122 - That's it! You have now completed the tutorial for \c qmake, and are - ready to write project files for your development projects. + That's it! You have now completed the tutorial for + \l{qmake Manual#qmake}{\c qmake}, and are ready to write project files for + your development projects. */ /*! @@ -4776,10 +4871,10 @@ \previouspage qmake Tutorial \nextpage Using qmake - This chapter describes how to set up \l {qmake}{ \c qmake}project files for three - common project types that are based on Qt. Although all kinds of - projects use many of the same variables, each of them use project-specific - variables to customize output files. + This chapter describes how to set up \l{qmake Manual#qmake}{\c qmake} + project files for three common project types that are based on Qt. + Although all kinds of projects use many of the same variables, each of + them use project-specific variables to customize output files. Platform-specific variables are not described here; we refer the reader to the \l{Deploying Qt Applications} document for information on issues such as @@ -4795,9 +4890,10 @@ \section2 The app Template - The \c app template tells \l {qmake}{ \c qmake}to generate a Makefile that will build - an application. With this template, the type of application can be specified - by adding one of the following options to the \c CONFIG variable definition: + The \c app template tells \l{qmake Manual#qmake}{\c qmake} to generate a + Makefile that will build an application. With this template, the type of + application can be specified by adding one of the following options to the + \c CONFIG variable definition: \table \header \o Option \o Description @@ -4806,9 +4902,9 @@ application. \endtable - When using this template the following \l {qmake}{ \c qmake}system variables are recognized. - You should use these in your .pro file to specify information about your - application. + When using this template the following \l{qmake Manual#qmake}{\c qmake} + system variables are recognized. You should use these in your .pro file to + specify information about your application. \list \o HEADERS - A list of all the header files for the application. @@ -4830,10 +4926,10 @@ \o RES_FILE - Windows only: A resource file to be linked against for the application. \endlist - You only need to use the system variables that you have values for, - for instance, if you do not have any extra INCLUDEPATHs then you do not - need to specify any, \l {qmake}{ \c qmake}will add in the default ones needed. - For instance, an example project file might look like this: + You only need to use the system variables that you have values for, for + instance, if you do not have any extra INCLUDEPATHs then you do not need + to specify any, \l{qmake Manual#qmake}{\c qmake} will add in the default + ones needed. For instance, an example project file might look like this: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 123 @@ -4848,11 +4944,11 @@ \section2 The lib Template - The \c lib template tells \l {qmake}{ \c qmake}to generate a Makefile that will - build a library. When using this template, in addition to the system variables - mentioned above for the \c app template the \c VERSION variable is - supported. You should use these in your .pro file to specify - information about the library. + The \c lib template tells \l{qmake Manual#qmake}{\c qmake} to generate a + Makefile that will build a library. When using this template, in addition + to the system variables mentioned above for the \c app template the + \c VERSION variable is supported. You should use these in your .pro file + to specify information about the library. When using the \c lib template, the following options can be added to the \c CONFIG variable to determine the type of library that is built: @@ -4879,10 +4975,10 @@ \section1 Building a Plugin Plugins are built using the \c lib template, as described in the previous - section. This tells \l {qmake}{ \c qmake}to generate a Makefile for the project that will - build a plugin in a suitable form for each platform, usually in the form of a - library. As with ordinary libraries, the \c VERSION variable is used to specify - information about the plugin. + section. This tells \l{qmake Manual#qmake}{\c qmake} to generate a + Makefile for the project that will build a plugin in a suitable form for + each platform, usually in the form of a library. As with ordinary + libraries, the \c VERSION variable is used to specify information about the plugin. \list \o VERSION - The version number of the target library, for example, 2.3.1. @@ -4917,9 +5013,9 @@ ensure that the resulting targets have different names. Providing different names for targets ensures that one will not overwrite the other. - When \l {qmake}{ \c qmake}processes the project file, it will generate a Makefile rule - to allow the project to be built in both modes. This can be invoked in the - following way: + When \l{qmake Manual#qmake}{\c qmake} processes the project file, it will + generate a Makefile rule to allow the project to be built in both modes. + This can be invoked in the following way: \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 124 diff --git a/doc/src/images/roaming-states.png b/doc/src/images/roaming-states.png Binary files differnew file mode 100644 index 0000000..bc61cac --- /dev/null +++ b/doc/src/images/roaming-states.png diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index 0bb3a29..65e6aa0e8 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -70,16 +70,17 @@ QMAKE_LINK_OBJECT_SCRIPT= QMAKE_LIBS = -llibc -llibm -leuser -llibdl QMAKE_LIBS_CORE = $$QMAKE_LIBS -lefsrv -lhal -lbafl -lapparc -QMAKE_LIBS_GUI = $$QMAKE_LIBS_CORE -lfbscli -lbitgdi -lgdi -lws32 -lapgrfx -lcone -leikcore -lmediaclientaudio -lcentralrepository +QMAKE_LIBS_CFBSBITMAP = -lfbscli -lbitgdi -lgdi +QMAKE_LIBS_GUI = $$QMAKE_LIBS_CORE $$QMAKE_LIBS_CFBSBITMAP -lws32 -lapgrfx -lcone -leikcore -lmediaclientaudio -lcentralrepository QMAKE_LIBS_NETWORK = QMAKE_LIBS_EGL = -llibEGL QMAKE_LIBS_OPENGL = -llibGLESv2 QMAKE_LIBS_OPENGL_ES1 = -llibGLESv1_CM QMAKE_LIBS_OPENGL_ES2 = -llibGLESv2 -QMAKE_LIBS_OPENGL_QT = -llibGLESv2 -lcone -lws32 -QMAKE_LIBS_OPENGL_ES1_QT = -llibGLESv1_CM -lcone -lws32 -QMAKE_LIBS_OPENGL_ES2_QT = -llibGLESv2 -lcone -lws32 -QMAKE_LIBS_OPENVG = -llibOpenVG -lfbscli -lbitgdi -lgdi +QMAKE_LIBS_OPENGL_QT = $$QMAKE_LIBS_OPENGL $$QMAKE_LIBS_CFBSBITMAP -lcone -lws32 +QMAKE_LIBS_OPENGL_ES1_QT = $$QMAKE_LIBS_OPENGL_ES1 $$QMAKE_LIBS_CFBSBITMAP -lcone -lws32 +QMAKE_LIBS_OPENGL_ES2_QT = $$QMAKE_LIBS_OPENGL_ES2 $$QMAKE_LIBS_CFBSBITMAP -lcone -lws32 +QMAKE_LIBS_OPENVG = $$QMAKE_LIBS_CFBSBITMAP -llibOpenVG QMAKE_LIBS_THREAD = -llibpthread QMAKE_LIBS_COMPAT = QMAKE_LIBS_S60 = -lavkon -leikcoctl diff --git a/mkspecs/symbian-sbsv2/flm/qt/qmake_emulator_deployment.flm b/mkspecs/symbian-sbsv2/flm/qt/qmake_emulator_deployment.flm index 39ab0f0..8791a47 100644 --- a/mkspecs/symbian-sbsv2/flm/qt/qmake_emulator_deployment.flm +++ b/mkspecs/symbian-sbsv2/flm/qt/qmake_emulator_deployment.flm @@ -33,5 +33,6 @@ ifeq ($($(SINGLETON)),) $(eval $(call qmake_emulator_deployment, $(subst $(CHAR_SPACE),\$(CHAR_SPACE),$(DEPLOY_TARGET)), $(subst $(CHAR_SPACE),\$(CHAR_SPACE),$(DEPLOY_SOURCE)))) $(call makepath,$(dir $(DEPLOY_TARGET))) $(eval $(call GenerateStandardCleanTarget,$(CLEAN_TARGET),'')) +$(eval $(call whatmacro,$(CLEAN_TARGET))) endif diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index c2fb16c..fcee35d 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -2446,9 +2446,14 @@ QT3_SUPPORT Q_CORE_EXPORT const char *qInstallPathSysconf(); # define QT_SYMBIAN_SUPPORTS_SGIMAGE #endif -#ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS +#ifdef SYMBIAN_GRAPHICS_SET_SURFACE_TRANSPARENCY_AVAILABLE # define Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE #endif + +#ifdef SYMBIAN_GRAPHICS_TRANSITION_EFFECTS_SIGNALING_AVAILABLE +# define Q_SYMBIAN_TRANSITION_EFFECTS +#endif + #endif //Symbian does not support data imports from a DLL diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 80e853d..dc4196d 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -82,7 +82,7 @@ public: item->setPos(QPointF(row, col)); } } - bool contains(int x, int y) const { + bool contains(qreal x, qreal y) const { return (x >= item->x() && x < item->x() + view->cellWidth() && y >= item->y() && y < item->y() + view->cellHeight()); } @@ -2294,7 +2294,7 @@ void QDeclarativeGridView::positionViewAtEnd() \bold Note: methods should only be called after the Component has completed. */ -int QDeclarativeGridView::indexAt(int x, int y) const +int QDeclarativeGridView::indexAt(qreal x, qreal y) const { Q_D(const QDeclarativeGridView); for (int i = 0; i < d->visibleItems.count(); ++i) { diff --git a/src/declarative/graphicsitems/qdeclarativegridview_p.h b/src/declarative/graphicsitems/qdeclarativegridview_p.h index 248b9ef..e68a9ba 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview_p.h +++ b/src/declarative/graphicsitems/qdeclarativegridview_p.h @@ -158,7 +158,7 @@ public: enum PositionMode { Beginning, Center, End, Visible, Contain }; Q_INVOKABLE void positionViewAtIndex(int index, int mode); - Q_INVOKABLE int indexAt(int x, int y) const; + Q_INVOKABLE int indexAt(qreal x, qreal y) const; Q_INVOKABLE Q_REVISION(1) void positionViewAtBeginning(); Q_INVOKABLE Q_REVISION(1) void positionViewAtEnd(); diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index a60a4aa..338cb58 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -148,7 +148,7 @@ public: else item->setWidth(size); } - bool contains(int x, int y) const { + bool contains(qreal x, qreal y) const { return (x >= item->x() && x < item->x() + item->width() && y >= item->y() && y < item->y() + item->height()); } @@ -228,6 +228,26 @@ public: return 0; } + // Returns the item before modelIndex, if created. + // May return an item marked for removal. + FxListItem *itemBefore(int modelIndex) const { + if (modelIndex < visibleIndex) + return 0; + int idx = 1; + int lastIndex = -1; + while (idx < visibleItems.count()) { + FxListItem *item = visibleItems.at(idx); + if (item->index != -1) + lastIndex = item->index; + if (item->index == modelIndex) + return visibleItems.at(idx-1); + ++idx; + } + if (lastIndex == modelIndex-1) + return visibleItems.last(); + return 0; + } + qreal position() const { Q_Q(const QDeclarativeListView); return orient == QDeclarativeListView::Vertical ? q->contentY() : q->contentX(); @@ -561,7 +581,7 @@ FxListItem *QDeclarativeListViewPrivate::createItem(int modelIndex) QString propValue = model->stringValue(modelIndex, sectionCriteria->property()); listItem->attached->m_section = sectionCriteria->sectionString(propValue); if (modelIndex > 0) { - if (FxListItem *item = visibleItem(modelIndex-1)) + if (FxListItem *item = itemBefore(modelIndex)) listItem->attached->m_prevSection = item->attached->section(); else listItem->attached->m_prevSection = sectionAt(modelIndex-1); @@ -969,18 +989,18 @@ void QDeclarativeListViewPrivate::updateSections() QDeclarativeListViewAttached *prevAtt = 0; int idx = -1; for (int i = 0; i < visibleItems.count(); ++i) { + QDeclarativeListViewAttached *attached = visibleItems.at(i)->attached; + attached->setPrevSection(prevSection); if (visibleItems.at(i)->index != -1) { - QDeclarativeListViewAttached *attached = visibleItems.at(i)->attached; - attached->setPrevSection(prevSection); QString propValue = model->stringValue(visibleItems.at(i)->index, sectionCriteria->property()); attached->setSection(sectionCriteria->sectionString(propValue)); - if (prevAtt) - prevAtt->setNextSection(attached->section()); - createSection(visibleItems.at(i)); - prevSection = attached->section(); - prevAtt = attached; idx = visibleItems.at(i)->index; } + createSection(visibleItems.at(i)); + if (prevAtt) + prevAtt->setNextSection(attached->section()); + prevSection = attached->section(); + prevAtt = attached; } if (prevAtt) { if (idx > 0 && idx < model->count()-1) @@ -2732,7 +2752,7 @@ void QDeclarativeListView::positionViewAtEnd() \bold Note: methods should only be called after the Component has completed. */ -int QDeclarativeListView::indexAt(int x, int y) const +int QDeclarativeListView::indexAt(qreal x, qreal y) const { Q_D(const QDeclarativeListView); for (int i = 0; i < d->visibleItems.count(); ++i) { @@ -3096,6 +3116,7 @@ void QDeclarativeListView::destroyRemoved() } // Correct the positioning of the items + d->updateSections(); d->layout(); } diff --git a/src/declarative/graphicsitems/qdeclarativelistview_p.h b/src/declarative/graphicsitems/qdeclarativelistview_p.h index 10fbf10..265f4bd 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview_p.h +++ b/src/declarative/graphicsitems/qdeclarativelistview_p.h @@ -208,7 +208,7 @@ public: enum PositionMode { Beginning, Center, End, Visible, Contain }; Q_INVOKABLE void positionViewAtIndex(int index, int mode); - Q_INVOKABLE int indexAt(int x, int y) const; + Q_INVOKABLE int indexAt(qreal x, qreal y) const; Q_INVOKABLE Q_REVISION(1) void positionViewAtBeginning(); Q_INVOKABLE Q_REVISION(1) void positionViewAtEnd(); diff --git a/src/gui/itemviews/qsortfilterproxymodel.cpp b/src/gui/itemviews/qsortfilterproxymodel.cpp index e54cbd2..9f89bf5 100644 --- a/src/gui/itemviews/qsortfilterproxymodel.cpp +++ b/src/gui/itemviews/qsortfilterproxymodel.cpp @@ -227,7 +227,7 @@ public: void _q_sourceColumnsRemoved(const QModelIndex &source_parent, int start, int end); - void clear_mapping(); + void _q_clearMapping(); void sort(); bool update_source_sort_column(); @@ -281,7 +281,7 @@ typedef QHash<QModelIndex, QSortFilterProxyModelPrivate::Mapping *> IndexMap; void QSortFilterProxyModelPrivate::_q_sourceModelDestroyed() { QAbstractProxyModelPrivate::_q_sourceModelDestroyed(); - clear_mapping(); + _q_clearMapping(); } void QSortFilterProxyModelPrivate::remove_from_mapping(const QModelIndex &source_parent) @@ -293,7 +293,7 @@ void QSortFilterProxyModelPrivate::remove_from_mapping(const QModelIndex &source } } -void QSortFilterProxyModelPrivate::clear_mapping() +void QSortFilterProxyModelPrivate::_q_clearMapping() { // store the persistent indexes QModelIndexPairList source_indexes = store_persistent_indexes(); @@ -1223,7 +1223,7 @@ void QSortFilterProxyModelPrivate::_q_sourceReset() { Q_Q(QSortFilterProxyModel); invalidatePersistentIndexes(); - clear_mapping(); + _q_clearMapping(); // All internal structures are deleted in clear() q->endResetModel(); update_source_sort_column(); @@ -1519,6 +1519,7 @@ QSortFilterProxyModel::QSortFilterProxyModel(QObject *parent) d->filter_column = 0; d->filter_role = Qt::DisplayRole; d->dynamic_sortfilter = false; + connect(this, SIGNAL(modelReset()), this, SLOT(_q_clearMapping())); } /*! @@ -1620,7 +1621,7 @@ void QSortFilterProxyModel::setSourceModel(QAbstractItemModel *sourceModel) connect(d->model, SIGNAL(modelAboutToBeReset()), this, SLOT(_q_sourceAboutToBeReset())); connect(d->model, SIGNAL(modelReset()), this, SLOT(_q_sourceReset())); - d->clear_mapping(); + d->_q_clearMapping(); endResetModel(); if (d->update_source_sort_column() && d->dynamic_sortfilter) d->sort(); @@ -2311,7 +2312,7 @@ void QSortFilterProxyModel::clear() { Q_D(QSortFilterProxyModel); emit layoutAboutToBeChanged(); - d->clear_mapping(); + d->_q_clearMapping(); emit layoutChanged(); } @@ -2326,7 +2327,7 @@ void QSortFilterProxyModel::invalidate() { Q_D(QSortFilterProxyModel); emit layoutAboutToBeChanged(); - d->clear_mapping(); + d->_q_clearMapping(); emit layoutChanged(); } diff --git a/src/gui/itemviews/qsortfilterproxymodel.h b/src/gui/itemviews/qsortfilterproxymodel.h index 09fd20f..afeaa69 100644 --- a/src/gui/itemviews/qsortfilterproxymodel.h +++ b/src/gui/itemviews/qsortfilterproxymodel.h @@ -189,6 +189,7 @@ private: Q_PRIVATE_SLOT(d_func(), void _q_sourceColumnsInserted(const QModelIndex &source_parent, int start, int end)) Q_PRIVATE_SLOT(d_func(), void _q_sourceColumnsAboutToBeRemoved(const QModelIndex &source_parent, int start, int end)) Q_PRIVATE_SLOT(d_func(), void _q_sourceColumnsRemoved(const QModelIndex &source_parent, int start, int end)) + Q_PRIVATE_SLOT(d_func(), void _q_clearMapping()) }; QT_END_NAMESPACE diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 6bddb19..fb0c6b8 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -87,7 +87,7 @@ #include <hal.h> #include <hal_data.h> -#ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS +#ifdef Q_SYMBIAN_TRANSITION_EFFECTS #include <graphics/wstfxconst.h> #endif @@ -432,7 +432,7 @@ void QSymbianControl::ConstructL(bool isWindowOwning, bool desktop) DrawableWindow()->SetPointerGrab(ETrue); } -#ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS +#ifdef Q_SYMBIAN_TRANSITION_EFFECTS if (OwnsWindow()) { TTfxWindowPurpose windowPurpose(ETfxPurposeNone); switch (qwidget->windowType()) { @@ -1586,7 +1586,7 @@ void qt_init(QApplicationPrivate * /* priv */, int) systemFont.setFamily(systemFont.defaultFamily()); QApplicationPrivate::setSystemFont(systemFont); -#ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS +#ifdef Q_SYMBIAN_TRANSITION_EFFECTS QObject::connect(qApp, SIGNAL(aboutToQuit()), qApp, SLOT(_q_aboutToQuit())); #endif @@ -1686,7 +1686,7 @@ bool QApplicationPrivate::modalState() void QApplicationPrivate::enterModal_sys(QWidget *widget) { -#ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS +#ifdef Q_SYMBIAN_TRANSITION_EFFECTS S60->wsSession().SendEffectCommand(ETfxCmdAppModalModeEnter); #endif if (widget) { @@ -1704,7 +1704,7 @@ void QApplicationPrivate::enterModal_sys(QWidget *widget) void QApplicationPrivate::leaveModal_sys(QWidget *widget) { -#ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS +#ifdef Q_SYMBIAN_TRANSITION_EFFECTS S60->wsSession().SendEffectCommand(ETfxCmdAppModalModeExit); #endif if (widget) { @@ -2385,7 +2385,7 @@ void QApplication::restoreOverrideCursor() void QApplicationPrivate::_q_aboutToQuit() { -#ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS +#ifdef Q_SYMBIAN_TRANSITION_EFFECTS // Send the shutdown tfx command S60->wsSession().SendEffectCommand(ETfxCmdAppShutDown); #endif diff --git a/src/gui/painting/qgraphicssystem_runtime.cpp b/src/gui/painting/qgraphicssystem_runtime.cpp index 0294c4b..5841d40 100644 --- a/src/gui/painting/qgraphicssystem_runtime.cpp +++ b/src/gui/painting/qgraphicssystem_runtime.cpp @@ -285,6 +285,7 @@ void QRuntimeWindowSurface::flush(QWidget *widget, const QRegion ®ion, void QRuntimeWindowSurface::setGeometry(const QRect &rect) { + QWindowSurface::setGeometry(rect); m_windowSurface->setGeometry(rect); } diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 682731a..ba618ea 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -3706,6 +3706,13 @@ void QRasterPaintEnginePrivate::rasterizeLine_dashed(QLineF line, const bool squareCap = (pen.capStyle() == Qt::SquareCap); const QVector<qreal> pattern = pen.dashPattern(); + qreal patternLength = 0; + for (int i = 0; i < pattern.size(); ++i) + patternLength += pattern.at(i); + + if (patternLength <= 0) + return; + qreal length = line.length(); Q_ASSERT(length > 0); while (length > 0) { diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp index d3af9e1..7435691 100644 --- a/src/gui/widgets/qplaintextedit.cpp +++ b/src/gui/widgets/qplaintextedit.cpp @@ -967,7 +967,7 @@ void QPlainTextEditPrivate::_q_adjustScrollbars() ++lineNumber; } if (lineNumber < layoutLineCount) - visibleFromBottom += (layoutLineCount - lineNumber - 1); + visibleFromBottom += (layoutLineCount - lineNumber); break; } diff --git a/src/network/bearer/qnetworkconfigmanager.cpp b/src/network/bearer/qnetworkconfigmanager.cpp index 0e3c519..dc4e4f7 100644 --- a/src/network/bearer/qnetworkconfigmanager.cpp +++ b/src/network/bearer/qnetworkconfigmanager.cpp @@ -57,16 +57,17 @@ QT_BEGIN_NAMESPACE { \ delete this_##NAME.pointer; \ this_##NAME.pointer = 0; \ - this_##NAME.destroyed = true; \ } \ static TYPE *NAME() \ { \ - if (!this_##NAME.pointer && !this_##NAME.destroyed) { \ + if (!this_##NAME.pointer) { \ TYPE *x = new TYPE; \ if (!this_##NAME.pointer.testAndSetOrdered(0, x)) \ delete x; \ - else \ + else { \ qAddPostRoutine(NAME##_cleanup); \ + this_##NAME.pointer->updateConfigurations(); \ + } \ } \ return this_##NAME.pointer; \ } @@ -75,15 +76,7 @@ Q_GLOBAL_STATIC_QAPP_DESTRUCTION(QNetworkConfigurationManagerPrivate, connManage QNetworkConfigurationManagerPrivate *qNetworkConfigurationManagerPrivate() { - static bool initialized = false; - - QNetworkConfigurationManagerPrivate *m = connManager(); - if (!initialized) { - initialized = true; - m->updateConfigurations(); - } - - return m; + return connManager(); } /*! diff --git a/src/network/bearer/qnetworksession.h b/src/network/bearer/qnetworksession.h index e107c62..ee28e64 100644 --- a/src/network/bearer/qnetworksession.h +++ b/src/network/bearer/qnetworksession.h @@ -141,13 +141,12 @@ private: #ifndef QT_MOBILITY_BEARER QT_END_NAMESPACE +Q_DECLARE_METATYPE(QNetworkSession::State) +Q_DECLARE_METATYPE(QNetworkSession::SessionError) #else QTM_END_NAMESPACE #endif -Q_DECLARE_METATYPE(QNetworkSession::State) -Q_DECLARE_METATYPE(QNetworkSession::SessionError) - QT_END_HEADER #endif // QT_NO_BEARERMANAGEMENT diff --git a/src/opengl/qgl_symbian.cpp b/src/opengl/qgl_symbian.cpp index 82b66f5..a9e2248 100644 --- a/src/opengl/qgl_symbian.cpp +++ b/src/opengl/qgl_symbian.cpp @@ -44,12 +44,14 @@ #include <coemain.h> #include <coecntrl.h> #include <w32std.h> +#include <private/qt_s60_p.h> #include <private/qpixmap_s60_p.h> #include <private/qimagepixmapcleanuphooks_p.h> #include <private/qgl_p.h> #include <private/qpaintengine_opengl_p.h> #include <private/qwidget_p.h> // to access QWExtra #include "qgl_egl_p.h" +#include "qpixmapdata_gl_p.h" #include "qcolormap.h" #include <QDebug> @@ -358,5 +360,117 @@ void QGLWidgetPrivate::recreateEglSurface() eglSurfaceWindowId = currentId; } +/* + * Symbian specific QGLPixmapData functions + */ + +static CFbsBitmap* createBlitCopy(CFbsBitmap* bitmap) +{ + CFbsBitmap *copy = q_check_ptr(new CFbsBitmap); + if (!copy) + return 0; + + if (copy->Create(bitmap->SizeInPixels(), bitmap->DisplayMode()) != KErrNone) { + delete copy; + copy = 0; + + return 0; + } + + CFbsBitmapDevice* bitmapDevice = 0; + CFbsBitGc *bitmapGc = 0; + QT_TRAP_THROWING(bitmapDevice = CFbsBitmapDevice::NewL(copy)); + QT_TRAP_THROWING(bitmapGc = CFbsBitGc::NewL()); + bitmapGc->Activate(bitmapDevice); + + bitmapGc->BitBlt(TPoint(), bitmap); + + delete bitmapGc; + delete bitmapDevice; + + return copy; +} + +void QGLPixmapData::fromNativeType(void* pixmap, NativeType type) +{ + if (type == QPixmapData::FbsBitmap) { + CFbsBitmap *bitmap = reinterpret_cast<CFbsBitmap*>(pixmap); + + bool deleteSourceBitmap = false; +#ifdef Q_SYMBIAN_HAS_EXTENDED_BITMAP_TYPE + + // Rasterize extended bitmaps + + TUid extendedBitmapType = bitmap->ExtendedBitmapType(); + if (extendedBitmapType != KNullUid) { + bitmap = createBlitCopy(bitmap); + deleteSourceBitmap = true; + } +#endif + + if (bitmap->IsCompressedInRAM()) { + bitmap = createBlitCopy(bitmap); + deleteSourceBitmap = true; + } + + TDisplayMode displayMode = bitmap->DisplayMode(); + QImage::Format format = qt_TDisplayMode2Format(displayMode); + + TSize size = bitmap->SizeInPixels(); + int bytesPerLine = bitmap->ScanLineLength(size.iWidth, displayMode); + + bitmap->BeginDataAccess(); + uchar *bytes = (uchar*)bitmap->DataAddress(); + QImage img = QImage(bytes, size.iWidth, size.iHeight, bytesPerLine, format); + img = img.copy(); + bitmap->EndDataAccess(); + + if (displayMode == EGray2) { + //Symbian thinks set pixels are white/transparent, Qt thinks they are foreground/solid + //So invert mono bitmaps so that masks work correctly. + img.invertPixels(); + } else if (displayMode == EColor16M) { + img = img.rgbSwapped(); // EColor16M is BGR + } + + fromImage(img, Qt::AutoColor); + + if (deleteSourceBitmap) + delete bitmap; + } +} + +void* QGLPixmapData::toNativeType(NativeType type) +{ + if (type == QPixmapData::FbsBitmap) { + CFbsBitmap *bitmap = q_check_ptr(new CFbsBitmap); + + if (bitmap) { + QImage image = toImage(); + + TDisplayMode displayMode(EColor16MU); + if (image.format()==QImage::Format_ARGB32_Premultiplied) + displayMode = EColor16MAP; + + if (bitmap->Create(TSize(image.width(), image.height()), + displayMode) == KErrNone) { + const uchar *sptr = const_cast<const QImage&>(image).bits(); + bitmap->BeginDataAccess(); + + uchar *dptr = (uchar*)bitmap->DataAddress(); + Mem::Copy(dptr, sptr, image.byteCount()); + + bitmap->EndDataAccess(); + } else { + delete bitmap; + bitmap = 0; + } + } + + return reinterpret_cast<void*>(bitmap); + } + return 0; +} + QT_END_NAMESPACE diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp index 43e80c1..70427d5 100644 --- a/src/opengl/qpixmapdata_gl.cpp +++ b/src/opengl/qpixmapdata_gl.cpp @@ -55,10 +55,11 @@ #include <qdesktopwidget.h> #include <qfile.h> #include <qimagereader.h> +#include <qbuffer.h> QT_BEGIN_NAMESPACE -extern QGLWidget* qt_gl_share_widget(); +Q_OPENGL_EXPORT extern QGLWidget* qt_gl_share_widget(); /*! \class QGLFramebufferObjectPool @@ -369,40 +370,18 @@ void QGLPixmapData::ensureCreated() const void QGLPixmapData::fromImage(const QImage &image, Qt::ImageConversionFlags flags) { - if (image.size() == QSize(w, h)) - setSerialNumber(++qt_gl_pixmap_serial); - resize(image.width(), image.height()); - - if (pixelType() == BitmapType) { - m_source = image.convertToFormat(QImage::Format_MonoLSB); - - } else { - QImage::Format format = QImage::Format_RGB32; - if (qApp->desktop()->depth() == 16) - format = QImage::Format_RGB16; - - if (image.hasAlphaChannel() - && ((flags & Qt::NoOpaqueDetection) - || const_cast<QImage &>(image).data_ptr()->checkForAlphaPixels())) - format = QImage::Format_ARGB32_Premultiplied;; - - m_source = image.convertToFormat(format); - } - - m_dirty = true; - m_hasFillColor = false; + QImage img = image; + createPixmapForImage(img, flags, false); +} - m_hasAlpha = m_source.hasAlphaChannel(); - w = image.width(); - h = image.height(); - is_null = (w <= 0 || h <= 0); - d = m_source.depth(); +void QGLPixmapData::fromImageReader(QImageReader *imageReader, + Qt::ImageConversionFlags flags) +{ + QImage image = imageReader->read(); + if (image.isNull()) + return; - if (m_texture.id) { - QGLShareContextScope ctx(qt_gl_share_widget()->context()); - glDeleteTextures(1, &m_texture.id); - m_texture.id = 0; - } + createPixmapForImage(image, flags, true); } bool QGLPixmapData::fromFile(const QString &filename, const char *format, @@ -411,31 +390,37 @@ bool QGLPixmapData::fromFile(const QString &filename, const char *format, if (pixelType() == QPixmapData::BitmapType) return QPixmapData::fromFile(filename, format, flags); QFile file(filename); - if (!file.open(QIODevice::ReadOnly)) - return false; - QByteArray data = file.peek(64); - bool alpha; - if (m_texture.canBindCompressedTexture - (data.constData(), data.size(), format, &alpha)) { - resize(0, 0); - data = file.readAll(); - file.close(); - QGLShareContextScope ctx(qt_gl_share_widget()->context()); - QSize size = m_texture.bindCompressedTexture - (data.constData(), data.size(), format); - if (!size.isEmpty()) { - w = size.width(); - h = size.height(); - is_null = false; - d = 32; - m_hasAlpha = alpha; - m_source = QImage(); - m_dirty = isValid(); - return true; + if (file.open(QIODevice::ReadOnly)) { + QByteArray data = file.peek(64); + bool alpha; + if (m_texture.canBindCompressedTexture + (data.constData(), data.size(), format, &alpha)) { + resize(0, 0); + data = file.readAll(); + file.close(); + QGLShareContextScope ctx(qt_gl_share_widget()->context()); + QSize size = m_texture.bindCompressedTexture + (data.constData(), data.size(), format); + if (!size.isEmpty()) { + w = size.width(); + h = size.height(); + is_null = false; + d = 32; + m_hasAlpha = alpha; + m_source = QImage(); + m_dirty = isValid(); + return true; + } + return false; } - return false; } - fromImage(QImageReader(&file, format).read(), flags); + + QImage image = QImageReader(filename, format).read(); + if (image.isNull()) + return false; + + createPixmapForImage(image, flags, true); + return !isNull(); } @@ -459,7 +444,67 @@ bool QGLPixmapData::fromData(const uchar *buffer, uint len, const char *format, return true; } } - return QPixmapData::fromData(buffer, len, format, flags); + + QByteArray a = QByteArray::fromRawData(reinterpret_cast<const char *>(buffer), len); + QBuffer b(&a); + b.open(QIODevice::ReadOnly); + QImage image = QImageReader(&b, format).read(); + if (image.isNull()) + return false; + + createPixmapForImage(image, flags, true); + + return !isNull(); +} + +/*! + out-of-place conversion (inPlace == false) will always detach() + */ +void QGLPixmapData::createPixmapForImage(QImage &image, Qt::ImageConversionFlags flags, bool inPlace) +{ + if (image.size() == QSize(w, h)) + setSerialNumber(++qt_gl_pixmap_serial); + + resize(image.width(), image.height()); + + if (pixelType() == BitmapType) { + m_source = image.convertToFormat(QImage::Format_MonoLSB); + + } else { + QImage::Format format = QImage::Format_RGB32; + if (qApp->desktop()->depth() == 16) + format = QImage::Format_RGB16; + + if (image.hasAlphaChannel() + && ((flags & Qt::NoOpaqueDetection) + || const_cast<QImage &>(image).data_ptr()->checkForAlphaPixels())) + format = QImage::Format_ARGB32_Premultiplied;; + + if (inPlace && image.data_ptr()->convertInPlace(format, flags)) { + m_source = image; + } else { + m_source = image.convertToFormat(format); + + // convertToFormat won't detach the image if format stays the same. + if (image.format() == format) + m_source.detach(); + } + } + + m_dirty = true; + m_hasFillColor = false; + + m_hasAlpha = m_source.hasAlphaChannel(); + w = image.width(); + h = image.height(); + is_null = (w <= 0 || h <= 0); + d = m_source.depth(); + + if (m_texture.id) { + QGLShareContextScope ctx(qt_gl_share_widget()->context()); + glDeleteTextures(1, &m_texture.id); + m_texture.id = 0; + } } bool QGLPixmapData::scroll(int dx, int dy, const QRect &rect) diff --git a/src/opengl/qpixmapdata_gl_p.h b/src/opengl/qpixmapdata_gl_p.h index 5545d3c..a4066fd 100644 --- a/src/opengl/qpixmapdata_gl_p.h +++ b/src/opengl/qpixmapdata_gl_p.h @@ -107,6 +107,8 @@ public: // Re-implemented from QPixmapData: void resize(int width, int height); void fromImage(const QImage &image, Qt::ImageConversionFlags flags); + void fromImageReader(QImageReader *imageReader, + Qt::ImageConversionFlags flags); bool fromFile(const QString &filename, const char *format, Qt::ImageConversionFlags flags); bool fromData(const uchar *buffer, uint len, const char *format, @@ -127,6 +129,11 @@ public: GLuint bind(bool copyBack = true) const; QGLTexture *texture() const; +#if defined(Q_OS_SYMBIAN) + void* toNativeType(NativeType type); + void fromNativeType(void* pixmap, NativeType type); +#endif + private: bool isValid() const; @@ -149,6 +156,8 @@ private: QImage fillImage(const QColor &color) const; + void createPixmapForImage(QImage &image, Qt::ImageConversionFlags flags, bool inPlace); + mutable QGLFramebufferObject *m_renderFbo; mutable QPaintEngine *m_engine; mutable QGLContext *m_ctx; diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index aad12d7..0bffbda 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -776,32 +776,60 @@ void QGLWindowSurface::updateGeometry() { return; d_ptr->geometry_updated = false; - QRect rect = geometry(); - hijackWindow(window()); - QGLContext *ctx = reinterpret_cast<QGLContext *>(window()->d_func()->extraData()->glContext); + bool hijack(true); + QWidgetPrivate *wd = window()->d_func(); + if (wd->extraData() && wd->extraData()->glContext) + hijack = false; // we already have gl context for widget + + if (hijack) + hijackWindow(window()); + + QGLContext *ctx = reinterpret_cast<QGLContext *>(wd->extraData()->glContext); #ifdef Q_WS_MAC ctx->updatePaintDevice(); #endif - const GLenum target = GL_TEXTURE_2D; + QSize surfSize = geometry().size(); - if (rect.width() <= 0 || rect.height() <= 0) + if (surfSize.width() <= 0 || surfSize.height() <= 0) return; - if (d_ptr->size == rect.size()) + if (d_ptr->size == surfSize) return; - d_ptr->size = rect.size(); + d_ptr->size = surfSize; + +#ifdef Q_OS_SYMBIAN + if (!hijack) { // Symbian needs to recreate EGL surface when native window size changes + if (ctx->d_func()->eglSurface != EGL_NO_SURFACE) { + eglDestroySurface(ctx->d_func()->eglContext->display(), + ctx->d_func()->eglSurface); + } + + ctx->d_func()->eglSurface = QEgl::createSurface(ctx->device(), + ctx->d_func()->eglContext->config()); + +#if !defined(QGL_NO_PRESERVED_SWAP) + eglGetError(); // Clear error state first. + eglSurfaceAttrib(QEgl::display(), ctx->d_func()->eglSurface, + EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED); + if (eglGetError() != EGL_SUCCESS) { + qWarning("QGLWindowSurface: could not restore preserved swap behaviour"); + } +#endif + } +#endif if (d_ptr->ctx) { #ifndef QT_OPENGL_ES_2 if (d_ptr->destructive_swap_buffers) - initializeOffscreenTexture(rect.size()); + initializeOffscreenTexture(surfSize); #endif return; } + const GLenum target = GL_TEXTURE_2D; if (d_ptr->destructive_swap_buffers && (QGLExtensions::glExtensions() & QGLExtensions::FramebufferObject) && (d_ptr->fbo || !d_ptr->tried_fbo) @@ -820,10 +848,10 @@ void QGLWindowSurface::updateGeometry() { if (QGLExtensions::glExtensions() & QGLExtensions::FramebufferBlit) format.setSamples(8); - d_ptr->fbo = new QGLFramebufferObject(rect.size(), format); + d_ptr->fbo = new QGLFramebufferObject(surfSize, format); if (d_ptr->fbo->isValid()) { - qDebug() << "Created Window Surface FBO" << rect.size() + qDebug() << "Created Window Surface FBO" << surfSize << "with samples" << d_ptr->fbo->format().samples(); return; } else { @@ -844,7 +872,7 @@ void QGLWindowSurface::updateGeometry() { delete d_ptr->pb; - d_ptr->pb = new QGLPixelBuffer(rect.width(), rect.height(), + d_ptr->pb = new QGLPixelBuffer(surfSize.width(), surfSize.height(), QGLFormat(QGL::SampleBuffers | QGL::StencilBuffer | QGL::DepthBuffer), qt_gl_share_widget()); @@ -854,7 +882,7 @@ void QGLWindowSurface::updateGeometry() { glGenTextures(1, &d_ptr->pb_tex_id); glBindTexture(target, d_ptr->pb_tex_id); - glTexImage2D(target, 0, GL_RGBA, rect.width(), rect.height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); + glTexImage2D(target, 0, GL_RGBA, surfSize.width(), surfSize.height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); glTexParameterf(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameterf(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); @@ -878,7 +906,7 @@ void QGLWindowSurface::updateGeometry() { #ifndef QT_OPENGL_ES_2 if (d_ptr->destructive_swap_buffers) - initializeOffscreenTexture(rect.size()); + initializeOffscreenTexture(surfSize); #endif qDebug() << "QGLWindowSurface: Using plain widget as window surface" << this;; diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp index 30d6b50..6b37b38 100644 --- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp +++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp @@ -213,6 +213,11 @@ void QNetworkManagerEngine::connectToId(const QString &id) dbusDevicePath = devicePath.path(); break; } + else if (device.deviceType() == DEVICE_TYPE_GSM && + connectionType == QLatin1String("gsm")) { + dbusDevicePath = devicePath.path(); + break; + } } const QString service = connection->connectionInterface()->service(); diff --git a/src/s60installs/bwins/QtOpenGLu.def b/src/s60installs/bwins/QtOpenGLu.def index 620fcb9..3eb1512 100644 --- a/src/s60installs/bwins/QtOpenGLu.def +++ b/src/s60installs/bwins/QtOpenGLu.def @@ -703,4 +703,12 @@ EXPORTS ?maxTextureWidth@QGLTextureGlyphCache@@UBEHXZ @ 702 NONAME ; int QGLTextureGlyphCache::maxTextureWidth(void) const ?filterMode@QGLTextureGlyphCache@@QBE?AW4FilterMode@1@XZ @ 703 NONAME ; enum QGLTextureGlyphCache::FilterMode QGLTextureGlyphCache::filterMode(void) const ?setFilterMode@QGLTextureGlyphCache@@QAEXW4FilterMode@1@@Z @ 704 NONAME ; void QGLTextureGlyphCache::setFilterMode(enum QGLTextureGlyphCache::FilterMode) + ?toNativeType@QGLPixmapData@@UAEPAXW4NativeType@QPixmapData@@@Z @ 705 NONAME ; void * QGLPixmapData::toNativeType(enum QPixmapData::NativeType) + ?fromNativeType@QGLPixmapData@@UAEXPAXW4NativeType@QPixmapData@@@Z @ 706 NONAME ; void QGLPixmapData::fromNativeType(void *, enum QPixmapData::NativeType) + ?clear@QGLTextureGlyphCache@@QAEXXZ @ 707 NONAME ; void QGLTextureGlyphCache::clear(void) + ?context@QGLTextureGlyphCache@@QBEPAVQGLContext@@XZ @ 708 NONAME ; class QGLContext * QGLTextureGlyphCache::context(void) const + ?swapBehavior@QGLWindowSurface@@2W4SwapMode@1@A @ 709 NONAME ; enum QGLWindowSurface::SwapMode QGLWindowSurface::swapBehavior + ?createPixmapForImage@QGLPixmapData@@AAEXAAVQImage@@V?$QFlags@W4ImageConversionFlag@Qt@@@@_N@Z @ 710 NONAME ; void QGLPixmapData::createPixmapForImage(class QImage &, class QFlags<enum Qt::ImageConversionFlag>, bool) + ?fromImageReader@QGLPixmapData@@UAEXPAVQImageReader@@V?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 711 NONAME ; void QGLPixmapData::fromImageReader(class QImageReader *, class QFlags<enum Qt::ImageConversionFlag>) + ?setContext@QGLTextureGlyphCache@@QAEXPAVQGLContext@@@Z @ 712 NONAME ; void QGLTextureGlyphCache::setContext(class QGLContext *) diff --git a/src/s60installs/eabi/QtOpenGLu.def b/src/s60installs/eabi/QtOpenGLu.def index c92d99e..33d40fd 100644 --- a/src/s60installs/eabi/QtOpenGLu.def +++ b/src/s60installs/eabi/QtOpenGLu.def @@ -707,4 +707,11 @@ EXPORTS _ZNK20QGLTextureGlyphCache16maxTextureHeightEv @ 706 NONAME _ZThn8_NK20QGLTextureGlyphCache15maxTextureWidthEv @ 707 NONAME _ZThn8_NK20QGLTextureGlyphCache16maxTextureHeightEv @ 708 NONAME + _ZN13QGLPixmapData12toNativeTypeEN11QPixmapData10NativeTypeE @ 709 NONAME + _ZN13QGLPixmapData14fromNativeTypeEPvN11QPixmapData10NativeTypeE @ 710 NONAME + _ZN13QGLPixmapData15fromImageReaderEP12QImageReader6QFlagsIN2Qt19ImageConversionFlagEE @ 711 NONAME + _ZN13QGLPixmapData20createPixmapForImageER6QImage6QFlagsIN2Qt19ImageConversionFlagEEb @ 712 NONAME + _ZN16QGLWindowSurface12swapBehaviorE @ 713 NONAME DATA 4 + _ZN20QGLTextureGlyphCache10setContextEP10QGLContext @ 714 NONAME + _ZN20QGLTextureGlyphCache5clearEv @ 715 NONAME diff --git a/src/script/api/qscriptcontext.cpp b/src/script/api/qscriptcontext.cpp index 2468a46..5454df5 100644 --- a/src/script/api/qscriptcontext.cpp +++ b/src/script/api/qscriptcontext.cpp @@ -268,8 +268,14 @@ QScriptValue QScriptContext::argument(int index) const QScriptValue QScriptContext::callee() const { const JSC::CallFrame *frame = QScriptEnginePrivate::frameForContext(this); - QScript::APIShim shim(QScript::scriptEngineFromExec(frame)); - return QScript::scriptEngineFromExec(frame)->scriptValueFromJSCValue(frame->callee()); + QScriptEnginePrivate *eng = QScript::scriptEngineFromExec(frame); + QScript::APIShim shim(eng); + if (frame->callee() == eng->originalGlobalObject()) { + // This is a pushContext()-created context; the callee is a lie. + Q_ASSERT(QScriptEnginePrivate::contextFlags(const_cast<JSC::CallFrame*>(frame)) & QScriptEnginePrivate::NativeContext); + return QScriptValue(); + } + return eng->scriptValueFromJSCValue(frame->callee()); } /*! diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index d3e5f2f..160058e 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -955,8 +955,11 @@ static QScriptValue __setupPackage__(QScriptContext *ctx, QScriptEngine *eng) } // namespace QScript QScriptEnginePrivate::QScriptEnginePrivate() - : registeredScriptValues(0), freeScriptValues(0), freeScriptValuesCount(0), - registeredScriptStrings(0), inEval(false) + : originalGlobalObjectProxy(0), currentFrame(0), + qobjectPrototype(0), qmetaobjectPrototype(0), variantPrototype(0), + activeAgent(0), agentLineNumber(-1), + registeredScriptValues(0), freeScriptValues(0), freeScriptValuesCount(0), + registeredScriptStrings(0), processEventsInterval(-1), inEval(false) { qMetaTypeId<QScriptValue>(); qMetaTypeId<QList<int> >(); @@ -1002,10 +1005,6 @@ QScriptEnginePrivate::QScriptEnginePrivate() currentFrame = exec; - originalGlobalObjectProxy = 0; - activeAgent = 0; - agentLineNumber = -1; - processEventsInterval = -1; cachedTranslationUrl = JSC::UString(); cachedTranslationContext = JSC::UString(); JSC::setCurrentIdentifierTable(oldTable); @@ -1253,10 +1252,12 @@ void QScriptEnginePrivate::mark(JSC::MarkStack& markStack) { Q_Q(QScriptEngine); - markStack.append(originalGlobalObject()); - markStack.append(globalObject()); - if (originalGlobalObjectProxy) - markStack.append(originalGlobalObjectProxy); + if (originalGlobalObject()) { + markStack.append(originalGlobalObject()); + markStack.append(globalObject()); + if (originalGlobalObjectProxy) + markStack.append(originalGlobalObjectProxy); + } if (qobjectPrototype) markStack.append(qobjectPrototype); @@ -1281,7 +1282,7 @@ void QScriptEnginePrivate::mark(JSC::MarkStack& markStack) } } - { + if (q) { QScriptContext *context = q->currentContext(); while (context) { @@ -2727,6 +2728,14 @@ JSC::CallFrame *QScriptEnginePrivate::pushContext(JSC::CallFrame *exec, JSC::JSV bool clearScopeChain) { JSC::JSValue thisObject = _thisObject; + if (!callee) { + // callee can't be zero, as this can cause JSC to crash during GC + // marking phase if the context's Arguments object has been created. + // Fake it by using the global object. Note that this is also handled + // in QScriptContext::callee(), as that function should still return + // an invalid value. + callee = originalGlobalObject(); + } if (calledAsConstructor) { //JSC doesn't create default created object for native functions. so we do it JSC::JSValue prototype = callee->get(exec, exec->propertyNames().prototype); diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp index ac57918..e289636 100644 --- a/src/script/api/qscriptvalue.cpp +++ b/src/script/api/qscriptvalue.cpp @@ -254,6 +254,7 @@ QScriptValue::QScriptValue(QScriptEngine *engine, int val) : d_ptr(new (QScriptEnginePrivate::get(engine))QScriptValuePrivate(QScriptEnginePrivate::get(engine))) { if (engine) { + QScript::APIShim shim(d_ptr->engine); JSC::ExecState *exec = d_ptr->engine->currentFrame; d_ptr->initFrom(JSC::jsNumber(exec, val)); } else @@ -271,6 +272,7 @@ QScriptValue::QScriptValue(QScriptEngine *engine, uint val) : d_ptr(new (QScriptEnginePrivate::get(engine))QScriptValuePrivate(QScriptEnginePrivate::get(engine))) { if (engine) { + QScript::APIShim shim(d_ptr->engine); JSC::ExecState *exec = d_ptr->engine->currentFrame; d_ptr->initFrom(JSC::jsNumber(exec, val)); } else @@ -288,6 +290,7 @@ QScriptValue::QScriptValue(QScriptEngine *engine, qsreal val) : d_ptr(new (QScriptEnginePrivate::get(engine))QScriptValuePrivate(QScriptEnginePrivate::get(engine))) { if (engine) { + QScript::APIShim shim(d_ptr->engine); JSC::ExecState *exec = d_ptr->engine->currentFrame; d_ptr->initFrom(JSC::jsNumber(exec, val)); } else @@ -305,6 +308,7 @@ QScriptValue::QScriptValue(QScriptEngine *engine, const QString &val) : d_ptr(new (QScriptEnginePrivate::get(engine))QScriptValuePrivate(QScriptEnginePrivate::get(engine))) { if (engine) { + QScript::APIShim shim(d_ptr->engine); JSC::ExecState *exec = d_ptr->engine->currentFrame; d_ptr->initFrom(JSC::jsString(exec, val)); } else { @@ -325,6 +329,7 @@ QScriptValue::QScriptValue(QScriptEngine *engine, const char *val) : d_ptr(new (QScriptEnginePrivate::get(engine))QScriptValuePrivate(QScriptEnginePrivate::get(engine))) { if (engine) { + QScript::APIShim shim(d_ptr->engine); JSC::ExecState *exec = d_ptr->engine->currentFrame; d_ptr->initFrom(JSC::jsString(exec, val)); } else { diff --git a/tests/auto/declarative/qdeclarativelistview/data/listview-sections_delegate.qml b/tests/auto/declarative/qdeclarativelistview/data/listview-sections_delegate.qml index 35a398b..9d9cda8 100644 --- a/tests/auto/declarative/qdeclarativelistview/data/listview-sections_delegate.qml +++ b/tests/auto/declarative/qdeclarativelistview/data/listview-sections_delegate.qml @@ -41,6 +41,11 @@ Rectangle { text: wrapper.y } } + ListView.onRemove: SequentialAnimation { + PropertyAction { target: wrapper; property: "ListView.delayRemove"; value: true } + NumberAnimation { target: wrapper; property: "height"; to: 0; duration: 100; easing.type: Easing.InOutQuad } + PropertyAction { target: wrapper; property: "ListView.delayRemove"; value: false } + } } } ] diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp index f358625..c7f90da 100644 --- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp +++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp @@ -1078,6 +1078,19 @@ void tst_QDeclarativeListView::sectionsDelegate() QTRY_COMPARE(item->y(), qreal(i*20*6)); } + // remove section boundary + model.removeItem(5); + qApp->processEvents(); + for (int i = 0; i < 3; ++i) { + QDeclarativeItem *item = findItem<QDeclarativeItem>(contentItem, + "sect_" + (i == 0 ? QString("aaa") : QString::number(i))); + QVERIFY(item); + } + + // QTBUG-17606 + QList<QDeclarativeItem*> items = findItems<QDeclarativeItem>(contentItem, "sect_1"); + QCOMPARE(items.count(), 1); + delete canvas; } diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp index 4cf64f1..c9eca89 100644 --- a/tests/auto/qpainter/tst_qpainter.cpp +++ b/tests/auto/qpainter/tst_qpainter.cpp @@ -258,6 +258,8 @@ private slots: void QTBUG14614_gradientCacheRaceCondition(); void drawTextOpacity(); + void QTBUG17053_zeroDashPattern(); + private: void fillData(); void setPenColor(QPainter& p); @@ -4601,6 +4603,26 @@ void tst_QPainter::drawTextOpacity() QCOMPARE(image, copy); } +void tst_QPainter::QTBUG17053_zeroDashPattern() +{ + QImage image(32, 32, QImage::Format_RGB32); + image.fill(0xffffffff); + + QImage original = image; + + QVector<qreal> pattern; + pattern << qreal(0) << qreal(0); + + QPainter p(&image); + QPen pen(Qt::black, 2.0); + pen.setDashPattern(pattern); + + p.setPen(pen); + p.drawLine(0, 0, image.width(), image.height()); + + QCOMPARE(image, original); +} + QTEST_MAIN(tst_QPainter) #include "tst_qpainter.moc" diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp index 8de6fbc..6c89bcb 100644 --- a/tests/auto/qscriptengine/tst_qscriptengine.cpp +++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp @@ -169,6 +169,7 @@ private slots: void nativeFunctionScopes(); void evaluateProgram(); void collectGarbageAfterConnect(); + void collectGarbageAfterNativeArguments(); void promoteThisObjectToQObjectInConstructor(); void qRegExpInport_data(); @@ -5040,6 +5041,16 @@ void tst_QScriptEngine::collectGarbageAfterConnect() QVERIFY(widget == 0); } +void tst_QScriptEngine::collectGarbageAfterNativeArguments() +{ + // QTBUG-17788 + QScriptEngine eng; + QScriptContext *ctx = eng.pushContext(); + QScriptValue arguments = ctx->argumentsObject(); + // Shouldn't crash when marking the arguments object. + collectGarbage_helper(eng); +} + static QScriptValue constructQObjectFromThisObject(QScriptContext *ctx, QScriptEngine *eng) { Q_ASSERT(ctx->isCalledAsConstructor()); diff --git a/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp index bce7281..dfe47cb 100644 --- a/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp +++ b/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp @@ -144,6 +144,8 @@ private slots: void taskQTBUG_7537_appearsAndSort(); void taskQTBUG_7716_unnecessaryDynamicSorting(); void taskQTBUG_10287_unnecessaryMapCreation(); + void taskQTBUG_17812_resetInvalidate_data(); + void taskQTBUG_17812_resetInvalidate(); void testMultipleProxiesWithSelection(); void mapSelectionFromSource(); @@ -3213,5 +3215,60 @@ void tst_QSortFilterProxyModel::filteredColumns() } +void tst_QSortFilterProxyModel::taskQTBUG_17812_resetInvalidate_data() +{ + QTest::addColumn<int>("test"); + QTest::addColumn<bool>("works"); + + QTest::newRow("nothing") << 0 << false; + QTest::newRow("reset") << 1 << true; + QTest::newRow("invalidate") << 2 << true; + QTest::newRow("invalidate_filter") << 3 << true; +} + +void tst_QSortFilterProxyModel::taskQTBUG_17812_resetInvalidate() +{ + QFETCH(int, test); + QFETCH(bool, works); + + struct Proxy : QSortFilterProxyModel { + QString pattern; + virtual bool filterAcceptsRow(int source_row, const QModelIndex&) const { + return sourceModel()->data(sourceModel()->index(source_row, 0)).toString().contains(pattern); + } + void notifyChange(int test) { + switch (test) { + case 0: break; + case 1: reset(); break; + case 2: invalidate(); break; + case 3: invalidateFilter(); break; + } + } + }; + + QStringListModel sourceModel(QStringList() << "Poisson" << "Vache" << "Brebis" + << "Elephant" << "Cochon" << "Serpent" + << "Mouton" << "Ecureuil" << "Mouche"); + Proxy proxy; + proxy.pattern = QString::fromLatin1("n"); + proxy.setSourceModel(&sourceModel); + + QCOMPARE(proxy.rowCount(), 5); + for (int i = 0; i < proxy.rowCount(); i++) { + QVERIFY(proxy.data(proxy.index(i,0)).toString().contains('n')); + } + + proxy.pattern = QString::fromLatin1("o"); + proxy.notifyChange(test); + + QCOMPARE(proxy.rowCount(), works ? 4 : 5); + bool ok = true; + for (int i = 0; i < proxy.rowCount(); i++) { + if (!proxy.data(proxy.index(i,0)).toString().contains('o')) + ok = false; + } + QCOMPARE(ok, works); +} + QTEST_MAIN(tst_QSortFilterProxyModel) #include "tst_qsortfilterproxymodel.moc" diff --git a/tools/shared/symbian/epocroot.cpp b/tools/shared/symbian/epocroot.cpp index e128cd2..5e6bc12 100644 --- a/tools/shared/symbian/epocroot.cpp +++ b/tools/shared/symbian/epocroot.cpp @@ -99,6 +99,11 @@ static void fixEpocRoot(QString &path) if (!path.size() || path[path.size()-1] != QLatin1Char('/')) { path += QLatin1Char('/'); } +#ifdef Q_OS_WIN32 + // Make sure we have drive letter in epocroot + if (path.startsWith(QLatin1Char('/'))) + path.prepend(QDir::currentPath().left(2)); +#endif } /** |