Commit 8eb83681 authored by Eike Ziller's avatar Eike Ziller

Merge remote-tracking branch 'origin/2.4'

Conflicts:
	qtcreator.pri
	src/libs/qmljs/qmljstypedescriptionreader.cpp
	tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter.cpp

Change-Id: Id032187023bb42f259a87545ceeb3c965dd01a32
parents 4ea9c219 a9eb8803
......@@ -2,6 +2,7 @@
# ----------------------------------------------------------------------------
*~
*.autosave
*.a
*.core
*.moc
......
......@@ -8,10 +8,17 @@ git clone git://gitorious.org/qt-creator/qt-creator.git
git log --cherry-pick --pretty=oneline v2.3.1...origin/2.4
General
* Showing more useful error dialog in case of plugin errors
* Reduce minimum size of preferences dialog
Editing
* Advanced search: Show more information about the search parameters
* Advanced search: Move the previously modal dialog into search results pane
* Advanced search: Keep a history of most recent searches and their results
* Code Style schemas implemented, you can reuse them in different projects now
Managing Projects
* Shared project settings support
Debugging
......@@ -21,20 +28,62 @@ Analyzing Code
* Standalone qmlprofiler command line tool allows you to retrieve & store QML tracing data
C++ Support
* Add quick fix to synchronize function declarations and definitions
* Make 'insert definition from declaration' use minimally qualified names
and find a good insertion location next to surrounding declarations
* Fix completion for typedefs for templates in namespaces
* Use minimally qualified names in function signature completion
* Use minimally qualified names in 'insert local declaration' quick fix
* When switching between header/source, prefer files in the same directory
* Fix problem with encoding and quick fixes (QTCREATORBUG-6140)
* Fix preservation of indentation level in comments with tabs (QTCREATORBUG-6151)
* Improve performance for files with a huge number of literals
QML/JS Support
* Add 'Rename usages' functionality (QTCREATORBUG-3669)
* Add collection of static analysis messages with Ctrl-Shift-C
* Add semantic highlighting
* Significantly improve scanning of C++ documents for qmlRegisterType and
setContextProperty calls (QTCREATORBUG-3199)
* Add warning about inappropriate use of constructor functions
* Add warning about unreachable code
* Add support for .import directive in js files
* Add completion for XMLHttpRequest, DB API and JSON.
* Add 'length' property to functions
* Use mime types to distinguish qml and js files
* Show the function argument hint for signals
* When completing enums, add qualified names instead of strings
* Honor typeinfo lines in qmldir files
* Make string literals that contain file names into links (QTCREATORBUG-5701)
* Add warning about invalid types in 'property' declarations (QTCREATORBUG-3666)
* Fix highlighting of property types (QTCREATORBUG-6127)
* Fix 'follow symbol' for local variables (QTCREATORBUG-6094)
* Fix function argument hints on variables (QTCREATORBUG-5752)
* Fix completion for enums in a different scope
* Fix typing '/' triggering a global completion
* Fix handling of meta object revision in C++ QML plugins
* Fix indentation of block property initializers
* Fix indentation of labelled statements
* Fix scope for completion in code bindings
* Allow for different builtin type information per Qt version
* Update builtin type information and parser for Qt 5
Qt Quick Designer
* Adding breadcrumb navigation for components
* Adding layout functionality to context menu.
Help
Platform Specific
Mac
* "Run in Terminal" was not finding xterm by default
Linux (GNOME and KDE)
Windows
* Aborting the build now works properly. Qt Creator sends Ctrl-C to the
build process via the process_ctrlc_stub helper program.
Symbian Target
......
doc/images/qtcreator-build-issues.png

21.3 KB | W: | H:

doc/images/qtcreator-build-issues.png

10.7 KB | W: | H:

