Commit cd5f9f6f authored by Eike Ziller's avatar Eike Ziller

Merge remote-tracking branch 'origin/3.5'

Change-Id: I7b3ef276d438ff0f184a649153e8aeec08a9f8c9
parents b1401173 aa8998cf

22.2 KB | W: | H:


19.1 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

27.3 KB | W: | H:


17.6 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

21.5 KB | W: | H:


16.9 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
......@@ -44,7 +44,9 @@
\l{}{Available Checkers}.
To suppress diagnostics, select \uicontrol {Suppress This Diagnostic} in the
context menu.
context menu. To view the suppression list for a project and to remove
diagnostics from it, select \uicontrol {Clang Static Analyzer Settings} in
the \uicontrol Projects mode.
\section1 Setting Up Clang Static Analyzer
......@@ -67,6 +67,8 @@
{Android NDK} from Google.
\note Android Studio is currently not supported by \QC.
\li On Windows, you also need the following:
......@@ -291,6 +291,7 @@
\li In the \uicontrol Application group, you can give the application a name and
select an icon for it. The three icon fields can contain different versions
of the icon with low, medium, and high DPI values, from left to right.
You can also give an activity a name and select the activity to run.
\li In the \uicontrol Permissions field, you can specify the permissions that your
application needs. Users are asked to grant the permissions when they
......@@ -55,20 +55,22 @@
developers working on the same projects.
For example, if you work on a project and need to switch to another project
for a while, you can save your workspace as a session and then close the
project and all the files in it. Everything that you open after saving the
session becomes a part of a new session. When you want to return to working
on the first project, open the saved session. \QC opens the projects and
files that belong to the session.
for a while, you can clone the current session to save it under a name and
create a new session for the other project. Everything that you open after
switching to the new session becomes a part of it. When you want to return
to working on the first project, switch to the saved session. \QC opens the
projects and files that belong to the session.
To create a new session or remove existing sessions, select \uicontrol File >
\uicontrol{Session Manager}.
To save a session under a new name, select \uicontrol File >
\uicontrol {Session Manager} > \uicontrol Clone.
To create a new session, select \uicontrol File >
\uicontrol {Session Manager} > \uicontrol New.
\image qtcreator-session-manager.png
To switch between sessions, choose \uicontrol {File > Session Manager}. If you do
not create or select a session, \QC always uses the default session, which
was created the last time you exited \QC.
To switch between sessions, choose \uicontrol {File > Session Manager} >
\uicontrol {Switch to}.
When you launch \QC, a list of existing sessions is displayed in the
\uicontrol Welcome mode.
......@@ -486,6 +486,11 @@
To determine whether the keywords in the whole project or in the current
file are displayed by default, select \uicontrol {Scanning scope}.
To exclude files from scanning, select \uicontrol {To-Do Settings} in the
\uicontrol Projects mode. Select \uicontrol Add and enter a regular
expression that matches the path to files to exclude. Use a forward slash
(/) as a separator in the path also on Windows.
The Todo plugin is disabled by default. To enable the plugin, select
\uicontrol Help > \uicontrol {About Plugins} > \uicontrol Utilities >
\uicontrol Todo and restart
......@@ -722,6 +722,12 @@
deselect the \uicontrol Load check box for the \uicontrol Perforce plugin in the
\uicontrol {Version Control} group.
In the Perforce options, you can specify workspace details:
\uicontrol {P4 user}, \uicontrol {P4 client}, and \uicontrol {P4 port}. To
specify the details individually for several projects, use configuration
files instead. Create a \c {p4config.txt} configuration file for each
project in the top level project directory.
The \uicontrol Perforce submenu contains the following additional items:
......@@ -39,13 +39,20 @@
Since \QC 1.1, CMake configuration files are supported. Since \QC 1.3, the
Microsoft tool chain is supported if the CMake version is at least 2.8.
\section1 Setting the Path for CMake
\QC automatically detects the CMake executable specified in the \c PATH.
You can add paths to other CMake executables and use them in different
build and run \l{glossary-buildandrun-kit}{kits}.
You can set the path for the CMake executable in \uicontrol Tools >
\uicontrol Options > \uicontrol {Build & Run} > \uicontrol CMake.
\section1 Adding CMake Tools
To specify paths to CMake executables, select \uicontrol Tools >
\uicontrol Options > \uicontrol {Build & Run} > \uicontrol CMake >
\uicontrol Add.
\image qtcreator-cmakeexecutable.png
\section1 Opening CMake Projects
\note Before you open a CMake project, you must modify the \c {PATH}
environment variable to include the bin folders of \c mingw and Qt.
......@@ -60,8 +67,6 @@
\section1 Opening CMake Projects
To open a CMake project:
\list 1
......@@ -103,6 +108,9 @@
\QC supports multiple build configurations. You can change the build
directory after the initial import.
The build and run kit that you select determines which CMake tool is used
for building. For more information, see \l {Adding Kits}.
\section1 Running CMake Projects
\QC automatically adds \uicontrol {Run Configurations} for all targets
......@@ -155,8 +155,8 @@
\image qtcreator-options-qbs.png
To add keys and values to a build profile that is associated with a build
and run kit:
You can modify a build profile that is associated with a build and run kit
by editing the values of the keys generated by \QC and by adding new values:
\list 1
......@@ -166,12 +166,21 @@
\li Select \uicontrol Edit to edit the profile associated with the kit.
\li Select \uicontrol Add to add keys and values to the profile.
Spefify keys as: \c <module_name>.<property_name>. Specify the
values as JSON literals.
\li Select \uicontrol Add to add keys and values to the profile or to
modify existing values.
\li In the \uicontrol Key column, spefify the key to add or modify as:
\c <module_name>.<property_name>.
\li In the \uicontrol Value column, specify a value as a JSON literal.
\li Click \uicontrol OK.
The values that you have modified are displayed in red in the
\uicontrol {Profile properties} field.
For a list of available keys and values, see the
\l{}{List of Modules} in the
Qbs Manual.
......@@ -114,6 +114,10 @@
the build step and add a custom build step that specifies another shell
To generate debug symbols also for applications compiled in release mode,
select the \uicontrol {Generate separate debug info} check box. For more
information, see \l{Using the CPU Usage Analyzer}.
\QC is integrated to \l{}
{Qt Quick Compiler} (commercial only) that enables you to compile QML source
code into the final binary. This
......@@ -88,6 +88,11 @@
\li \l{Specifying Dependencies}{Dependencies}
\li \l{Using Clang Static Analyzer}{Clang Static Analyzer Settings}
(commercial only)
\li \l{To-Do List}{To-Do Settings} (experimental)
Use the \uicontrol Build and \uicontrol Run buttons to switch between the build and
......@@ -114,6 +114,11 @@
configuration that should be used by qmake. If you leave this field
empty, the default mkspec of the selected Qt version is used.
\li In the \uicontrol {CMake Tool} field, select the CMake tool to use
for building the project. Select \uicontrol Manage to add installed
CMake tools to the list. For more information, see
\l{Adding CMake Tools}.
......@@ -469,7 +469,7 @@
\section2 Previewing Component Size
The width and height of the root item in a QML file determine the size of
the component. You can reuse component, such as buttons, in different
the component. You can reuse components, such as buttons, in different
sizes in other QML files and design screens for use with different device
profiles, screen resolution, or screen orientation. The component size
might also be zero (0,0) if its final size is determined by property
......@@ -39,7 +39,12 @@
\note GIMP does not support grouping, and therefore, each layer is exported
as an item in GIMP.
You can open the QML file in \QC for editing. If you edit the file in Adobe
You can open the QML file in \QC for editing. By default, the export scripts
generate Qt Quick 1 files. To edit the files in \QMLD, change the import
statements in the export scripts to import Qt Quick 2. Or, you can change
the import statement in each file after generating the files.
If you edit the file in Adobe
Photoshop and export it to the same directory again, any changes you made in
\QC are overwritten. However, you can re-export graphical assets without
recreating the QML code.
......@@ -114,13 +119,21 @@
\list 1
\li Download the export script, \e{Export QML.jx}, from
\li Clone the repository that contains the export script,
\e{Export QML.jx}, from
{Qt Code Review}.
\note Read the README.txt file in the repository for latest
information about the script.
\li To generate QML files that you can edit in \QMLD, edit the import
statement in \e {Export QML.jx}. For example:
qmlfile.write("import QtQuick 2.5\n");
\li Double-click the export script to add the export command to the
\uicontrol Scripts menu. You can also copy the script file to the Adobe
Photoshop scripts directory (typically, \c{\Presets\Scripts} in the
......@@ -160,21 +173,12 @@
The script has been tested to work on GIMP 2. You can download GIMP 2 from
\l{}{GIMP Downloads}.
To use the export script on Microsoft Windows, you also need to install the
GIMP Python extension (Python, PyCairo, PyGobject, PyGTK). However, GIMP is
not officially supported on Windows, so we cannot guarantee that this will
\list 1
\li On Microsoft Windows, you must first add Python support to your GIMP
installation, as instructed in
\l {}
{Tutorial: Installing Python for GIMP 2.6 (Windows)}.
\li Download the export script, \e, from
\li Clone the repository that contains the export script,
\e, from
{Qt Code Review}.
\note Read the INSTALL.txt in the repository for latest information
about the script.
......@@ -186,6 +190,13 @@
On Linux, run the following command: \c {chmod u+rx}
\li To generate QML files that you can edit in \QMLD, edit the import
statement in \e For example:
f.write('import QtQuick 2.5\n')
\li Restart GIMP to have the export command added to the \uicontrol File menu.
\li Choose \uicontrol {File > Export to QML} to export the design to a QML
function llvmConfig(qbs)
var File = loadExtension("qbs.File")
var MinimumLLVMVersion = "3.6.0"
function isSuitableLLVMConfig(llvmConfigCandidate, qtcFunctions, processOutputReader)
if (File.exists(llvmConfigCandidate)) {
var candidateVersion = version(llvmConfigCandidate, processOutputReader);
if (candidateVersion && candidateVersion.length)
return qtcFunctions.versionIsAtLeast(candidateVersion, MinimumLLVMVersion)
return false;
function llvmConfig(qbs, qtcFunctions, processOutputReader)
var llvmInstallDirFromEnv = qbs.getEnv("LLVM_INSTALL_DIR")
var llvmConfigVariants = [
......@@ -10,7 +23,7 @@ function llvmConfig(qbs)
if (llvmInstallDirFromEnv) {
for (var i = 0; i < llvmConfigVariants.length; ++i) {
var variant = llvmInstallDirFromEnv + "/bin/" + llvmConfigVariants[i];
if (File.exists(variant))
if (isSuitableLLVMConfig(variant, qtcFunctions, processOutputReader))
return variant;
......@@ -22,7 +35,7 @@ function llvmConfig(qbs)
for (var i = 0; i < llvmConfigVariants.length; ++i) {
for (var j = 0; j < pathList.length; ++j) {
var variant = pathList[j] + "/" + llvmConfigVariants[i];
if (File.exists(variant))
if (isSuitableLLVMConfig(variant, qtcFunctions, processOutputReader))
return variant;
......@@ -58,7 +58,6 @@ Project {
].concat(testsEnabled ? ["WITH_TESTS"] : [])
qbsSearchPaths: "qbs"
property bool enableQbsJavaSupport: false
references: [
......@@ -28,44 +28,35 @@
// Include qobjectdefs.h from Qt ...
#include_next <qobjectdefs.h>
#if defined(QT_NO_KEYWORDS)
# define QT_NO_EMIT
# define signals public __attribute__((annotate("qt_signal")))
# define slots __attribute__((annotate("qt_slot")))
# endif
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wmacro-redefined"
// ...and redefine macros for tagging signals/slots
#ifdef signals
# define signals public __attribute__((annotate("qt_signal")))
#ifdef slots
# define slots __attribute__((annotate("qt_slot")))
#ifdef Q_SIGNALS
# define Q_SIGNALS public __attribute__((annotate("qt_signal")))
#ifdef Q_SLOTS
# define Q_SLOTS slots __attribute__((annotate("qt_slot")))
#define Q_SIGNALS public __attribute__((annotate("qt_signal")))
#define Q_SLOTS slots __attribute__((annotate("qt_slot")))
#define Q_SIGNAL __attribute__((annotate("qt_signal")))
#define Q_SLOT __attribute__((annotate("qt_slot")))
#define Q_PRIVATE_SLOT(d, signature)
#define Q_EMIT
#ifndef QT_NO_EMIT
# define emit
#ifdef Q_SIGNAL
# define Q_SIGNAL __attribute__((annotate("qt_signal")))
#define Q_CLASSINFO(name, value)
#define Q_INTERFACES(x)
#define Q_PROPERTY(text)
#define Q_PRIVATE_PROPERTY(d, text)
#define Q_REVISION(v)
#define Q_OVERRIDE(text)
#define Q_ENUMS(x)
#define Q_FLAGS(x)
#define Q_ENUM(x)
#define Q_FLAG(x)
#define Q_GADGET \
public: \
static const QMetaObject staticMetaObject; \
#ifdef Q_SLOT
# define Q_SLOT __attribute__((annotate("qt_slot")))
#define SIGNAL(a) #a
#define SLOT(a) #a
#pragma clang diagnostic pop
......@@ -41,7 +41,7 @@ def qdump__boost__bimaps__bimap(d, value):
def qdump__boost__optional(d, value):
if int(value["m_initialized"]) == 0:
type = d.templateArgument(value.type, 0)
......@@ -46,8 +46,11 @@ def extractPointerType(d, value):
return readLiteral(d, value["_name"]) + postfix
if str(value.type.unqualified().target()) == "CPlusPlus::IntegerType":
typeName = str(value.type.unqualified().target())
if typeName == "CPlusPlus::IntegerType":
return "int" + postfix
elif typeName == "CPlusPlus::VoidType":
return "void" + postfix
return "<unsupported>"
def readTemplateName(d, value):
......@@ -129,8 +129,18 @@ Hex2EncodedFloat4, \
Hex2EncodedFloat8, \
IPv6AddressAndHexScopeId, \
Hex2EncodedUtf8WithoutQuotes, \
DateTimeInternal \
= range(30)
DateTimeInternal, \
SpecialEmptyValue, \
SpecialUninitializedValue, \
SpecialInvalidValue, \
SpecialNotAccessibleValue, \
SpecialItemCountValue, \
SpecialMinimumItemCountValue, \
SpecialNotCallableValue, \
SpecialNullReferenceValue, \
SpecialOptimizedOutValue, \
SpecialEmptyStructureValue, \
= range(40)
# Display modes. Keep that synchronized with DebuggerDisplay in watchutils.h
StopDisplay, \
......@@ -292,7 +302,7 @@ class Children:
if self.d.passExceptions:
showException("CHILDREN", exType, exValue, exTraceBack)
self.d.putValue("<not accessible>")
if not self.d.currentMaxNumChild is None:
if self.d.currentMaxNumChild < self.d.currentNumChild:
......@@ -692,7 +702,7 @@ class DumperBase:
with SubItem(self, name):
self.putValue("<not callable>")
def call(self, value, func, *args):
......@@ -816,9 +826,9 @@ class DumperBase:
def putItemCount(self, count, maximum = 1000000000):
# This needs to override the default value, so don't use 'put' directly.
if count > maximum:
self.putValue('<>%s items>' % maximum)
self.putSpeciaValue(SpecialMinimumItemCountValue, maximum)
self.putValue('<%s items>' % count)
self.putSpecialValue(SpecialItemCountValue, count)
def putField(self, name, value):
......@@ -837,6 +847,9 @@ class DumperBase:
if priority >= self.currentValue.priority:
self.currentValue = ReportItem(value, encoding, priority, elided)
def putSpecialValue(self, encoding, value = ""):
self.putValue(value, encoding)
def putEmptyValue(self, priority = -10):
if priority >= self.currentValue.priority:
self.currentValue = ReportItem("", None, priority, None)
......@@ -896,21 +909,28 @@ class DumperBase:
p = None
displayFormat = self.currentItemFormat()
n = int(arrayType.sizeof / ts)
arrayByteSize = arrayType.sizeof
if arrayByteSize == 0:
# This should not happen. But it does, see QTCREATORBUG-14755.
# GDB/GCC produce sizeof == 0 for QProcess arr[3]
s = str(value.type)
arrayByteSize = int(s[s.find('[')+1:s.find(']')]) * ts;
n = int(arrayByteSize / ts)
if displayFormat != RawFormat:
if innerTypeName == "char":
# Use Latin1 as default for char [].
blob = self.readMemory(self.addressOf(value), arrayType.sizeof)
blob = self.readMemory(self.addressOf(value), arrayByteSize)
self.putValue(blob, Hex2EncodedLatin1)
elif innerTypeName == "wchar_t":
blob = self.readMemory(self.addressOf(value), arrayType.sizeof)
blob = self.readMemory(self.addressOf(value), arrayByteSize)
if innerType.sizeof == 2:
self.putValue(blob, Hex4EncodedLittleEndian)
self.putValue(blob, Hex8EncodedLittleEndian)
elif p:
self.tryPutSimpleFormattedPointer(p, arrayType, innerTypeName, displayFormat, arrayType.sizeof)
self.tryPutSimpleFormattedPointer(p, arrayType, innerTypeName,
displayFormat, arrayByteSize)
if self.isExpanded():
......@@ -1413,7 +1433,7 @@ class DumperBase:
connections = connections.dereference()
connections = connections.cast(self.directBaseClass(connections.type))
self.putValue('<>0 items>')
self.putSpecialValue(SpecialMinimumItemCountValue, 0)
if self.isExpanded():
pp = 0
......@@ -465,7 +465,7 @@ class Dumper(DumperBase):
if self.passExceptions:
showException("SUBITEM", exType, exValue, exTraceBack)
self.putValue("<not accessible>")
if self.currentType.value:
typeName = self.stripClassTag(self.currentType.value)
......@@ -473,7 +473,8 @@ class Dumper(DumperBase):
self.put('type="%s",' % typeName) # str(type.unqualified()) ?
if self.currentValue.value is None:
self.put('value="<not accessible>",numchild="0",')
% SpecialNotAccessibleValue)
if not self.currentValue.encoding is None:
self.put('valueencoded="%d",' % self.currentValue.encoding)
......@@ -930,7 +931,7 @@ class Dumper(DumperBase):
if value is None:
# Happens for non-available watchers in gdb versions that
# need to use gdb.execute instead of gdb.parse_and_eval
self.putValue("<not available>")
......@@ -939,7 +940,7 @@ class Dumper(DumperBase):
typeName = str(typeobj)
if value.is_optimized_out:
self.putValue("<optimized out>")
......@@ -960,7 +961,7 @@ class Dumper(DumperBase):
# Try to recognize null references explicitly.
if toInteger(value.address) == 0:
self.putValue("<null reference>")
......@@ -988,7 +989,7 @@ class Dumper(DumperBase):
self.putBetterType("%s &" % self.currentType.value)
except RuntimeError:
self.putValue("<optimized out reference>")
......@@ -1069,7 +1070,7 @@ class Dumper(DumperBase):
# Anonymous union. We need a dummy name to distinguish
# multiple anonymous unions in the struct.
self.anonNumber += 1
with Children(self, 1):