Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • tohunger/qt-creator
1 result
Show changes
Commits on Source (796)
Showing
with 554 additions and 96 deletions
......@@ -29,6 +29,7 @@
.DS_Store
/.qmake.cache
/.qmake.stash
/.clang-format
Makefile*
Thumbs.db
core
......@@ -51,6 +52,7 @@ wrapper.sh
/src/app/Info.plist
/src/plugins/**/*.json
/src/plugins/coreplugin/ide_version.h
/src/libs/qt-breakpad/bin
app_version.h
phony.c
......
......@@ -242,14 +242,14 @@ http://llvm.org/docs/GettingStarted.html#git-mirror:
1. Clone LLVM and switch to a suitable branch
git clone http://llvm.org/git/llvm.git
git clone https://git.llvm.org/git/llvm.git/
cd llvm
git checkout release_39
2. Clone Clang into llvm/tools/clang and switch to a suitable branch
cd tools
git clone http://llvm.org/git/clang.git
git clone https://git.llvm.org/git/clang.git/
cd clang
git checkout release_39
......
Qt Creator version 4.5 contains bug fixes and new features.
The most important changes are listed in this document. For a complete
list of changes, see the Git log for the Qt Creator sources that
you can check out from the public Git repository. For example:
git clone git://code.qt.io/qt-creator/qt-creator.git
git log --cherry-pick --pretty=oneline origin/4.4..v4.5.0
General
* Implemented "fuzzy" camel case lookup similar to code completion for locator
(QTCREATORBUG-3111)
* Changed `File System` pane to tree view with top level directory selectable
from `Computer`, `Home`, `Projects`, and individual project root directories
(QTCREATORBUG-8305)
Editing
* Added shortcut for sorting selected lines
All Projects
* Added progress indicator to project tree while project is parsed
* Added support for changing the maximum number of lines shown in compile output
(QTCREATORBUG-2200)
CMake Projects
* Added groups to CMake configuration UI
* Added option to change configuration variable types
* Fixed that value was removed when renaming configuration variable
(QTCREATORBUG-17926)
C++ Support
* Fixed lookup of functions that differ only in const-ness of arguments
(QTCREATORBUG-18475)
* Fixed detection of macros defined by tool chain for `C`
* Fixed that `Refactoring` context menu blocked UI while checking for available
actions
* Clang Code Model
* Added sanity check to `Clang Code Model Warnings` option
(QTCREATORBUG-18864)
* Fixed completion in `std::make_unique` and `std::make_shared` constructors
(QTCREATORBUG-18615)
* Fixed that function argument completion switched selected overload back to
default after typing comma (QTCREATORBUG-11688)
* GCC
* Improved auto-detection to include versioned binaries and cross-compilers
QML Support
* Added wizards with different starting UI layouts
Python Support
* Added simple code folding
Debugging
* Changed pretty printing of `QFlags` and bitfields to hexadecimal
* Fixed `Run in terminal` for debugging external application
(QTCREATORBUG-18912)
* LLDB / macOS
* Added pretty printing of Core Foundation and Foundation string-like types
(QTCREATORBUG-18638)
QML Profiler
* Improved robustness when faced with invalid data
Qt Quick Designer
* Added option to only show visible items in navigator
Version Control Systems
* Added query for saving modified files before opening commit editor
(QTCREATORBUG-3857)
Beautifier
* Clang Format
* Added action `Disable Formatting for Selected Text`
* Changed formatting without selection to format the syntactic entity
around the cursor
Model Editor
* Added support for custom relations
SCXML Editor
* Fixed crash after warnings are removed
Platform Specific
Windows
* Fixed that environment variable keys were converted to upper case in build
and run configurations (QTCREATORBUG-18915)
macOS
* Fixed several issues when using case sensitive file systems while `File system
case sensitivity` is set to `Case Insensitive` (QTCREATORBUG-17929,
QTCREATORBUG-18672, QTCREATORBUG-18678)
Android
* Removed support for local deployment (QTBUG-62995)
* Removed support for Ant
* Improved checks for minimum requirements of Android tools (QTCREATORBUG-18837)
Universal Windows Platform
* Fixed deployment on Windows 10 Phone emulator
Credits for these changes go to:
Alessandro Portale
Alexander Volkov
Andre Hartmann
André Pönitz
Christian Kandeler
Christian Stenger
Claus Steuer
Daniel Trevitz
David Schulz
Eike Ziller
Friedemann Kleint
Ivan Donchevskii
Jake Petroules
Jaroslaw Kobus
Jochen Becher
Knud Dollereder
Laurent Montel
Marco Benelli
Marco Bubke
Mitch Curtis
Nikita Baryshnikov
Nikolai Kosjar
Oliver Wolff
Orgad Shaneh
Robert Löhning
Ryuji Kakemizu
Samuel Gaist
Serhii Moroz
Thiago Macieira
Thomas Hartmann
Tim Jenssen
Tobias Hunger
Ulf Hermann
Vikas Pachdha
# .clang-format for Qt Creator
#
# This is for clang-format >= 5.0.
#
# The configuration below follows the Qt Creator Coding Rules [1] as closely as
# possible. For documentation of the options, see [2].
#
# Use ../../tests/manual/clang-format-for-qtc/test.cpp for documenting problems
# or testing changes.
#
# [1] https://doc-snapshots.qt.io/qtcreator-extending/coding-style.html
# [2] https://clang.llvm.org/docs/ClangFormatStyleOptions.html
#
---
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: DontAlign
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterClass: true
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: true
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeBinaryOperators: All
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeComma
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: false
ColumnLimit: 100
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- forever # avoids { wrapped to next line
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeCategories:
- Regex: '^<Q.*'
Priority: 200
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: false
IndentWidth: 4
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
# Do not add QT_BEGIN_NAMESPACE/QT_END_NAMESPACE as this will indent lines in between.
MacroBlockBegin: ""
MacroBlockEnd: ""
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 150
PenaltyBreakBeforeFirstCallParameter: 300
PenaltyBreakComment: 500
PenaltyBreakFirstLessLess: 400
PenaltyBreakString: 600
PenaltyExcessCharacter: 50
PenaltyReturnTypeOnItsOwnLine: 300
PointerAlignment: Right
ReflowComments: false
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: true
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 4
UseTab: Never
# .clang-format for Qt Creator
Alongside this file you find an EXPERIMENTAL .clang-format configuration file
for the Qt Creator code base.
The current configuration is useful, but not fully in accordance with the
coding rules. There is also other undesired formatting. Running clang-format
blindly will not only improve formatting here and there, but will also
normalize/worsen code that is already considered ideally formatted. See section
"Coding rules violated by clang-format" below for more information.
If needed, clang-format can be instructed to not format code ranges. Do not
overuse this.
// clang-format off
void unformatted_code ;
// clang-format on
For more information about clang-format, see
<https://clang.llvm.org/docs/ClangFormat.html>
## Prerequisites
* clang-format >= 5.0
## Set up Qt Creator for use with clang-format
### Install the configuration file
For a given source file to format, clang-format it will read the configuration
from .clang-format in the closest parent directory for the file to format.
Hence symlink/copy .clang-format from this directory to e.g. Qt Creator's top
level directory:
For Linux/macOS:
$ cd $QTC_SOURCE
$ ln -s dist/clangformat/.clang-format
For Windows:
$ cd $QTC_SOURCE
$ copy dist\clangformat\.clang-format # Do not forget to keep this updated
### Configure Qt Creator
1. Enable the Beautifier plugin and restart to load it.
2. Configure the plugin:
In Menu: Tools > Options > Beautifier > Tab: Clang Format
* Select a valid clang-format executable
* Use predefined style: File
* Fallback style: None
3. Set shortcuts for convenience:
In Menu: Tools > Options > Environment > Keyboard
* ClangFormat / FormatFile - e.g. Alt+C, F
* ClangFormat / FormatAtCursor - e.g. Alt+C, C
* ClangFormat / DisableFormattingSelectedText - e.g. Alt+C, D
Due to several issues outlined below the FormatFile action might be of limited
use.
## Coding rules enforced by clang-format
This is a copy-pasted list of coding rules from
<https://doc-snapshots.qt.io/qtcreator-extending/coding-style.html> that can be
enforced with the current configuration:
* Formatting
* Whitespace
* Use four spaces for indentation, no tabs.
* Always use only one blank line (to group statements together)
* Pointers and References: For pointers or references, always use a single
space before an asterisk (*) or an ampersand (&), but never after.
* Operator Names and Parentheses: Do not use spaces between operator names
and parentheses.
* Function Names and Parentheses: Do not use spaces between function names
and parentheses.
* Keywords: Always use a single space after a keyword, and before a curly
brace.
* Braces
* As a base rule, place the left curly brace on the same line as the start
of the statement.
* Exception: Function implementations and class declarations always have
the left brace in the beginning of a line
* Line Breaks
* Keep lines shorter than 100 characters
* Insert line breaks if necessary.
* Commas go at the end of a broken line.
* Operators start at the beginning of the new line.
* Namespaces:
* Put the left curly brace on the same line as the namespace keyword.
* Do not indent declarations or definitions inside.
* Optional, but recommended if the namespaces spans more than a few lines:
Add a comment after the right curly brace repeating the namespace.
* Patterns and Practices
* C++11 and C++14 Features / Lambdas:
* Optionally, place the lambda completely on one line if it fits.
* Place a closing parenthesis and semicolon of an enclosing function call
on the same line as the closing brace of the lambda.
## Coding rules violated by clang-format
* Formatting / Namespaces
* As an exception, if there is only a single class declaration inside the
namespace, all can go on a single line. Currently this ends up on several
lines, which is noisy.
* Patterns and Practices / C++11 and C++14 Features / Lambdas
* If you are using a lambda in an 'if' statement, start the lambda on a new
line.
### Other undesired formattings
For a more complete list of observations and problems, see the "// NOTE: "
comments in ../../tests/manual/clang-format-for-qtc/test.cpp.
#### Manually aligned complex expressions in e.g. if-conditions are collapsed
We want:
if (someFancyAndLongerExpression1
|| someFancyAndLongerExpression2
|| someFancyAndLongerExpression3) {
return value;
}
Current:
if (someFancyAndLongerExpression1 || someFancyAndLongerExpression2
|| someFancyAndLongerExpression3) {
return value;
}
#### connect() calls do not follow the standard two-line pattern
In general, for middle-sized and longer connect() calls we want to follow this
two-line pattern.
connect(sender, &SomeFancySender::signal,
receiver, &SomeFancyReceiver::slot);
Current:
connect(sender,
&SomeFancySender::signal,
receiver,
&SomeFancySender::slot);
#### QTC_ASSERT and excess space after return keyword
For QTC_ASSERT in combination with the return keyword, an excess space is added:
QTC_ASSERT(headItem, return );
doc/images/qtcreator-options-android1.png