doc/images/qtcreator-build-issues.png
doc/images/qtcreator-build-issues.png
doc/images/qtcreator-build-issues.png
doc/images/qtcreator-build-issues.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -211,7 +211,8 @@
\title Semantic Highlighting
\QC understands the C++ and QML languages as code, not as plain text.
\QC understands the C++, QML, and JavaScript languages as code, not as plain
text.
It reads the source code, analyzes it, and highlights it based on the
semantic checks that it does for the following code elements:
......@@ -231,7 +232,7 @@
\gui {Tools > Options > Text Editor > Fonts & Color}.
\QC supports syntax highlighting also for other types of files than
C++ or QML.
C++, QML, or JavaScript.
\section1 Generic Highlighting
......@@ -346,6 +347,41 @@
\endlist
\section1 Checking JavaScript Syntax
You can run static checks on JavaScript to find common problems, such as:
\list
\o Duplicate or conflicting variable, function, and formal parameter
declarations
\o Variables and functions that are used before they are declared
\o Possibly unsafe uses of the == or != operators
\o Comma expressions, except in \c for statements
\o Expression statements, except function or method calls, assignments,
or \c delete
\o Assignments within conditions (such as, \c {if (a = b)})
\o Case blocks within a switch that do not end with a return, break,
continue, or throw and that are not empty
\o Nested block statements
\o \c with statements
\o \c void expressions
\endlist
To run the checks, select \gui {Tools > QML/JS > Run Checks} or press
\key Ctrl+Shift+C. The results are shown in the \gui {QML Analysis}
filter of the \gui {Issues} output pane.
*/
......@@ -1122,17 +1158,19 @@
\section1 Finding Symbols
To find the use of a specific symbol in your Qt C++ or Qt Quick project:
To find the use of a specific symbol or \l{glossary-component}
{QML component} in your Qt C++ or Qt Quick project:
\list 1
\o In the editor, place the cursor on the symbol, and select:
\o In the editor, place the cursor on the symbol or component, and
select:
\list
\o \gui {Tools > C++ > Find Usages}
\o \gui {Tools > QML > Find Usages}
\o \gui {Tools > QML/JS > Find Usages}
\o \key Ctrl+Shift+U
......
......@@ -149,7 +149,7 @@
\o Switch to \gui Help mode
\o Ctrl+6
\row
\o Toggle \gui{Build Issues} pane
\o Toggle \gui{Issues} pane
\o Alt+1 (Cmd+1 on Mac OS X)
\row
\o Toggle \gui{Search Results} pane
......@@ -350,6 +350,9 @@
\row
\o Turn selected text into uppercase
\o Alt+Shift+U
\row
\o Run static checks on JavaScript code to find common problems
\o Ctrl+Shift+C
\endtable
\section2 Debugging Keyboard Shortcuts
......
......@@ -31,7 +31,7 @@
\page creator-task-lists.html
\nextpage creator-cli.html
\title Showing Task List Files in the Build Issues Pane
\title Showing Task List Files in Issues Pane
Code scanning and analysis tools create report files in ASCII format.
Usually, the report files consist of lines that contain a file name, a line
......@@ -40,7 +40,7 @@
manually navigating to them and correcting them, which is tedious.
\QC makes this very easy by providing a way to load these files into
the \gui{Build Issues} pane. You can navigate to the corresponding source
the \gui{Issues} pane. You can navigate to the corresponding source
code by clicking the error message. But first you must convert the files to
the \l{Task List File Format} by using conversion scripts that based on
standard text processing tools of the operating system.
......
......@@ -92,7 +92,7 @@
\list
\o \gui{Build Issues} pane Alt+1 (Cmd+1 on Mac OS X)
\o \gui{Issues} pane Alt+1 (Cmd+1 on Mac OS X)
\o \gui{Search Results} pane Alt+2 (Cmd+2 on Mac OS X)
......
......@@ -230,7 +230,7 @@
\list
\o \gui{Build Issues}
\o \gui{Issues}
\o \gui{Search Results}
......@@ -256,26 +256,45 @@
To open the \gui{General Messages} and \gui{Version Control} panes, select
\gui {Window > Output Panes}.
\section2 Build Issues
\section2 Issues
The \gui{Build Issues} pane provides a list of errors and warnings
encountered during a build. The pane filters out irrelevant output from
the build tools and presents the issues in an organized way.
The \gui{Issues} pane provides lists of following types of issues:
Right-clicking on a line brings up a context menu with options to copy
the contents and to show a version control annotation view of the line
that causes the error message.
\list
\image qtcreator-build-issues.png
\o \gui Analyzer - Errors encountered while running the
\l{Analyzing Code}{Valgrind code analysis tools}.
\o \gui {Build System} - Errors and warnings encountered during a
build.
\o \gui Compile - Selected output from the compiler. Open the
\gui {Compile Output} pane for more detailed information.
\o \gui {My Tasks} - Entries from a task list file (.tasks) generated
by \l{Showing Task List Files in Issues Pane}
{code scanning and analysis tools}.
\o \gui QML - Errors in QML syntax.
To view task lists in the \gui{Build Issues} pane, click
\o \gui {QML Analysis} - Results of the JavaScript
\l{Checking JavaScript Syntax}{code syntax and validation checks}
\endlist
The pane filters out irrelevant output from the build tools and presents the
issues in an organized way. To further filter the output by type, select
\inlineimage qtcreator-filter.png
and select \gui{My Tasks}. Entries from a task list file (.tasks) are
imported to the pane. Press \key F6 and \key Shift+F6 to jump from one issue
to the next.
and then select a filter.
\image qtcreator-build-issues.png
Right-clicking on a line brings up a context menu with options to copy
the contents and to show a version control annotation view of the line
that causes the error message.
For more information about creating task files, see
\l{Showing Task List Files in the Build Issues Pane}.
To jump from one issue to the next or previous one, press \key F6 and
\key Shift+F6.
\section2 Search Results
......@@ -301,7 +320,7 @@
The \gui{Compile Output} pane provides all output from the compiler.
The \gui{Compile Output} is a more detailed version of information
displayed in the \gui{Build Issues} pane.
displayed in the \gui{Issues} pane.
\image qtcreator-compile-pane.png
......
......@@ -62,7 +62,7 @@
\o \l{Using Maemo or MeeGo Harmattan Emulator}
\endif
\o \l{Editing MIME Types}
\o \l{Showing Task List Files in the Build Issues Pane}
\o \l{Showing Task List Files in Issues Pane}
\o \l{Using Command Line Options}
\o \l{Keyboard Shortcuts}
\o \l{Glossary}
......
......@@ -84,6 +84,21 @@
as build configurations, compatible tool chains, and supported
Qt versions) as targets to make cross-platform development
easier.
\row
\o
\raw HTML
Component
\endraw
\target glossary-component
\o A component is an instantiable QML definition, typically
contained in a .qml file. For instance, a Button component may
be defined in Button.qml. The QML runtime may instantiate this
Button component to create Button objects. Alternatively, a
component may be defined inside a
\l{http://doc.qt.nokia.com/4.7-snapshot/qmlreusablecomponents.html}
{Component} element.
\endtable
*/
......@@ -40,7 +40,7 @@
To check that the application code can be compiled and linked for a target,
you can build the project. The build errors and warnings are displayed in
the \gui {Build Issues} output pane. More detailed information is displayed
the \gui {Issues} output pane. More detailed information is displayed
in the \gui {Compile Output} pane.
To build an application:
......
......@@ -50,8 +50,7 @@
\image qtcreator-cmakeexecutable.png
\note Before you open a \c CMake project, you must modify the \c{PATH}
environment variable to include the bin folders of \c mingw and \QC in
the \QSDK.
environment variable to include the bin folders of \c mingw and Qt.
For instance, if the \QSDK is installed in \c {C:\SDK}, you would use the
following command to set the environment variables in the command line
......@@ -96,7 +95,7 @@
\QC builds \c CMake projects by running \c make, \c mingw32-make, or
\c nmake depending on your platform. The build errors and warnings are
parsed and displayed in the \gui{Build Issues} output pane.
parsed and displayed in the \gui{Issues} output pane.
By default, \QC builds the \bold{all} target. You can specify which
targets to build in \gui{Project} mode, under \gui{Build Settings}.
......
......@@ -127,9 +127,8 @@
\o \c kind specifies the type of the wizard: \c project or
\c class.
\o \c class specifies the type of the project. Currently the only
available type is \c qt4project, which specifies a Qt console
project.
\o \c class specifies the type of the project. This attribute is
optional. Use the value \c qt4project to add Qt 4 specific pages.
\o \c firstpage specifies the place of the new page in the standard
project wizard. The value 10 ensures that the custom page
......
......@@ -167,7 +167,7 @@
\o \l{Using External Tools}
\o \l{Using Maemo or MeeGo Harmattan Emulator}
\o \l{Editing MIME Types}
\o \l{Showing Task List Files in the Build Issues Pane}
\o \l{Showing Task List Files in Issues Pane}
\o \l{Using Command Line Options}
\o \l{Keyboard Shortcuts}
\endlist
......
......@@ -183,6 +183,9 @@
allow you to create applications with a native look and feel for
that platform.
\note We recommend that you use \gui {Qt Quick Components for
MeeGo Harmattan} when you develop for MeeGo Harmattan devices.
You can also import an existing QML file in this dialog.
\o Click \gui{Next}.
......@@ -1027,6 +1030,18 @@
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
register new types with
\l{http://doc.qt.nokia.com/4.8/qdeclarativeengine.html#qmlRegisterType}
{qmlRegisterType} or expose some class instances with
\l{http://doc.qt.nokia.com/4.8/qdeclarativecontext.html#setContextProperty}
{setContextProperty}. The \QC C++ code model now scans for these calls and
tells the QML code model about them. This means that properties are
displayed during code completion and the JavaScript code checker does not
complain about unknown types. However, this works only when the source code
is available, and therefore, you must explicitly generate type information
for QML modules with plugins before distributing them.
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
components exported by the module's plugins and is loaded by \QC
......@@ -1035,7 +1050,7 @@
For Qt 4.8 and later, one or more \c qmltypes files can be listed in the
\c qmldir file under the \c typeinfo header. These files will be read in addition
to \c{plugins.qmltypes}. For more information, see
\l{http://doc.qt.nokia.com/4.8-snapshot/qdeclarativemodules.html#writing-a-qmldir-file}{Writing a qmldir File}.
\l{http://doc.qt.nokia.com/4.8/qdeclarativemodules.html#writing-a-qmldir-file}{Writing a qmldir File}.
\section1 Generating qmltypes Files
......
......@@ -75,8 +75,11 @@ isEmpty(TEST):CONFIG(debug, debug|release) {
isEmpty(IDE_LIBRARY_BASENAME) {
IDE_LIBRARY_BASENAME = lib
}
DEFINES += IDE_LIBRARY_BASENAME=\\\"$$IDE_LIBRARY_BASENAME\\\"
win32-msvc* {
DEFINES += IDE_LIBRARY_BASENAME=\"$$IDE_LIBRARY_BASENAME\"
} else {
DEFINES += IDE_LIBRARY_BASENAME=\\\"$$IDE_LIBRARY_BASENAME\\\"
}
equals(TEST, 1) {
QT +=testlib
......
......@@ -87,16 +87,17 @@ PropertyFrame {
rightMargin: 0;
spacing: 0;
WidgetLoader {
id: specificsOne;
source: specificsUrl;
}
WidgetLoader {
id: specificsTwo;
baseUrl: globalBaseUrl;
qmlData: specificQmlData;
}
WidgetLoader {
id: specificsOne;
source: specificsUrl;
}
QScrollArea {
}
} // layout
......
<!-- Aegis manifest declares the security credentials required by an
application to run correctly. By default, a manifest file will be
created or updated automatically as a part of build.
The detection of required credentials is based on static scan of
application binaries. In some cases, the scan may not be able to
detect the correct set of permissions. If this is the case, you must
declare the credentials required by your application in this file.
To create a manifest file automatically as a part of build (DEFAULT):
* You may leave this file as-is.
* Do not list any '<credential name="token" />' entries
outside of comments.
To provide a manifest yourself:
* List the correct credentials for the application in this file.
* Some commented-out examples of often required tokens are provided.
* Ensure the path to your application binary given in
'<for path="/path/to/app" />' is correct.
* Please do not request more credentials than what your application
actually requires.
To disable manifest file:
* Replace this file with a file starting with the string "NoAegisFile" (without quotes).
* Final application package will not contain a manifest.
-->
<aegis>
<request policy="add">
<!-- Make a GSM call, send text messages (SMS). -->
<!--
<credential name="Cellular" />
-->
<!-- Access Facebook social data. -->
<!--
<credential name="FacebookSocial" />
-->
<!-- Read access to data stored in tracker. -->
<!--
<credential name="TrackerReadAccess" />
-->
<!-- Read and write access to data stored in tracker. -->
<!--
<credential name="TrackerWriteAccess" />
-->
<!-- Read Location information. -->
<!--
<credential name="Location" />
-->
<!-- Access to Audio, Multimedia and Camera. -->
<!--
<credential name="GRP::pulse-access" />
<credential name="GRP::video" />
<credential name="GRP::audio" />
-->
</request>
<for path="/opt/%%PROJECTNAME%%/bin/%%PROJECTNAME%%" />
<for path="applauncherd-launcher::/usr/bin/applauncherd.bin" id="" />
</aegis>
......@@ -71,7 +71,7 @@ static const char fixedOptionsC[] =
" -help Display this help\n"
" -version Display program version\n"
" -client Attempt to connect to already running instance\n"
" -settingspath <path> Override the default path where user settings are stored.\n";
" -settingspath <path> Override the default path where user settings are stored\n";
static const char HELP_OPTION1[] = "-h";
static const char HELP_OPTION2[] = "-help";
......
......@@ -37,6 +37,7 @@
#define CPLUSPLUS_NO_DEBUG_RULE
#define MAX_EXPRESSION_DEPTH 100
#define MAX_STATEMENT_DEPTH 100
using namespace CPlusPlus;
......@@ -181,7 +182,8 @@ Parser::Parser(TranslationUnit *unit)
_inFunctionBody(false),
_inObjCImplementationContext(false),
_inExpressionStatement(false),
_expressionDepth(0)
_expressionDepth(0),
_statementDepth(0)
{ }
Parser::~Parser()
......@@ -3209,6 +3211,10 @@ bool Parser::parseCompoundStatement(StatementAST *&node)
{
DEBUG_THIS_RULE();
if (LA() == T_LBRACE) {
if (_statementDepth > MAX_STATEMENT_DEPTH)
return false;
++_statementDepth;
CompoundStatementAST *ast = new (_pool) CompoundStatementAST;
ast->lbrace_token = consumeToken();
......@@ -3233,6 +3239,7 @@ bool Parser::parseCompoundStatement(StatementAST *&node)
}
match(T_RBRACE, &ast->rbrace_token);
node = ast;
--_statementDepth;
return true;
}
return false;
......
......@@ -315,6 +315,7 @@ private:
bool _inObjCImplementationContext: 1;
bool _inExpressionStatement: 1;
int _expressionDepth;
int _statementDepth;
MemoryPool _expressionStatementTempPool;
std::map<unsigned, TemplateArgumentListEntry> _templateArgumentList;
......
......@@ -6,7 +6,11 @@ include(extensionsystem_dependencies.pri)
unix:!macx:!freebsd*:LIBS += -ldl
DEFINES += IDE_TEST_DIR=\\\"$$IDE_SOURCE_TREE\\\"
win32-msvc* {
DEFINES += IDE_TEST_DIR=\"$$IDE_SOURCE_TREE\"
} else {
DEFINES += IDE_TEST_DIR=\\\"$$IDE_SOURCE_TREE\\\"
}
HEADERS += pluginerrorview.h \
plugindetailsview.h \
......
......@@ -600,6 +600,11 @@ void PluginManager::formatOptions(QTextStream &str, int optionIndentation, int d
formatOption(str, QLatin1String(OptionsParser::PROFILE_OPTION),
QString(), QLatin1String("Profile plugin loading"),
optionIndentation, descriptionIndentation);
#ifdef WITH_TESTS
formatOption(str, QLatin1String(OptionsParser::TEST_OPTION),
QLatin1String("plugin|all"), QLatin1String("Run plugin's tests"),
optionIndentation, descriptionIndentation);
#endif
}
/*!
......
......@@ -259,6 +259,14 @@ void CodeFormatter::recalculateStateAfter(const QTextBlock &block)
default: enter(expression); continue;
} break;
case ternary_op:
if (kind == Colon) {
enter(ternary_op_after_colon);
enter(expression_continuation);
break;
}
// fallthrough
case ternary_op_after_colon:
case expression:
if (tryInsideExpression())
break;
......@@ -333,18 +341,6 @@ void CodeFormatter::recalculateStateAfter(const QTextBlock &block)
default: leave(); continue;
} break;
case ternary_op:
if (tryInsideExpression())