27.7 KiB | W: 0px | H: 0px

doc/images/qtcreator-options-android1.png

51.9 KiB | W: 0px | H: 0px

doc/images/qtcreator-options-android1.png
doc/images/qtcreator-options-android1.png
doc/images/qtcreator-options-android1.png
doc/images/qtcreator-options-android1.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -59,12 +59,11 @@
\li \l{http://www.gradle.org}{Gradle} for building application packages
for Android devices (APK). Gradle is delivered with Qt 5.9, and
later.
later. Because Gradle scripts are not delivered with Android SDK
Tools since version 26.0.0, they are delivered with Qt 5.9 and
5.6.3.
\note Using Ant to build APKs is still possible when developing with
Qt 5.8 or earlier together with Android SDK tools versions 25.2.5 or
earlier, but Ant support has been deprecated since \QC 4.3 and will
be removed in a future version.
\note Using Ant to build APKs is no longer supported.
\li A tool chain for building applications for Android devices provided
by the \l{http://developer.android.com/tools/sdk/ndk/index.html}
......@@ -151,21 +150,6 @@
check box to allow \QC to create the kits for you. \QC displays a
warning if it cannot find a suitable Qt version.
\li Select the tool to use for building application packages:
\list
\li To use Gradle, select the \uicontrol {Use Gradle instead of Ant}
check box.
\li To use Ant, add the path to the Ant executable in the
\uicontrol {Ant executable} field.
\note Ant support has been deprecated since \QC 4.3. We
recommend that you use Gradle instead.
\endlist
\li Select \uicontrol File > \uicontrol {New File or Project} > \uicontrol Application >
\uicontrol {Qt Quick Application} > \uicontrol Choose, and
follow the instructions of the wizard. For more information, see
......
......@@ -58,13 +58,6 @@
For more information about options that you have for running applications,
see \l {Specifying Run Settings for Android Devices}.
\section1 Creating Distributable APK Packages
To copy Qt libraries and files to the project directory and to bundle them
as part of the APK, select the \uicontrol {Bundle Qt libraries in APK} option.
\note Android 5 devices support only this option.
\section1 Using Ministro to Install Qt Libraries
To minimize the size of your APK, you can package the application with an
......@@ -82,22 +75,6 @@
To use Ministro to install the Qt libraries, select the
\uicontrol {Use Ministro service to install Qt} option.
\section1 Deploying Qt Libraries for Debugging
To test your application on a device that is physically connected to the
development host (or on an emulator), you can copy the Qt libraries into a
temporary directory on your device and run the application against them.
An APK built in this way is not distributable, since it relies on the device
containing the Qt libraries in the correct location. However, as the Qt
libraries are only copied into the device once, this method provides a fast
turn-around time, and is therefore convenient for testing the application
during development.
Select the \uicontrol {Deploy local Qt libraries to temporary directory} option to
deploy Qt libraries to the \c{/data/local/tmp/qt} folder on the device and
to run the application against them.
\section1 Packaging Applications
Because bundling applications as APK packages is not
......
......@@ -1537,6 +1537,10 @@
\l{http://www.avira.com/en/support-for-business-knowledgebase-detail/kbid/805}
{Restricted Usability of IDE/Debuggers since 2010-12-08}.
On some devices, such as Wacom Tablets, running processes might stop the
debugger from launching. Stop all running processes and then relaunch the
debugger.
\section1 Debugger Does Not Hit Breakpoints
You might have created a release build that does not contain debug
......
......@@ -174,7 +174,13 @@
\endlist
In addition to the \uicontrol {Format Current File} command, ClangFormat
and Uncrustify provide the \uicontrol {Format Selected Text} command. If you
and Uncrustify provide additional commands.
ClangFormat provides the \uicontrol {Format at Cursor} command. If you
select it when no text is selected, the syntactic entity under the cursor
is formatted. The \uicontrol {Disable Formatting for Selected Text} command
wraps selected lines within \c {// clang-format off} and
\c {// clang-format on}.
Uncrustify provides the \uicontrol {Format Selected Text} command. If you
select it when no text is selected, the whole file is formatted by default.
To disable this behavior, deselect the
\uicontrol {Format entire file if no text was selected} check box.
......
......@@ -133,8 +133,8 @@
language files if you develop mainly using C, select the
\uicontrol {Interpret ambiguous headers as C headers} check box.
\li To process pre-compiled headers, deselect the
\uicontrol {Ignore pre-compiled headers} check box.
\li To process precompiled headers, deselect the
\uicontrol {Ignore precompiled headers} check box.
\li To avoid out-of-memory crashes caused by indexing huge source files
that are typically auto-generated by scripts or code, the size of
......
......@@ -71,10 +71,16 @@
\endlist
You can group elements by surrounding them with a boundary. When you move
the boundary, all elements within it are moved together. Similarly, classes
that you lay on packages are moved with the packages. You can move
individual elements and modify their properties (5) by selecting them. You
can also use \e multiselection to group elements temporarily.
the boundary, all elements within it are moved together. Similary drag
a swimlane to the diagram. When you move the swimlane all elements right
to the swimlane (for vertical swimlanes) or below it (for horizontal swimlanes)
will be moved together. A vertical swimlane is created when you drop the
swimlane icon on the top border of the diagram and a horizontal swimlane
is created when you drop the icon near the left border.
Classes or other objects that you lay on packages are moved with the packages.
You can move individual elements and modify their properties (5) by selecting
them. You can also use \e multiselection to group elements temporarily.
Drag the mouse over elements to select them and apply actions such as
changing their \e stereotype or color. A stereotype is a classifier for
......@@ -399,7 +405,9 @@
For more information about the available options, see \e standard.def
in the \e share/qtcreator/modeleditor directory in the \QC installation
directory.
directory. It describes also how to define custom relation types
and templates for existing types (such as a composition relation that
can be drawn between classes).
You can add your own definition file and save it with the file extension
\e .def to add custom colors and icons for stereotypes, elements, or tool
......
......@@ -201,7 +201,7 @@
If a test takes more than a minute to execute, the default timeout might
stop the test execution. To increase the timeout, select \uicontrol Tools >
\uicontrol Options > \uicontrol {Test Settings} > \uicontrol General.
\uicontrol Options > \uicontrol {Testing} > \uicontrol General.
\section2 Selecting Tests to Run
......@@ -220,7 +220,7 @@
You can add filters to specify the directories within the current project
to scan for tests. Select \uicontrol Tools > \uicontrol Options >
\uicontrol {Test Settings} > \uicontrol General > \uicontrol Add, and
\uicontrol {Testing} > \uicontrol General > \uicontrol Add, and
specify paths to the directories to scan for tests. Wildcards are not
supported in the filter expressions.
......@@ -242,7 +242,7 @@
several times in order to get an accurate measurement. This depends on the
measurement back-end that you can select in the
\uicontrol {Benchmark Metrics} group in \uicontrol Tools >
\uicontrol Options > \uicontrol {Test Settings} > \uicontrol {Qt Test}:
\uicontrol Options > \uicontrol {Testing} > \uicontrol {Qt Test}:
walltime, CPU tick counter, event counter, Valgrind Callgrind, and Linux
Perf. For more information, see \l{Creating a Benchmark}.
......@@ -260,7 +260,7 @@
\section2 Specifying Settings for Running Google Tests
To specify settings for running Google tests, select \uicontrol Tools >
\uicontrol Options > \uicontrol {Test Settings} > \uicontrol {Google Test}.
\uicontrol Options > \uicontrol {Testing} > \uicontrol {Google Test}.
\image qtcreator-autotests-options-google.png
......@@ -286,7 +286,7 @@
can be parsed, which might lead to information loss. The lost information
might be retrievable when viewing the results as plain text.
To view the results of Qt tests as plain text, select \uicontrol Tools >
\uicontrol Options > \uicontrol {Test Settings} > \uicontrol {Qt Test}, and
\uicontrol Options > \uicontrol {Testing} > \uicontrol {Qt Test}, and
then deselect the \uicontrol {Use XML output} check box. Then select the
\inlineimage text.png
(\uicontrol {Switch Between Visual and Text Display}) button in the
......@@ -356,7 +356,7 @@
By default, test result output is limited to 100,000 characters. The output
pane is automatically scrolled down when new results are added. To display
full results, select \uicontrol Tools > \uicontrol Options >
\uicontrol {Test Settings} > \uicontrol General, and then deselect the
\uicontrol {Testing} > \uicontrol General, and then deselect the
\uicontrol {Limit result output} check box. To disable automatic scrolling,
deselect the \uicontrol {Automatically scroll results} check box.
......
......@@ -82,6 +82,9 @@
\endlist
\note If you installed \QC on \macos, you can find the wizards in
\c {Qt Creator.app/Contents/Resources/templates/wizards}.
\section1 Tips for Wizard Development
\QC has some actions that can improve the wizard development process. These
......
......@@ -53,10 +53,10 @@
set up the development environment for the device platform and configure a
connection between \QC and the mobile device.
To develop for Android devices, you must download and install
the latest Android NDK and SDK, and update the SDK to get the API and tools
needed for development. In addition, you must install the
Java SE Development Kit (JDK) and Apache Ant. After you have installed all
To develop for Android devices, you must download and install the latest
Android NDK and SDK Tools, and then update or install the tools and packages
needed for development. In addition, you must install the Java SE
Development Kit (JDK). After you have installed all
these tools, you must specify the paths to them in \QC.
For detailed instructions, see \l{Qt for Android} and
\l{Connecting Android Devices}.
......
......@@ -42,7 +42,47 @@
the contained components, and therefore, the modules must provide extra type
information for code completion and the semantic checks to work correctly.
When you write a QML module or use QML from a C++ application you typically
To create a QML module and make it appear in the \uicontrol Library in
\QMLD:
\list 1
\li Create custom QML controls and place all the \c .qml files in a
directory dedicated to your module.
\li Create a \c qmldir file for your module and place it in the module
directory. For more information, see
\l {Module Definition qmldir Files}.
\li Create a \c qmltypes file, preferably using \c qmlplugindump.
For more information see, \l {Generating qmltypes Files}.
\li Create a directory named \c designer in your module directory.
\li Create a \c .metainfo file for your module and place it in the
\c designer directory. Meta information is needed to display the
components in the \uicontrol {QML Types} tab in the \uicontrol
Library. Use a metainfo file delivered with Qt, such as
\c qtquickcontrols2.metainfo, as an example.
\li Import your module into a project using \c QML_IMPORT_PATH in the
.pro file: \c {QML_IMPORT_PATH += path/to/module}.
For more information, see \l {Importing QML Modules}.
\li Make sure that the QML emulation layer of \QMLD is built with
the same Qt version as your QML modules. For more information, see
\l {Running QML Modules in Qt Quick Designer}. You can also try
skipping this step and take it later, if necessary.
\endlist
Your module should now appear in the \uicontrol Imports tab in the
\uicontrol Library in \QMLD. Your components should appear in the
\uicontrol {QML Types} tab if a valid \c .metainfo file is in place.
\section1 Registering QML Types
When you write a QML module or use QML from a C++ application, you typically
register new types with the qmlRegisterType() function or expose some
class instances with \l{QQmlContext::setContextProperty()}. The \QC C++
code model now scans for these calls and
......@@ -55,19 +95,7 @@
Classes registered with \c qmlRegisterType() can be used as backend objects
in the \QMLD. For more information, see \l {Adding Connections}.
By default, \QC will look in the QML import path of Qt for QML modules.
If your applications adds additional import paths that \QC should use,
then you can specify those using \c{QML_IMPORT_PATH} in the \c{.pro} file of your
application.
If you use CMake, add the following command to the CMakeLists.txt file to
set the QML import path:
\code
{set(QML_IMPORT_PATH ${CMAKE_SOURCE_DIR}/qml ${CMAKE_BINARY_DIR}/imports CACHE string "" FORCE)}
\endcode
The import path affects all the targets built by the CMake project.
\section1 Generating qmltypes Files
Ideally, QML modules have a \c{plugins.qmltypes} file in the same directory
as the \c qmldir file. The \c qmltypes file contains a description of the
......@@ -79,20 +107,18 @@
addition to \c{plugins.qmltypes}. For more information, see
\l{Writing a qmltypes File}.
\section1 Generating qmltypes Files
You can create and edit \c qmltypes files manually, but you are recommended
to use the \c qmlplugindump tool shipped with Qt 4.8 and later to generate
them automatically.
Once you have obtained qmlplugindump for the Qt version the QML module's
Once you have obtained \c qmlplugindump for the Qt version the QML module's
plugins were compiled with, run the following command to load My.Module
version 1.0 from \c{/import/path/my/module} including all its plugins and
output a description of the plugins' types to
\c{/import/path/my/module/plugins.qmltypes}:
\code
qmlplugindump My.Module 1.0 /import/path > /import/path/my/module/plugins.qmltypes
qmlplugindump -nonrelocatable My.Module 1.0 /import/path > /import/path/my/module/plugins.qmltypes
\endcode
You can safely ignore the debug output.
......@@ -101,13 +127,29 @@
the sources in \c{<QtCreator>/share/qtcreator/qml/qmldump} if the Qt version
contains private headers.
\section1 Dumping Plugins Automatically
\section2 Dumping Plugins Automatically
If a module with plugins lacks the \c qmltypes file, \QC tries to generate
a temporary file itself by running the \c qmldump program in the background.
However, this automatic dumping is a fallback mechanism with many points of
failure and you cannot rely upon it.
\section1 Importing QML Modules
By default, \QC will look in the QML import path of Qt for QML modules.
If your applications adds additional import paths that \QC should use,
then you can specify those using \c{QML_IMPORT_PATH} in the \c{.pro} file of your
application.
If you use CMake, add the following command to the CMakeLists.txt file to
set the QML import path:
\code
{set(QML_IMPORT_PATH ${CMAKE_SOURCE_DIR}/qml ${CMAKE_BINARY_DIR}/imports CACHE string "" FORCE)}
\endcode
The import path affects all the targets built by the CMake project.
\section1 Running QML Modules in Qt Quick Designer
\QMLD uses a QML emulation layer (also called QML Puppet) to render and
......
......@@ -15,7 +15,11 @@ QtcProduct {
project.buildDirectory + '/' + qtc.ide_library_path,
project.buildDirectory + '/' + qtc.ide_plugin_path
]
cpp.defines: base.filter(function(d) { return d != "QT_RESTRICTED_CAST_FROM_ASCII"; })
cpp.defines: base.filter(function(d) {
return d !== "QT_RESTRICTED_CAST_FROM_ASCII"
&& d !== "QT_USE_FAST_OPERATOR_PLUS"
&& d !== "QT_USE_FAST_CONCATENATION";
})
Group {
fileTagsFilter: product.type
......
var Environment = loadExtension("qbs.Environment")
var File = loadExtension("qbs.File")
var FileInfo = loadExtension("qbs.FileInfo")
var MinimumLLVMVersion = "3.9.0"
var Process = loadExtension("qbs.Process")
var Environment = require("qbs.Environment")
var File = require("qbs.File")
var FileInfo = require("qbs.FileInfo")
var MinimumLLVMVersion = "3.9.0" // CLANG-UPGRADE-CHECK: Adapt minimum version numbers.
var Process = require("qbs.Process")
function readOutput(executable, args)
{
......
var File = loadExtension("qbs.File");
var FileInfo = loadExtension("qbs.FileInfo");
var TextFile = loadExtension("qbs.TextFile");
var File = require("qbs.File");
var FileInfo = require("qbs.FileInfo");
var TextFile = require("qbs.TextFile");
function getExportBlock(productFile)
{
......
......@@ -4,16 +4,16 @@ import qbs.FileInfo
import "qtc.js" as HelperFunctions
Module {
property string qtcreator_display_version: '4.4.1'
property string qtcreator_display_version: '4.6.0-beta1'
property string ide_version_major: '4'
property string ide_version_minor: '4'
property string ide_version_release: '1'
property string ide_version_minor: '5'
property string ide_version_release: '82'
property string qtcreator_version: ide_version_major + '.' + ide_version_minor + '.'
+ ide_version_release
property string ide_compat_version_major: '4'
property string ide_compat_version_minor: '4'
property string ide_compat_version_release: '0'
property string ide_compat_version_minor: '5'
property string ide_compat_version_release: '82'
property string qtcreator_compat_version: ide_compat_version_major + '.'
+ ide_compat_version_minor + '.' + ide_compat_version_release
......@@ -76,6 +76,8 @@ Module {
"QT_NO_CAST_TO_ASCII",
"QT_RESTRICTED_CAST_FROM_ASCII",
"QT_DISABLE_DEPRECATED_BEFORE=0x050600",
"QT_USE_FAST_OPERATOR_PLUS",
"QT_USE_FAST_CONCATENATION",
].concat(testsEnabled ? ["WITH_TESTS"] : [])
Rule {
......